คู่มือ aWhere
พัฒนาAPIcore-services

OAuth client

OAuth client ตัวที่อยู่ใต้ `/api/profile` เป็นของผู้ใช้เอง ตัวที่อยู่ใต้ `/api/admin` เป็นของทั้งแพลตฟอร์ม

ค้นหา OAuth client

GET
/api/admin/credential/client

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Query

keyword?string

Words to look for.

query?string

A filter, as a JSON object.

select?string

The fields to return, as a JSON object of field names to 1 or 0.

skip?integer

How many to skip.

limit?integer

How many to return; 10 when absent.

ค่าเริ่มต้น10
sort?string

The order, as a JSON object of field names to 1 or -1.

Body ของคำตอบ

One page, and how many match.

application/json
  1. response
total?integer
data?array<>
curl -X GET "https://platform.example.com/api/admin/credential/client" \  -H "Authorization: Bearer $TOKEN"
{  "total": 0,  "data": [    {      "_id": "string",      "name": "string",      "description": "string",      "type": null,      "logo": "string",      "scope": null,      "trusted": null,      "deletable": true,      "ssoId": "string",      "props": null,      "extendedProps": null,      "createdAt": null,      "createdBy": null,      "updatedAt": null,      "updatedBy": null    }  ]}

ค้นหา OAuth client โดยส่งเงื่อนไขใน body

POST
/api/admin/credential/client

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Body ของคำขอ

application/json
  1. body
keyword?string

Words to look for.

query?

A filter, as a JSON object.

select?

The fields to return, as a JSON object of field names to 1 or 0.

skip?integer

How many to skip.

limit?integer

How many to return; 10 when absent.

ค่าเริ่มต้น10
sort?

The order, as a JSON object of field names to 1 or -1.

Body ของคำตอบ

One page, and how many match.

application/json
  1. response
total?integer
data?array<>
curl -X POST "https://platform.example.com/api/admin/credential/client" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "keyword": "string",  "query": {},  "select": {}}'
{  "total": 0,  "data": [    {      "_id": "string",      "name": "string",      "description": "string",      "type": null,      "logo": "string",      "scope": null,      "trusted": null,      "deletable": true,      "ssoId": "string",      "props": null,      "extendedProps": null,      "createdAt": null,      "createdBy": null,      "updatedAt": null,      "updatedBy": null    }  ]}

สร้าง OAuth client

PUT
/api/admin/credential/client

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Body ของคำขอ

application/json
  1. body
name*string
description?string
type*unknown
logo?file
รูปแบบbinary
scope?unknown
trusted?unknown
deletable?unknown
ค่าเริ่มต้นtrue
props?
extendedProps?
ssoId?string

Body ของคำตอบ

The answer.

response?stringapplication/json

The id.

curl -X PUT "https://platform.example.com/api/admin/credential/client" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "name": "string",  "type": "..."}'
"string"

อ่าน OAuth client หนึ่งตัว

GET
/api/admin/credential/client/{id}

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

พารามิเตอร์ใน Query

select?string

The fields to return, as a JSON object of field names to 1 or 0.

Body ของคำตอบ

The record.

application/json
  1. response
_id*string
name*string
description?string
type*unknown
logo?string
scope?unknown
trusted?unknown
deletable?unknown
ค่าเริ่มต้นtrue
ssoId?string
props?unknown
extendedProps?unknown
createdAt?unknown
createdBy?unknown
updatedAt?unknown
updatedBy?unknown
curl -X GET "https://platform.example.com/api/admin/credential/client/$ID" \  -H "Authorization: Bearer $TOKEN"
{  "_id": "string",  "name": "string",  "description": "string",  "type": null,  "logo": "string",  "scope": null,  "trusted": null,  "deletable": true,  "ssoId": "string",  "props": null,  "extendedProps": null,  "createdAt": null,  "createdBy": null,  "updatedAt": null,  "updatedBy": null}
POST
/api/admin/credential/client/{id}

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

Body ของคำขอ

application/json
  1. body
select?

The fields to return, as a JSON object of field names to 1 or 0.

Body ของคำตอบ

The record.

application/json
  1. response
_id*string
name*string
description?string
type*unknown
logo?string
scope?unknown
trusted?unknown
deletable?unknown
ค่าเริ่มต้นtrue
ssoId?string
props?unknown
extendedProps?unknown
createdAt?unknown
createdBy?unknown
updatedAt?unknown
updatedBy?unknown
curl -X POST "https://platform.example.com/api/admin/credential/client/$ID" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "select": {}}'
{  "_id": "string",  "name": "string",  "description": "string",  "type": null,  "logo": "string",  "scope": null,  "trusted": null,  "deletable": true,  "ssoId": "string",  "props": null,  "extendedProps": null,  "createdAt": null,  "createdBy": null,  "updatedAt": null,  "updatedBy": null}

ลบ OAuth client

DELETE
/api/admin/credential/client/{id}

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

Body ของคำตอบ

The answer.

response?stringapplication/json

The id.

curl -X DELETE "https://platform.example.com/api/admin/credential/client/$ID" \  -H "Authorization: Bearer $TOKEN"
"string"

แก้ OAuth client

PUT
/api/admin/credential/client/{id}

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

Body ของคำขอ

application/json
  1. body
name?string
description?string
type?unknown
logo?file
รูปแบบbinary
scope?unknown
trusted?unknown
deletable?unknown
ค่าเริ่มต้นtrue
props?
extendedProps?
ssoId?string

Body ของคำตอบ

The answer.

response?stringapplication/json

The id.

curl -X PUT "https://platform.example.com/api/admin/credential/client/$ID" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "name": "string",  "description": "string",  "type": "..."}'
"string"

แสดง secret ของ OAuth client

GET
/api/admin/credential/client/{id}/secret

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

พารามิเตอร์ใน Query

select?string

The fields to return, as a JSON object of field names to 1 or 0.

Body ของคำตอบ

The answer.

curl -X GET "https://platform.example.com/api/admin/credential/client/$ID/secret" \  -H "Authorization: Bearer $TOKEN"
ว่าง

ออก secret ใหม่ให้ OAuth client

PUT
/api/admin/credential/client/{id}/secret

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

Body ของคำตอบ

The answer.

curl -X PUT "https://platform.example.com/api/admin/credential/client/$ID/secret" \  -H "Authorization: Bearer $TOKEN"
ว่าง

ค้นหา OAuth client ของคุณ

GET
/api/profile/credential/client

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Query

keyword?string

Words to look for.

query?string

A filter, as a JSON object.

select?string

The fields to return, as a JSON object of field names to 1 or 0.

skip?integer

How many to skip.

limit?integer

How many to return; 10 when absent.

ค่าเริ่มต้น10
sort?string

The order, as a JSON object of field names to 1 or -1.

Body ของคำตอบ

One page, and how many match.

application/json
  1. response
total?integer
data?array<>
curl -X GET "https://platform.example.com/api/profile/credential/client" \  -H "Authorization: Bearer $TOKEN"
{  "total": 0,  "data": [    {      "_id": "string",      "name": "string",      "description": "string",      "type": null,      "logo": "string",      "scope": null,      "trusted": null,      "deletable": true,      "ssoId": "string",      "props": null,      "extendedProps": null,      "createdAt": null,      "createdBy": null,      "updatedAt": null,      "updatedBy": null    }  ]}
POST
/api/profile/credential/client

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Body ของคำขอ

application/json
  1. body
keyword?string

Words to look for.

query?

A filter, as a JSON object.

select?

The fields to return, as a JSON object of field names to 1 or 0.

skip?integer

How many to skip.

limit?integer

How many to return; 10 when absent.

ค่าเริ่มต้น10
sort?

The order, as a JSON object of field names to 1 or -1.

Body ของคำตอบ

One page, and how many match.

application/json
  1. response
total?integer
data?array<>
curl -X POST "https://platform.example.com/api/profile/credential/client" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "keyword": "string",  "query": {},  "select": {}}'
{  "total": 0,  "data": [    {      "_id": "string",      "name": "string",      "description": "string",      "type": null,      "logo": "string",      "scope": null,      "trusted": null,      "deletable": true,      "ssoId": "string",      "props": null,      "extendedProps": null,      "createdAt": null,      "createdBy": null,      "updatedAt": null,      "updatedBy": null    }  ]}

สร้าง OAuth client ของคุณ

PUT
/api/profile/credential/client

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

Body ของคำขอ

application/json
  1. body
name*string
description?string
type*unknown
logo?file
รูปแบบbinary
scope?unknown
trusted?unknown
deletable?unknown
ค่าเริ่มต้นtrue
props?
extendedProps?
ssoId?string

Body ของคำตอบ

The answer.

response?stringapplication/json

The id.

curl -X PUT "https://platform.example.com/api/profile/credential/client" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "name": "string",  "type": "..."}'
"string"

อ่าน OAuth client ของคุณหนึ่งตัว

GET
/api/profile/credential/client/{id}

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

พารามิเตอร์ใน Query

select?string

The fields to return, as a JSON object of field names to 1 or 0.

Body ของคำตอบ

The record.

application/json
  1. response
_id*string
name*string
description?string
type*unknown
logo?string
scope?unknown
trusted?unknown
deletable?unknown
ค่าเริ่มต้นtrue
ssoId?string
props?unknown
extendedProps?unknown
createdAt?unknown
createdBy?unknown
updatedAt?unknown
updatedBy?unknown
curl -X GET "https://platform.example.com/api/profile/credential/client/$ID" \  -H "Authorization: Bearer $TOKEN"
{  "_id": "string",  "name": "string",  "description": "string",  "type": null,  "logo": "string",  "scope": null,  "trusted": null,  "deletable": true,  "ssoId": "string",  "props": null,  "extendedProps": null,  "createdAt": null,  "createdBy": null,  "updatedAt": null,  "updatedBy": null}
POST
/api/profile/credential/client/{id}

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

Body ของคำขอ

application/json
  1. body
select?

The fields to return, as a JSON object of field names to 1 or 0.

Body ของคำตอบ

The record.

application/json
  1. response
_id*string
name*string
description?string
type*unknown
logo?string
scope?unknown
trusted?unknown
deletable?unknown
ค่าเริ่มต้นtrue
ssoId?string
props?unknown
extendedProps?unknown
createdAt?unknown
createdBy?unknown
updatedAt?unknown
updatedBy?unknown
curl -X POST "https://platform.example.com/api/profile/credential/client/$ID" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "select": {}}'
{  "_id": "string",  "name": "string",  "description": "string",  "type": null,  "logo": "string",  "scope": null,  "trusted": null,  "deletable": true,  "ssoId": "string",  "props": null,  "extendedProps": null,  "createdAt": null,  "createdBy": null,  "updatedAt": null,  "updatedBy": null}

ลบ OAuth client ของคุณ

DELETE
/api/profile/credential/client/{id}

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

Body ของคำตอบ

The answer.

response?stringapplication/json

The id.

curl -X DELETE "https://platform.example.com/api/profile/credential/client/$ID" \  -H "Authorization: Bearer $TOKEN"
"string"

แก้ OAuth client ของคุณ

PUT
/api/profile/credential/client/{id}

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

Body ของคำขอ

application/json
  1. body
name?string
description?string
type?unknown
logo?file
รูปแบบbinary
scope?unknown
trusted?unknown
deletable?unknown
ค่าเริ่มต้นtrue
props?
extendedProps?
ssoId?string

Body ของคำตอบ

The answer.

response?stringapplication/json

The id.

curl -X PUT "https://platform.example.com/api/profile/credential/client/$ID" \  -H "Authorization: Bearer $TOKEN" \  -H "Content-Type: application/json" \  -d '{  "name": "string",  "description": "string",  "type": "..."}'
"string"

แสดง secret ของ OAuth client ของคุณ

GET
/api/profile/credential/client/{id}/secret

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

พารามิเตอร์ใน Query

select?string

The fields to return, as a JSON object of field names to 1 or 0.

Body ของคำตอบ

The answer.

curl -X GET "https://platform.example.com/api/profile/credential/client/$ID/secret" \  -H "Authorization: Bearer $TOKEN"
ว่าง

ออก secret ใหม่ให้ OAuth client ของคุณ

PUT
/api/profile/credential/client/{id}/secret

การยืนยันตัวตน

headerการยืนยันตัวตนBearer <token>

An access token of an OAuth client: Authorization: Bearer <token>.

พารามิเตอร์ใน Path

id*string

The id of the OAuth client.

Body ของคำตอบ

The answer.

curl -X PUT "https://platform.example.com/api/profile/credential/client/$ID/secret" \  -H "Authorization: Bearer $TOKEN"
ว่าง