User


Versions

Versions this documentation is relevant for:

  • 8.8.0+

List

The User – List API call reads existing Users from Eyelit MES-M. The data can be filtered based on the parameters passed in the body of the JSON packet giving the flexibility to search for one or multiple Users.

Using the User – List API call has no impact on the data within the given Eyelit MES-M application, it is read-only. 

Figure 1 - Logic within User/List API Call 

ActiveX control 

Data Prerequisites

There is no data required in Eyelit MES-M to act as a pre-requisite to make the API call to list Users, although to be able to call the Public API, a user must exist in the given Eyelit MES-M environment. It is, therefore, not possible to receive an empty payload in response when calling this endpoint.   

Request 

Table 1 shows the method and endpoint required to make the API call to list Users 

Table 1 - Outbound Message Detail for User- List 

Method 

URL Structure 

Endpoint 

POST 

https://[environment].mestec.net 

/api/User/List 

The body of the payload should follow the format below: 

ActiveX control 

See Table 2 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M. 

Table 2 - Parameter Information for User- List 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

ID 

useraccount.id 

NUMBER 

No 

N/A 

Exact 

Username 

useraccount.username 

VARCHAR2(50 BYTE) 

No 

No 

Exact 

SUID 

useraccount.suid 

VARCHAR2(200 BYTE) 

No 

No 

Exact 

Sample Request 

See below for sample use cases with examples of the JSON payload format required 

To list Users where the username is equal to ‘Adam’: 

ActiveX control 

Response 

When using the User – List API call, if any data has been found in Eyelit MES-M that meets the parameter values passed in the original payload, a JSON payload will be returned containing data in the following structure: 

ActiveX control 

Sample Response 

See below for sample use cases with examples of the JSON payload format returned. 

No results were found that matched given parameters: 

ActiveX control 

Single User found that matched given parameters: 

ActiveX control 

Upsert

When User ID is provided, the User – Upsert API call checks if a User with the given ID already exists. If it does, appropriate fields are updated in the matching User in Eyelit MES-M. 

When the User ID is omitted, a new User will be created. 

Figure 2 - Logic within User/Upsert API Call 

ActiveX control 

Data Prerequisites 

To create a user, the TeamUser Group and, if required, Manager must already exist in Eyelit MES-M. 

Request 

Table 3 shows the method and endpoint required to make the API call to Upsert Users. 

Table 3 - Outbound Message Detail for User - Upsert 

Method 

URL Structure 

Endpoint 

PUT 

https://[environment].mestec.net 

/api/User/Upsert 

The body of the payload should follow the format below.  

ActiveX control 

See Table 4 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M. 

Table 4 - Parameter Information for User - Upsert 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

 

Case Sensitive 

Match Type 

 

 

 

Create 

Update 

 

 

id 

useraccount.id 

NUMBER 

N/A 

Yes 

N/A 

Exact 

suid 

useraccount.suid 

VARCHAR2(200 BYTE) 

No 

No 

N/A 

N/A 

username 

Useraccount.username 

VARCHAR2(50) 

Yes 

No 

N/A 

N/A 

fullname 

Useraccount.fullname 

VARCHAR2(50) 

Yes 

No 

N/A 

N/A 

title 

Useraccount.title 

VARCHAR2(50) 

No 

No 

N/A 

N/A 

password 

Useraccount.password 

VARCHAR2(250) 

Yes 

No 

Yes 

N/A 

email 

Useraccount.email 

VARCHAR2(100) 

No 

No 

N/A 

N/A 

principalName 

Useraccount.principalname 

ARCHAR2(100 BYTE) 

No 

No 

N/A 

N/A 

usergroup 

User_usergroup.usergroupid 

VARCHAR2(50) 

Yes 

No 

No 

Exact 

team 

User_team.teamid 

VARCHAR2(50) 

Yes 

No 

No 

Exact 

shiftselection 

Useraccount.shiftselectionmodeid 

VARCHAR2(50) 

DoNotPrompt/None/Prompt 

Yes 

No 

No 

Exact 

manager 

N/A 

JSON Field 

No 

No 

N/A 

N/A 

Data 

Useraccount.fullname 

VARCHAR2(50) 

No 

No 

No 

Exact 

holidayentitlement 

Useraccount.holidayentitlement 

NUMBER 

No 

No 

N/A 

N/A 

enabled 

Useraccount.isenabled 

BOOL 

Yes 

No 

N/A 

N/A 

isLockedOut 

Useraccount.islockedout 

BOOL 

No 

No 

N/A 

N/A 

trustdeviceonly 

Useraccount.trusteddevicesonly 

BOOL 

Yes 

No 

N/A 

N/A 

managepayhours 

Useraccount.managepayhours 

BOOL 

Yes 

No 

N/A 

N/A 

fullscreenmode 

Useraccount.fullscreen 

BOOL 

Yes 

No 

N/A 

N/A 

forcepasswordchange 

Useraccount.passwordchangedt 

BOOL 

Yes 

No 

N/A 

N/A 

Sample Request 

See below for sample use cases with examples of the JSON payload format required. 

To create a User: 

ActiveX control 

To update shift selection mode by ID: 

ActiveX control

Response 

When using the User – Upsert API call, if a User has been created or updated, a JSON payload will be returned containing data in the following structure: 

ActiveX control 

Sample Response 

See below for sample use cases with examples of the JSON payload format returned. 

ActiveX control 

Delete

The User – Delete API call attempts to delete a User. A User can only be deleted if it has never been used. If someone logs into the account, an attendance log will begin and the user can no longer be deleted. 

Figure 3 shows the logic used within the User – Delete API call. 

Figure 3 - Logic within User/Delete API Call 

ActiveX control 

Data Prerequisites 

In order to delete a User it must exist in Eyelit MES-M and not have been used. 

Request 

Table 5 shows the method and endpoint required to make the API call to delete a User. 

Table 5 - Outbound Message Detail for User - Delete 

Method 

URL Structure 

Endpoint 

DELETE 

https://[environment].mestec.net 

/api/User/Delete 

The body of the payload should follow the format below.  

ActiveX control 

See Table 6 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M. 

Table 6 - Parameter Information for User - Delete 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

ID 

user.id 

NUMBER 

Yes 

N/A 

Exact 


Sample Request 

See below for sample use cases with examples of the JSON payload format required. 

Delete by ID 

ActiveX control

Response 

When using the User – Delete API call, if a User has been Deleted a 200 status response will be returned. 

AssignGroup

The User – Assign User Group API call attempts to assign a User to a User Group

Figure 4 shows the logic used within the User – Assign Group API call. 

Figure 4 - Logic within User/AssignGroup API Call 

ActiveX control 

Prerequisites 

When assigning a User to a User Group, both the User and User Group must exist in Eyelit MES-M. 

Request 

Table 7 shows the method and endpoint required to make the API call to assign a User to a User Group. 

Table 7 - Outbound Message Detail for User – Assign Group 

Method 

URL Structure 

Endpoint 

POST 

https://[environment].mestec.net 

/api/User/AssignGroup 

 The body of the payload should follow the format displayed below: 

ActiveX control 

See Table 8 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M. 

Table 8 - Parameter Information for User – Assign Group 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

Username 

Useraccount.username 

VARCHAR2(50) 

Yes 

No 

Exact 

Usergroup 

Usergroup.name 

VARCHAR2(50) 

Yes 

No 

Exact 

isprimary 

User_usergroup.isprimary 

BOOL 

No 

N/A 

N/A 


Sample Request
 

See below for sample use case to assign a User to a User Group. The sample provides an example of the JSON payload format required. 

ActiveX control 

Response 

When using the User – Assign Group API call, if the User has been successfully assigned to the User Group, a JSON payload will be returned containing data in the following structure: 

ActiveX control 

Sample Response 

See below for sample use cases with examples of the JSON payload format returned. 

ActiveX control 

UnassignGroup

The User – Unassign Group API call attempts to unassign a User from a User Group. 

Figure 5 shows the logic used within the User - UnassignGroup API call. 

Figure 5 - Logic within User/UnassignGroup API Call 

ActiveX control 

Prerequisites 

When unassigning a User from a User Group, both the User and User Group must exist in Eyelit MES-M, and the given User should already be assigned to the User Group. 

Request 

Table 9 shows the method and endpoint required to make the API call to unassign a User from a User Group. 

Table 9 - Outbound Message Detail for User – Unassign Group 

Method 

URL Structure 

Endpoint 

POST 

https://[environment].mestec.net 

/api/User/UnassignGroup 

The body of the payload should follow the format displayed below: 

ActiveX control

See Table 10 for information on which fields are optional, the appropriate data types and the mappings to fields in Eyelit MES-M. 

Table 10 - Parameter Information for User – Unassign Group 

Parameter Name 

Data Mapping 

Data Type 

Mandatory 

Case Sensitive 

Match Type 

Username 

Useraccount.username 

VARCHAR2(50) 

Yes 

No 

Exact 

Usergroup 

Usergroup.name 

VARCHAR2(50) 

Yes 

No 

Exact 

isprimary 

User_usergroup.isprimary 

BOOL 

No 

N/A 

N/A 

Sample Request 

See below for a sample use case to unassign a User from a User Group. The sample provides an example of the JSON payload format required. 

ActiveX control

Response 

When using the User – Unassign Group API call, if the User has been successfully unassigned from the User Group, a JSON payload will be returned containing data in the following structure: 

ActiveX control

Sample Response 

See below for sample use cases with examples of the JSON payload format returned. 

ActiveX control