跳到主要内容

Application

Definition

application.json
{
"id": 0,
"applicationKey": "",
"applicationName": "",
"applicationDescription": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Applications

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

Get Application

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

Apply Application.ID

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

Create Application

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

success status: 201

Update Application

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

Patch Application

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

Update Application Status

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

Destroy Application

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

Get Roles

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

Get ApplicationRole

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

Update ApplicationRole

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

Get Users

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

Get ApplicationUser

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

Update ApplicationUser

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