aWhere Manual
DevelopAPIcore-services

OAuth clients

OAuth clients. The ones under `/api/profile` are the signed-in user’s own, and the ones under `/api/admin` are the site’s.

Find OAuth clients (GET)

GET
/api/admin/credential/client

Authorization

headerAuthorizationBearer <token>

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

Query Parameters

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.

Default10
sort?string

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

Response 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    }  ]}
POST
/api/admin/credential/client

Authorization

headerAuthorizationBearer <token>

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

Request 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.

Default10
sort?

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

Response 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    }  ]}
PUT
/api/admin/credential/client

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
name*string
description?string
type*unknown
logo?file
Formatbinary
scope?unknown
trusted?unknown
deletable?unknown
Defaulttrue
props?
extendedProps?
ssoId?string

Response 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"
GET
/api/admin/credential/client/{id}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Query Parameters

select?string

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

Response Body

The record.

application/json
  1. response
_id*string
name*string
description?string
type*unknown
logo?string
scope?unknown
trusted?unknown
deletable?unknown
Defaulttrue
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}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Request Body

application/json
  1. body
select?

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

Response Body

The record.

application/json
  1. response
_id*string
name*string
description?string
type*unknown
logo?string
scope?unknown
trusted?unknown
deletable?unknown
Defaulttrue
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}
DELETE
/api/admin/credential/client/{id}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Response 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"
PUT
/api/admin/credential/client/{id}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Request Body

application/json
  1. body
name?string
description?string
type?unknown
logo?file
Formatbinary
scope?unknown
trusted?unknown
deletable?unknown
Defaulttrue
props?
extendedProps?
ssoId?string

Response 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"
GET
/api/admin/credential/client/{id}/secret

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Query Parameters

select?string

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

Response Body

The answer.

curl -X GET "https://platform.example.com/api/admin/credential/client/$ID/secret" \  -H "Authorization: Bearer $TOKEN"
Empty
PUT
/api/admin/credential/client/{id}/secret

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Response Body

The answer.

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

Find OAuth clients (GET)

GET
/api/profile/credential/client

Authorization

headerAuthorizationBearer <token>

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

Query Parameters

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.

Default10
sort?string

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

Response 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

Authorization

headerAuthorizationBearer <token>

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

Request 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.

Default10
sort?

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

Response 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    }  ]}
PUT
/api/profile/credential/client

Authorization

headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
name*string
description?string
type*unknown
logo?file
Formatbinary
scope?unknown
trusted?unknown
deletable?unknown
Defaulttrue
props?
extendedProps?
ssoId?string

Response 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"
GET
/api/profile/credential/client/{id}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Query Parameters

select?string

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

Response Body

The record.

application/json
  1. response
_id*string
name*string
description?string
type*unknown
logo?string
scope?unknown
trusted?unknown
deletable?unknown
Defaulttrue
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}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Request Body

application/json
  1. body
select?

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

Response Body

The record.

application/json
  1. response
_id*string
name*string
description?string
type*unknown
logo?string
scope?unknown
trusted?unknown
deletable?unknown
Defaulttrue
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}
DELETE
/api/profile/credential/client/{id}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Response 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"
PUT
/api/profile/credential/client/{id}

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Request Body

application/json
  1. body
name?string
description?string
type?unknown
logo?file
Formatbinary
scope?unknown
trusted?unknown
deletable?unknown
Defaulttrue
props?
extendedProps?
ssoId?string

Response 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"
GET
/api/profile/credential/client/{id}/secret

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Query Parameters

select?string

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

Response Body

The answer.

curl -X GET "https://platform.example.com/api/profile/credential/client/$ID/secret" \  -H "Authorization: Bearer $TOKEN"
Empty
PUT
/api/profile/credential/client/{id}/secret

Authorization

headerAuthorizationBearer <token>

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

Path Parameters

id*string

The id of the OAuth client.

Response Body

The answer.

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