跳到主要内容

User

Definition

user.json
{
"id": 0,
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"emailAddress": "",
"phoneNumber": "",
"avatarUrl": "",
"photoUrl": "",
"password": "",
"rememberToken": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Users

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

Get User

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

Apply User.ID

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

Create User

curl -X POST "${baseUrl}/user/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @user.json
信息
user.json
{
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"emailAddress": "",
"phoneNumber": "",
"avatarUrl": "",
"photoUrl": "",
"status": 0,
}
提示

success status: 201

Update User

#!/bin/bash
curl -X PUT "${baseUrl}/user/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @user.json
信息
user.json
{
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"emailAddress": "",
"phoneNumber": "",
"avatarUrl": "",
"photoUrl": "",
"status": 0,
}

Patch User

curl -X PATCH "${baseUrl}/user/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: ref,outKey,firstName,lastName,emailAddress,phoneNumber,avatarUrl,photoUrl,status" \
-d @user.json
信息
user.json
{
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"emailAddress": "",
"phoneNumber": "",
"avatarUrl": "",
"photoUrl": "",
"status": 0,
}

Update User Status

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

Destroy User

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

Get Applications

curl -X GET "${baseUrl}/user/${id}/application/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
curl -X POST "${baseUrl}/user/${id}/application/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"
curl -X DELETE "${baseUrl}/user/${id}/application/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"

Get ApplicationUser

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

Update ApplicationUser

curl -X PUT "${baseUrl}/user/${id}/application/${applicationID}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @applicationUser.json
信息
applicationUser.json
{
"right": 0,
}

Get Roles

curl -X GET "${baseUrl}/user/${id}/role/?filter=${filter}&orderBy=${orderBy}&page=${page}&pageSize=${pageSize}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
curl -X POST "${baseUrl}/user/${id}/role/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"
curl -X DELETE "${baseUrl}/user/${id}/role/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"