Skip to main content

Client

5 endpoints

POST /clients Create a client

Add new clients. Admin audience is required.

Request Body

password required
string
name required
string
email required
string
audience
string (enum)[]
scopes
any[][]

Responses

201
400 Bad request
401 Unauthorized
409 Already exists
POST https://api.qa.onyze.pro/v1/clients
Request body
{
"password": "password",
"name": "Alice",
"email": "alice@gmail.com",
"audience": [
"general"
],
"scopes": [
[]
]
}
Response 201
{
"id": "d8vJIh-H",
"createdAt": "2018-08-17T17:04:55.626Z",
"updatedAt": "2018-08-21T18:24:17.185Z",
"name": "client name",
"email": "client@example.com",
"audience": [
"general"
]
}
GET /clients List all clients

List all existing clients. Admin audience is required.

Parameters

page
number · query
Page number of the records list
limit
number · query
Max number of records by page. limit=0 to return all records
sort
string · query
Sort the response PARAM or -PARAM

Responses

200
401 Unauthorized
GET https://api.qa.onyze.pro/v1/clients
Response 200
[
{
"id": "d8vJIh-H",
"createdAt": "2018-08-17T17:04:55.626Z",
"updatedAt": "2018-08-21T18:24:17.185Z",
"name": "client name",
"email": "client@example.com",
"audience": [
"general"
]
}
]
GET /clients/{client} Find a client by id.

Find a client by id.

Parameters

client required
string · path
id parameter must be included in the URI

Responses

200
401 Unauthorized
404 Not found
GET https://api.qa.onyze.pro/v1/clients/{client}
Response 200
{
"id": "d8vJIh-H",
"createdAt": "2018-08-17T17:04:55.626Z",
"updatedAt": "2018-08-21T18:24:17.185Z",
"name": "client name",
"email": "client@example.com",
"audience": [
"general"
]
}
PATCH /clients/{client} Update a client

UPDATE an existing client. Admin audience is required.

Parameters

client required
string · path
id parameter must be included in the URI

Request Body

password
string
name
string
email
string
audience
string (enum)[]
scopes
any[][]

Responses

200
400 Bad request
401 Unauthorized
404 Not found
PATCH https://api.qa.onyze.pro/v1/clients/{client}
Request body
{
"password": "password",
"name": "Alice",
"email": "alice@gmail.com",
"audience": [
"general"
],
"scopes": [
[]
]
}
Response 200
{
"id": "d8vJIh-H",
"createdAt": "2018-08-17T17:04:55.626Z",
"updatedAt": "2018-08-21T18:24:17.185Z",
"name": "client name",
"email": "client@example.com",
"audience": [
"general"
]
}
DELETE /clients/{client} Delete a client by id

DELETE an existing client. Admin audience is required.

Parameters

client required
string · path
id parameter must be included in the URI

Responses

401 Unauthorized
404 Not found
DELETE https://api.qa.onyze.pro/v1/clients/{client}
Response
// Success