The GetSID API lets you retrieve the Security Identifier (SID) of end users.
Because triggering a campaign via the Engage API requires the SID of the targeted users as a parameter, the GetSID API is specially useful for automatically triggering campaigns from environments where the SID of users is not readily available.
Calling the GetSID API
The Portal exposes the Engage API as a REST API under the URL:
In the URL, substitute [portal.company.com] for the external DNS name of your Portal.
To get the SID of an end user, submit a POST request to the URL of the API (note that GET requests are not supported, returning a 404 error) with a JSON payload encoded in UTF-8 that contains two parameters:
Name of the field that serves to retrieve the user. Look for users either by:
List of values to search on the specified field (currently limited to 1 element).
Example of the JSON payload of a request to the API of Engage:
"fieldValues" : ["foobarUser@example.com"]
Send your POST request to the GetSID API with the following HTTP headers to specify JSON content and basic authentication:
Authorization: Basic [base-64(user:password)]
[base-64(user:password)] with the credentials (in base-64 encoding) of a Nexthink user who has the right to access the API for triggering campaigns.
In response to a request, the Portal may send one of the following answers if something goes wrong:
Bad request 400
Internal server error 500