AUTH
Create a new client
Create a new client by giving the name and scope. Only Admin Permission can access this information.
Available in 7.1.1 or later
Input Parameters
Type | Notation | Mandatory | Description | |
action | String | { add } | require |
Type | Notation | Mandatory | Description | |
name | String | <string> | require | Client name |
scope | String | { api, api.read- only } | require | Scope of the clientapi – Read-Write permissionapi.read-only – Read-Only permission |
Return Parameters
Return JSON | |||
Type | Notation | Description | |
name | String | <string> | Name of the client |
clientId | String | <hash> | Client ID for granting the access token |
clientSecret | String | <hash> | Client Secret for granting the access token |
confidential | Boolean | <boolean> | Confidential or public client type |
createTimestamp | Number | <number> | Create timestamp of the client |
scope | String | { api, api.read-only } | The scope of the client |
cURL Example
> curl -b cookies.txt -H “Content-Type: application/json” -X POST -d ‘{“action”:”add”,”name”:”Client 2″,”scope”:”api”}’ http://192.168.1.1/api/auth.client
{ “stat”: “ok”, “response”: { “name”: “Client 2”, “clientId”: “0396c250111dcaef02058007bb72217e”, “clientSecret”: “de5cd1c51252a13854d6bd7ddeabbcf5”, “confidential”: false, “createTimestamp”: 32175831, “scope”: “api” } }
Remove a client
Remove the client by giving the client ID. Only Admin Permission can access this information.
Avaliable in 7.1.1 or later
Input Parameters
Type | Notation | Mandatory | Description | |
action | String | { remove } | require | |
clientId | String | <hash> | require | Client ID |
cURL Example
> curl -b cookies.txt -H “Content-Type: application/json” -X POST -d ‘{“action”:”remove”,”clientId”:”0396c250111dcaef02058007bb72217e”}’ http://192.168.1.1/api/auth.client
{ “stat”: “ok” }