(Consumer) Administration APIs
The (consumer) administration APIs consist of methods that allow you to perform the following tasks:
-
Sign in, set a password, and refresh an authentication token.
-
Retrieve jobs and view job details.
See Retrieve jobs and Retrieve a job-by-job ID.
-
Retrieve regions.
-
Retrieve service levels.
-
Work with subtenants.
See:
-
Work with subtenants.
See:
-
Retrieve users.
-
Retrieve zones.
The following table lists the consumer APIs documented in this section.
HTTP Method | Path | Description |
---|---|---|
|
|
Set the password for a user. |
|
|
Refresh authentication JWT. |
|
|
Sign in. |
|
|
Retrieve regions. |
|
|
Retrieve regions by name. |
|
|
Retrieve zones. |
|
|
Retrieve zones by name. |
|
|
Retrieve jobs. |
|
|
Retrieve jobs by ID. |
Reset user password
Use the method listed in the following table reset the user password.
HTTP Method | Path | Description | Parameters |
---|---|---|---|
|
|
Reset the password. |
None |
Required request body attributes: username
(string), new_password
(string)
Request body example:
{ "username": "MyName", "old_password": "oldPassword", "new_password": "newPassword" }
Response body example:
{ "status": { "user_message": "Okay. Returned 1 record.", "verbose_message": "", "code": 200 }, "result": { "total_records": 1, "records": [ { "user": { "id": "5e61aa814559c20001df1a5f", "username": "MyName", "firstName": "MyFirstName", "lastName": "MySurname", "displayName": "CallMeMYF", "email": "user@example.com", "tenancies": [ { "id": "5e5f1c4f253c820001877839", "name": "MyTenant", "code": "testtenantmh", "role": "user" } ] }, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Ik15TmFtZSIsImV4cCI6MTU4MzgxNjg3MX0.ZuRXjDPVtc2pH-e9wqgmszVKCBYS2PLqux2YwQ5uoAM" } ] } }
Refresh authentication token
Use the method listed in the following table to refresh the authentication token.
HTTP Method | Path | Description | Parameters |
---|---|---|---|
|
|
Refresh the authentication token. |
None |
Required request body attributes: none
Request body example:
none
Response body example:
{ "status": { "user_message": "Okay. Returned 1 record.", "verbose_message": "", "code": 200 }, "result": { "total_records": 1, "records": [ { "user": { "id": "5d914547869caefed0f3a00c", "username": "myusername", "firstName": "myfirstname", "lastName": "", "displayName": "Myfirstname Mysurname", "email": "", "tenancies": [ { "id": "5d914499869caefed0f39eee", "name": "MyOrg", "code": "myorg", "role": "admin" }, { "id": "5d9417aa869caefed0f7b4f9", "name": "ABCsafe", "code": "abcsafe", "role": "admin" } ] }, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6ImVsbGlvdCIsImV4cCI6MTU4MzgxNzA2N30.FdKD3QhPoNdWdbMfZ0bzCMTHluIt6HNP311F482K9AY" } ] } }
Sign in
Use the method listed in the following table to sign in.
HTTP Method | Path | Description | Parameters |
---|---|---|---|
|
|
Log in as a user. |
None |
Required request body attributes: username
(string), new_password
(string)
Request body example:
{ "username": "MyName", "password": "newPassword" }
Response body example:
{ "status": { "user_message": "Authentication succeeeded.", "verbose_message": "", "code": 200 }, "result": { "total_records": 1, "records": [ { "user": { "id": "5e61aa814559c20001df1a5f", "username": "MyName", "firstName": "MyFirstName", "lastName": "MySurname", "displayName": "CallMeMYF", "email": "user@example.com", "tenancies": [ { "id": "5e5f1c4f253c820001877839", "name": "MyTenant", "code": "testtenantmh", "role": "user" } ] }, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VybmFtZSI6Ik15TmFtZSIsImV4cCI6MTU4MzgxNzQwMH0._u_UyYrzg_RewF-9ClIGoKQhfZYWrixZYBrsj1kh1hI" } ] } }