Role REST API
Resource URL Summary
Retrieve the details of a specific Role
GET /seiapi/v3/trans/role/${RoleID}
Insert or Update the details of a specific Role
PUT /seiapi/v3/trans/role/${RoleID}
Delete a specific Role
DELETE /seiapi/v3/trans/role/${RoleID}
Retrieve a list of Users associated with a specific Role
GET /seiapi/v3/trans/role/${RoleID}/users
Insert or Update a list of Users associated with a specific Role
PUT /seiapi/v3/trans/role/${RoleID}/users
Insert a specific User to be associated with a specific Role
PUT /seiapi/v3/trans/role/${RoleID}/user/${UserID}
Delete a specific User from a specific Role association
DELETE /seiapi/v3/trans/role/${RoleID}/user/${UserID}
API Specific Parameters
Parameter | Description |
---|---|
| Identifies the Role Object. |
${UserId} | Identifies the user to be assigned or removed from the role |
HTTP Headers
This API uses the default ServiceMobility HTTP Headers.
API Specifics
Retrieve the details of a specific Role
This REST API will return a Role with the specified ID. The Role with the specified ID must already exist in the system.
URL
GET /seiapi/v3/trans/role/${RoleID}
HTTP Request Body
This request does not require a request body.
HTTP Response Body
On success, an HTTP response code of 200 will be returned, and the response body will contain a Role Object. Otherwise, on error, the response body will contain a descriptive reason for the error.
Insert or Update the details of a specific Role
This REST API will insert a new Role with the specified ID into the system, if a Role with the specified ID does not already exist in the system.
If, however, the Role with the specified ID does already exist in the system, then this REST API will update (i.e. replace) the already existing Role with the specified ID with the details of the Role supplied in the HTTP Request Body.
URL
PUT /seiapi/v3/trans/role/${RoleID}
HTTP Request Body
The HTTP request body must contain a valid Role Object.
HTTP Response
On success the API will return a response code of 200.
Delete a specific Role
This REST API will delete a Role with the specified ID from the system. The Role with the specified ID must already exist in the system.
URL
DELETE /seiapi/v3/trans/role/${RoleID}
HTTP Request Body
This request does not require a request body.
HTTP Response
On success an HTTP response code of 200 will be returned. The system will return HTTP response code 404 in case of non-existent Role Object.
Retrieve a list of Users associated with a specific Role
This REST API will return a list of Users that have an association with the Role with the specified ID from the system. The Role with the specified ID must already exist in the system.
URL
GET /seiapi/v3/trans/role/${RoleID}/users
HTTP Request Body
This request does not require a request body.
HTTP Response
The HTTP response body, on success, will contain a JSON array of User IDs. Otherwise, on error, the response body will contain a descriptive reason for the error.
[ "", "", "" ]
Insert or Update a list of Users associated with a specific Role
This REST API will insert a new list of Users to be associated with the Role with the specified ID into the system, if a list of Users associated with the Role with the specified ID does not already exist in the system.
If, however, the Role with the specified ID already has a list of associated Users in the system, then this REST API will update (i.e. replace) the existing list of Users associated with the Role with the specified ID with the list of users supplied in the HTTP Request Body.
URL
PUT /seiapi/v3/trans/role/${RoleID}/users
HTTP Request Body
The HTTP request body must contain a valid JSON array of User IDs.
[ "", "", "" ]
HTTP Response
On success an HTTP response code of 200 will be returned.
Insert a specific User to be associated with a specific Role
This REST API will create an association between the Role with the specified ID and the User with the specified ID, from the system. The Role with the specified ID and the User with the specified ID must already exist in the system.
URL
PUT /seiapi/v3/trans/role/${RoleID}/user/${UserID}
HTTP Request Body
This request does not require a request body.
HTTP Response
On success an HTTP response code of 200 will be returned.
Delete a specific User from a specific Role association
This REST API will delete the association between the Role with the specified ID and the User with the specified ID, from the system. The Role with the specified ID and the User with the specified ID must already exist in the system.
URL
DELETE /seiapi/v3/trans/role/${RoleID}/user/${UserID}
HTTP Request Body
This request does not require a request body.
HTTP Response
On success an HTTP response code of 200 will be returned. The system will return HTTP response code 404 in case of non-existent Role Object.