Client
5 endpoints
POST
/clients
Create a client
Add new clients. Admin audience is required.
Request Body
password required
name required
email required
audience
scopes
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
Page number of the records list
limit
Max number of records by page. limit=0 to return all records
sort
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
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
id parameter must be included in the URI
Request Body
password
name
email
audience
scopes
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
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