API clients
On this page:
THE API CLIENT OBJECT |
|
GET[base]/clients |
|
GET[base]/clients/{clientId} |
|
POST[base]/clients |
|
DELETE[base]/clients/{clientId} |
The API client object
This object provides the following data about an API client:
- clientId integer
The API client identifier.
- clientName string
The API client name.
- createTime string
The date and time when the object has been created.
- updateTime string
The date and time when the object has been last updated.
{
"clientId": 2,
"clientName": "B2Core",
"createTime": "2021-01-01T00:00:00+00:00",
"updateTime": "2021-01-01T00:00:00+00:00"
}
Get a list of API clients
Use this method to obtain a list of all API clients and apps registered in the system.
To obtain detailed information about a specific API client, use a separate method to get API client details.
Request
Header parameters:
Authorization: Bearer <token>
Query parameters:
This method supports pagination and sorting. For details on applying the parameters, refer to the Query parameters section. Possible fields for sorting are listed below. For values description, refer to the API client object.
Possible values for the sort_by
parameter:
clientId
clientName
createTime
(default)updateTime
GET[base]/clients
curl --location --request GET 'https://your.base-url.here/clients?limit=10&offset=0&sort_by=createTime&sort_order=desc' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an array of API client objects providing information about all API clients that correspond to the query parameters specified in the request.
Get API client details
Use this method to obtain detailed information about an API client/app registered in the system.
To obtain a list of all API clients and apps registered in the system, use a separate method to get a list of API clients.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- clientId required
The API client identifier.
GET[base]/clients/{clienId}
curl --location --request GET 'https://your.base-url.here/clients/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an API client object providing information about the specified API client/app.
Add a new API client
Use this method to register a new API client/app in the system.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Body:
- clientName string
The API client name.
POST[base]/clients
curl --location --request POST 'https://your.base-url.here/clients' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"clientName": "B2Core"
}'
Response
Body:
In case of success, the response body contains an API client object providing information about the newly registered API client.
Delete an API client
Use this method to delete a specified API client.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- clientId required
The API client identifier.
DELETE[base]/clients/{clientId}
curl --location --request DELETE 'https://your.base-url.here/clients/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, no response body is returned.