Skip to main content

User

Definition

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

Get Users

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

Get User

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

Apply User.ID

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

Create User

curl -X POST "https://${baseUrl}/user/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @user.json
info
user.json
{
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"photoUrl": "",
"status": 0,
}
tip

success status: 201

Update User

curl -X PUT "https://${baseUrl}/user/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @user.json
info
user.json
{
"ref": 0,
"outKey": "",
"firstName": "",
"lastName": "",
"photoUrl": "",
"status": 0,
}

Update User Partial

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

Update User Status

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

Destroy User

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

Get Applications

curl -X GET "https://${baseUrl}/user/${id}/application/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
curl -X POST "https://${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 "https://${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 "https://${baseUrl}/user/${id}/application/${applicationID}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Update ApplicationUser

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

Get Roles

curl -X GET "https://${baseUrl}/user/${id}/role/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
curl -X POST "https://${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 "https://${baseUrl}/user/${id}/role/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d "[1,2,3,4]"