NoahFace can automatically retrieve your list of users from an existing IT system so you don't need to import/export users or manually maintain them in two places. To do this, you simply implement our User Synchronization API (a REST Web Hook), and configure NoahFace to call it.
Your implementation of the User Synchronization API should return JSON data. The JSON data should contain a top level element called Users, which is an array of all of your users. Each user can contain any of the following elements:
Only the SyncGuid and at least one of the Name and FirstName elements are mandatory for each user. However, the more attributes you return the more functionality you will have available to you within NoahFace.
The following is an example of the JSON that your API should return:
{
"Users" : [
{
"SyncGuid" : "12345",
"FirstName" : "Samara",
"LastName" : "Smith",
"UserNumber" : "1001"
},
{
"SyncGuid" : "55555",
"Name" : "Jimmy",
"FirstName" : "James",
"LastName" : "Smith",
"UserNumber" : "1002",
"UserType" : "Contractor",
"Country" : "61",
"Mobile" : "0414736887",
"Email" : "james@gmail.com",
"Site" : "Sydney",
"Team" : "Manufacturing",
"Groups" : ["Finance", "Management"],
"CardNumber" : "",
"Expiry" : "2020-12-31",
"Role" : "Manager"
}
]
}
Your JSON data can optionally contain a second top level element called Lists, which is an array of global lookup list entries. For example, you might return a list of projects and a list of work types. These lists can then be presented in the NoahFace App to allow users to select the project they are working on or the type of work they are performing. Each list entry can contain the following elements:
The first three elements (ie: List, Name, and Value) are mandatory for each list entry, and the remaining elements are optional.
The following is an example of the JSON that your API should return:
{
"Users" : [
....
],
"Lists" : [
{"List" : 1, "Value" : "100", "Name" : "Airport"},
{"List" : 1, "Value" : "101", "Name" : "Tower One"},
{"List" : 1, "Value" : "102", "Name" : "Wharf"},
{"List" : 2, "Value" : "200", "Name" : "Design"},
{"List" : 2, "Value" : "201", "Name" : "Construction"},
{"List" : 2, "Value" : "202", "Name" : "Maintenance"}
]
}
To enable user synchronization, simply add a synchronization instance, select 'Custom' as the type of synchronization, and specifying your API endpoint details (see example below).
NoahFace can synchronously update an individual user while they are recording an event (eg: while they are attempting to clock in for work). This is used, for example, to ensure that a user's expiry date is up to date before denying them access based on their currently recorded expiry date.
To support individual user synchronization, your user list url should accept an optional query parameter of syncguid, and when this query parameter is present, it should only return the user with that guid. For example:
{
"Users" : [
{
"SyncGuid" : "12345",
"FirstName" : "Samara",
"LastName" : "Smith",
"Expiry" : "2020-12-31"
}
]
}
Supporting individual user synchronization is entirely optional; if you don't need this feature, you do not need to support this query parameter.
It is critical that you return your list of users quickly (ie: ideally sub-second, and a maximum of 10 seconds in all circumstances). If you need to make many API calls to a 3rd party system to collect your user data, you should prefetch this data in the background (storing it locally), and your API should simply return the prefetched data to NoahFace.
Your API should return an HTTP response code of 200 on success, and an appropriate response code on failure (eg: 404 if the specified User list url is incorrect, 401 if access was unauthorised, etc).
Your implementation of the User Synchronization APIs should enforce one of the following authentication methods:
If your implementation of the NoahFace APIs is being designed to service multiple organizations, you should use different credentials for each organization so you can access the appropriate data in your IT system or application.
Regardless of which authentication method you choose, all API calls are over HTTPS so your data and credentials are encrypted (TLS 1.2 and later is supported).