跳到主要内容

Email

Definition

email.json
{
"id": 0,
"userID": 0,
"emailAddress": "",
"emailVerifiedAt": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Emails

curl -X GET "${baseUrl}/email/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get Email

curl -X GET "${baseUrl}/email/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply Email.ID

curl -X POST "${baseUrl}/apply/email/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create Email

curl -X POST "${baseUrl}/email/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @email.json
信息
email.json
{
"userID": 0,
"emailAddress": "",
"emailVerifiedAt": "",
"status": 0,
}
提示

success status: 201

Update Email

#!/bin/bash
curl -X PUT "${baseUrl}/email/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @email.json
信息
email.json
{
"userID": 0,
"emailAddress": "",
"emailVerifiedAt": "",
"status": 0,
}

Patch Email

curl -X PATCH "${baseUrl}/email/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: userID,emailAddress,emailVerifiedAt,status" \
-d @email.json
信息
email.json
{
"userID": 0,
"emailAddress": "",
"emailVerifiedAt": "",
"status": 0,
}

Update Email Status

curl -X PATCH "${baseUrl}/email/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @email.json
信息
email.json
{
"status": 0
}

Destroy Email

curl -X DELETE "${baseUrl}/email/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"