跳到主要内容

Application

Definition

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

Get Applications

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_filter=""
_orderBy=""
_page=1
_pageSize=10

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

Apply Application.ID

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

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

Create Application

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

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

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

Get Roles

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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"
#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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]"
#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0
_roleID=0

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

Update ApplicationRole

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0
_roleID=0

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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"
#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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]"
#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0

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

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0
_userID=0

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

Update ApplicationUser

#!/bin/bash

set -e

if [ -f ./_env.bash ] ; then
source ./_env.bash
fi

_id=0
_userID=0

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,
}