Skip to main content

Application

Definition

application.json
{
"id": 0,
"applicationKey": "",
"applicationName": "",
"applicationDescription": "",
"clientID": "",
"clientSecret": "",
"redirectUri": "",
"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
info
application.json
{
"applicationKey": "",
"applicationName": "",
"applicationDescription": "",
"clientID": "",
"redirectUri": "",
"status": 0,
}
tip

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
info
application.json
{
"applicationKey": "",
"applicationName": "",
"applicationDescription": "",
"clientID": "",
"redirectUri": "",
"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,clientID,redirectUri,status" \
-d @application.json
info
application.json
{
"applicationKey": "",
"applicationName": "",
"applicationDescription": "",
"clientID": "",
"redirectUri": "",
"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
info
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
info
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
info
applicationUser.json
{
"right": 0,
}