Access Control (REST) API - First User
This section includes REST APIs for working with Access Control First User tasks.
Submit First Admin User - POST /Users/FirstAdmin (v2.0 and up)
Define the first admin user.
Usage:
POST /Users/FirstAdmin and define the first admin user
GET /Users/FirstAdminExistence and confirm that a first admin user exists.
URL
/cxrestapi/auth/Users/FirstAdmin
Method:
POST
Media Type (header):
Authorization: Bearer <access token value>
Content-Type: application/json;v=1.0
Parameters
Required:
createUserModel=[body]: Specifies the first admin user details to define:
username=[string] - User name
password=[string] - User password
firstName=[string] - User first name
lastName=[string] - User last name
email=[string] - User email address
Success Response:
Code: 201 Success
Error Response:
Code: 400 Bad request
Code: 401 Unauthorized
Code: 403 Forbidden
Sample Response:
no content
Notes:
Returns location of the created user in the response header. If the request fails, it returns an error response.
Get Admin User Exists Confirmation – GET /Users/FirstAdminExistence (v2.0 and up)
Confirm that a first admin user exists.
Usage:
POST /Users/FirstAdmin and define the first admin user
GET /Users/FirstAdminExistence and confirm that a first admin user exists
URL
/cxrestapi/auth/Users/FirstAdminExistence
Method:
GET
Media Type (header):
Authorization: Bearer <access token value>
Accept: application/json;v=1.0
Parameters
None
Success Response:
Code: 200 Success
Error Response:
Code: 401 Unauthorized
Code: 403 Forbidden
Sample Response:
{ "firstAdminExists": true }
Notes:
Confirms that the first admin user exists. If the request fails, it returns an error response.