Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourGreen
title3.12.0
 
Status
colourYellow
title3.20.0
 
Status
colourYellow
title3.40.0
 
Status
colourYellow
title4.5.0
 
Status
colourYellow
title4.17.1
Status
colourYellow
title4.19.0

The User REST API is used to create, retrieve, update or delete User Objects.

The User API also provides separate URLs for resetting :

  • Resetting and changing a user's password
  • ;
  • Changing a user's storage location;
  • Retrieving and updating the roles assigned to a user (which can also be performed via the Role REST API); and
  • Allowing administrative users to performing actions on behalf of another user.


Panel
borderColorgrey
bgColorwhitesmoke

On this page:

Table of Contents
maxLevel2

Related pages:


Resource URL Summary

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

Retrieve the details of a specific User

GET /seiapi/v3/trans/User/${UserID}

Insert or Update the details of a specific User

PUT /seiapi/v3/trans/User/${UserID}?emailNotification=true

Delete a specific User

DELETE /seiapi/v3/trans/User/${UserID}

Send Password Reset Email to a specific User

    PUT /seiapi/v3/trans/User/${UserID}/SendResetPasswordEmail

Reset a User's Password

PUT  /seiapi/v3/trans/User/${UserID}/ResetPassword  

Change a User's Password

PUT /seiapi/v3/trans/User/${UserID}/ChangePassword

Change a User's Storage Location

    PUT /seiapi/v3/trans/User/${UserID}/ChangeStorageLocation

Retrieve the Roles associated with a specific User

GET /seiapi/v3/trans/User/${UserID}/roles

Update the Roles associated with a specific User

POST /seiapi/v3/trans/User/${UserID}/roles

Assign Service Teams to a User

PUT /seiapi/v3/trans/User/${UserID}/ServiceTeams

Retrieve the details of a specific User's Entity

GET  /seiapi/v3/trans/User/${UserID}/Entity

Change the details of a specific User's Entity

PUT /seiapi/v3/trans/User/${UserID}/Entity

Delegate a specific Entity and Role

POST /saas/v3/Entity/${EntityID}/Roles/${RoleID}/delegate

Impersonate a specific User

POST /seiapi/v3/trans/User/${UserID}/impersonate

API Specific Parameters

ParameterDescription

${UserID}

Identifies the User Object.
${EntityID}Identifies the Entity Object.
${RoleID}Identifies the Role Object.
emailNotification=trueAdd this query string parameter with a value of true to email user name and password for a new user.

Include Page
_URI Default HTTP Headers
_URI Default HTTP Headers
 



API Specifics


Panel
borderColor#D3D3D3

Retrieve the details of a specific User

This REST API will return a User with the specified ID. The User with the specified ID must already exist in the system.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

GET /seiapi/v3/trans/User/${UserID}

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 User Object . Otherwise, on error, the response body will contain a descriptive reason for the error. 

Include Page
_User Object Formats
_User Object Formats


Panel
borderColor#D3D3D3

Insert or Update the details of a specific User

This REST API will insert a new User with the specified ID into the system, if a User with the specified ID does not already exist in the system.

If, however, the User with the specified ID does already exist in the system, then this REST API will update (i.e. replace) the already existing User with the specified ID with the details of the User supplied in the HTTP Request Body.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

PUT /seiapi/v3/trans/User/${UserID}?emailNotification=true

HTTP Request Body

The HTTP request body must contain a valid User Object.

HTTP Response

On success the API will return a response code of 200.


Panel
borderColor#D3D3D3

Delete a specific User

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

DELETE /seiapi/v3/trans/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 410 in case of non-existent User Object .


Panel
borderColor#D3D3D3

Reset a User's Password

This REST API will automatically generate a new password and email it to the user. 

URL

Panel

PUT /seiapi/v3/trans/User/${UserID}/ResetPassword

HTTP Request Body

This request does not require a request body. 

HTTP Response

On success an HTTP response code of 200 will be returned.


Panel
borderColor#D3D3D3

Send Password Reset Email to a specific User

This REST API will send password reset email for a forgotten password to User's email address. Email will contain a link to reset user's password. The User with the specified ID must already exist in the system.

URL

Panel

PUT /seiapi/v3/trans/User/${UserID}/SendResetPasswordEmail

HTTP Request Body

This request does not require a request body. 

HTTP Response

HTTP response code of 200 will be returned.


Panel
borderColor#D3D3D3

Change a User's Password

This REST API will change a user's password to the supplied value.

URL

Panel

PUT /seiapi/v3/trans/User/${UserID}/ChangePassword

HTTP Request Body

The HTTP Request Body request body must contain the following JSON, where the supplied value is the password that is to be set.

Code Block
languagejs
titleJSON Body Format
{
	"Password" : ""
}

HTTP Response

On success an HTTP response code of 200 will be returned.


Panel
borderColor#D3D3D3

Change a User's Storage Location

This REST API will change a user's Storage Location to the supplied value.

A System Alert will be generated and sent to the mobile application to display to the logged on mobile worker when a new StorageLocationID has been assigned.

URL

Panel

PUT /seiapi/v3/trans/User/${UserID}/ChangeStorageLocation

HTTP Request Body

The HTTP request body must contain a valid User Storage Location Object.

HTTP Response

On success an HTTP response code of 200 will be returned.



Panel
borderColor#D3D3D3

Retrieve the Roles associated with a specific User

This REST API will return all of the Roles associated with the User with the specified ID. The User with the specified ID must already exist in the system.

See also the Role REST API.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

GET /seiapi/v3/trans/User/${UserID}/roles

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 an array of Role ID values associated with the User. (The array may be empty, if no Roles as associated with the User.)

Otherwise, on error, the response body will contain a descriptive reason for the error.


Panel
borderColor#D3D3D3

Update the Roles associated with a specific User

This REST API will return update the Roles associated with the User with the specified ID. The User with the specified ID must already exist in the system.

See also the Role REST API.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

POST /seiapi/v3/trans/User/${UserID}/roles

HTTP Request Body

The HTTP request body must contain an array of valid Role ID values.

Code Block
languagejs
titleJSON Body Format
{
	[
		"RoleID1",
		"RoleID2",
		...
	]
}

The User will be updated to be associated with the list of Role IDs supplied.

HTTP Response Body

On success, an HTTP response code of 200 will be returned. 


Panel
borderColor#D3D3D3

Assign Service Teams to a User

This REST API will assign supplied Service Teams to a user.

URL

Panel

PUT /seiapi/v3/trans/User/${UserID}/ServiceTeams

HTTP Request Body

The HTTP Request Body request body must contain a collection of valid Service Teams.

Code Block
languagejs
titleJSON Body Format
{
	"ServiceTeams": [
		// Service Teams ID
	]
}

HTTP Response

On success an HTTP response code of 200 will be returned.


Panel
borderColor#D3D3D3

Retrieve the details of a specific User's Entity

This REST API will return the details of User's Entity from the system. The User with the specified ID must already exist in the system.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

GET /seiapi/v3/trans/User/${UserID}/Entity

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 User Entity Object. Otherwise, on error, the response body will contain a descriptive reason for the error. 

Include Page
_User Entity Object Formats
_User Entity Object Formats


Panel
borderColor#D3D3D3

Change the details of a specific User's Entity

This REST API will change the details of User's Entity supplied in the HTTP Request Body. The User with the specified ID must already exist in the system.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

PUT /seiapi/v3/trans/User/${UserID}/Entity

HTTP Request Body

The HTTP request body must contain a valid User Entity Object.

HTTP Response Body

On success an HTTP response code of 200 will be returned.



Panel
borderColor#D3D3D3

Delegate a specific Entity and Role

This REST API will allow a ServiceMobility Super Admin to act on behalf of another ServiceMobility Entity/Role. The Entity and Role with the specified IDs must already exist in the system.

Info

When making calls to the ServiceMobility API using a JWT obtained through this API, all actions performed will be logged in ServiceMobility to note that they were performed by the appropriate ServiceMobility Super Admin. As a result, this API is appropriate for use when a Super Admin needs to perform an action on behalf of another user.

However, for the purposes of testing/debugging a specific user issue with the API service, the "Impersonate a specific User" API below may be more appropriate.


Note

As the details of the ServiceMobility Super User account that will be acting on behalf of another User are passed into this API in the HTTP Request Body, this API must be called without the standard x-access-token header.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

POST /saas/v3/Entity/${EntityID}/Roles/${RoleID}/delegate

HTTP Request Body

The HTTP request body must contain a JSON object containing the details of the ServiceMobility Super User that will be delegating as the Entity/Role:

Code Block
languagejs
titleJSON Body Format
{
	"UserID": "<ServiceMobility Super Admin user ID>",
	"Password": "<ServiceMobility Super Admin user password>"
}

HTTP Response Body

On success, an HTTP response code of 200 will be returned, and the response body will be a JSON object containing a JWT which can then be used to authenticate API calls via the x-access-token header to delegate as the specified Entity/Role:

Code Block
languagejs
titleJSON Body Format
{
	"Token": ""
}

Otherwise, on error, the response body will contain a descriptive reason for the error. 


Panel
borderColor#D3D3D3

Impersonate a specific User

This REST API will allow the ServicePower Hub admin user or a ServiceMobility Super Admin to impersonate another User for testing/debugging purposes. The User with the specified ID must already exist in the system.

Info

When making calls to the ServiceMobility API using a JWT obtained through this API, all actions performed will be logged in ServiceMobility as if they were performed by the User. There will be no indication that actions were performed via this mechanism. Accordingly, the API is intended for testing/debugging purposes only. 

For non testing/debugging purposes, consider the "Delegate a specific Entity and Role" API above.


Note

As the details of the ServicePower Hub admin user or ServiceMobility Super Admin account that will be impersonating another User are passed into this API in the HTTP Request Body, this API must be called without the standard x-access-token header.

URL

Panel
borderColorgrey
bgColorwhitesmoke
borderStylesolid

POST /seiapi/v3/trans/User/${UserID}/impersonate

HTTP Request Body

The HTTP request body must contain a JSON object containing the details of the ServicePower Hub admin user or ServiceMobility Super User that will be impersonating the specified user:

Code Block
languagejs
titleJSON Body Format
{
	"UserID": "<ServicePower Hub admin user or ServiceMobility Super Admin user ID>",
	"Password": "<ServicePower Hub admin user or ServiceMobility Super Admin user password>"
}

HTTP Response Body

On success, an HTTP response code of 200 will be returned, and the response body will be a JSON object containing a JWT which can then be used to authenticate API calls via the x-access-token header to impersonate the specified user:

Code Block
languagejs
titleJSON Body Format
{
	"Token": ""
}

Otherwise, on error, the response body will contain a descriptive reason for the error.