跳到主要内容

Client

Definition

client.json
{
"id": 0,
"clientName": "",
"clientID": "",
"clientSecret": "",
"redirectUri": "",
"status": 0,
"createdAt": "",
"updatedAt": "",
}

Get Clients

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

Get Client

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

Apply Client.ID

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

Create Client

curl -X POST "${baseUrl}/client/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @client.json
信息
client.json
{
"clientName": "",
"clientID": "",
"clientSecret": "",
"redirectUri": "",
"status": 0,
}
提示

success status: 201

Update Client

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

Patch Client

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

Update Client Status

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

Destroy Client

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