Supervisor and ACW Agent Mapping
After creating the Supervisor user in the X‑Platform, the ACW Agents are mapped to the Supervisor using this Supervisor-Agent Mapping API. This API is called during each Supervisor Agent mapping action performed by an Administrator in the User Management page.
Endpoint
Method: PUT
URL: https://api.<region>.cloud.uniphore.com/ocms/v2/configuration/sup-agent-map/{supervisor-userId}/
Request
curl --location --request PUT 'https://api.<region>.cloud.uniphore.com/ocms/v2/configuration/sup-agent-map/6/?tenant-id=95322e22-a024-4adb-accc-e3ff2b885a20&environment=dev' \ --header 'x-username: auth0|641c05f470a8d75cf095a382' \ --header 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6IkxYejBQYWVFRERuS3dfcjdkU2s2UyJ9.eyJodHRwczovL2FwaS51bmlwaG9yZS5jb20vZW1haWxfaWQiOiJhcGl0ZXN0aW5nLXVhc3Npc3RhZG1pbl8xMDAxQG10bWUxLmNvbSIsImh0dHBzOi8vYXBpLnVuaXBob3JlLmNvbS9hdXRoMF9uYW1lIjoiQVBJVGVzdGluZy11YXNzaXN0QWRtaW5fMTAwMSIsImh0dHBzOi8vYXBpLnVuaXBob3JlLmNvbS91c2VyX2lkIjoiYXV0aDB8NjQxYzA1ZjQ3MGE4ZDc1Y2YwOTVhMzgyIiwiaHR0cHM6Ly9hcGkudW5pcGhvcmUuY29tL3JvbGVzIjpbInVfYWRtaW5pc3RyYXRvciJdLCJodHRwczovL2FwaS51bmlwaG9yZS5jb20vdXNlcl9tZXRhZGF0YSI6e30sImh0dHBzOi8vYXBpLnVuaXBob3JlLmNvbS90ZW5hbnQiOiI5NTMyMmUyMi1hMDI0LTRhZGItYWNjYy1lM2ZmMmI4ODVhMjAiLCJpc3MiOiJodHRwczovL2Rldi1nMmo1bXUyei51cy5hdXRoMC5jb20vIiwic3ViIjoiYXV0aDB8NjQxYzA1ZjQ3MGE4ZDc1Y2YwOTVhMzgyIiwiYXVkIjpbInVhc3Npc3QudW5pcGhvcmUuY29tIiwiaHR0cHM6Ly9kZXYtZzJqNW11MnoudXMuYXV0aDAuY29tL3VzZXJpbmZvIl0sImlhdCI6MTY4MDAxMjY5MCwiZXhwIjoxNjgwMDk5MDkwLCJhenAiOiJEamNweG9JZGREZnVmSEZkUU41Qm40aVg2M1p4QWt1ZiIsInNjb3BlIjoib3BlbmlkIiwib3JnX2lkIjoib3JnXzZFVFVEdnF0Z3lTUEtRTXgifQ.seCnZHaqrV6ftE-oySKfzI-Hzl4AZa4RU3Ps_sG6h73h3usXgRzhNDsOndCcKCfZRRylpbfTnYXbFa2wtVKiYGcVGb2jDraW8tCqFD6vjmg8w6kon--lyIZfFnycTYp1I57Ns77tNYqPrRCUVuDxWdN82Rn1gDPQP-3eCsVtApSTllXt_WfnnEd5_RWVF3heeBeGZS809B8aR1RriyxK9e09aeEbfqA0l4tmEPvAasWYg1RXmI-HMMfyaTaa3WLNDDL4Kqt17E-svrwxvcjAnwXE_Z6avhJ84mzPbLCGEbEVI0GLsTBmTdRIuY769-XwV3u67f_8fihNgryUXmWrng' \ --header 'Content-Type: application/json' \ --data '{ "agents": [ 10 ]}'
Header Parameters
Parameters Name | Description | Values | Example |
---|---|---|---|
X-Username | Logged-in username should be sent with all client requests. | String | johnny.kingston |
Authorization | Access token should be sent with all client requests. The access token with all client request helps the platform services to get the user information from auth0. ImportantYou should pass user authorization token generated from auth0 for Admin user. | String | Bearer <token> |
Path Parameter
Parameter Name | Mandatory / Optional | Type | Description |
---|---|---|---|
supervisor-userId | Mandatory | String | User ID of the Supervisor |
Query Parameter
Parameter Name | Mandatory / Optional | Type | Description |
---|---|---|---|
tenant-id | Mandatory | String | Tenant ID for which users are being mapped. |
environment | Mandatory | String | Operating environment type. Three out-of-the-box environments are provided for each account:
|
Request Body
Body | Mandatory / Optional | Type | Description |
---|---|---|---|
agentList | Mandatory | JSON | A list of ACW agent IDs who need to be mapped with a specific Supervisor. Refer to this API 'Get User ID by User Name' to get the agent IDs which are stored in the database. Example: { "agents": [ 8, 9, 10, 11 ] } |
Response and Error Codes
Code | Response |
---|---|
200 | Agents are successfully mapped with the specific Supervisor. |
401 | Authentication failed. This response code will be shown if any of the following scenarios occur:
|
403 | Forbidden. If you use the access token of other role, this response code will be shown. |
500 | Internal Server Error. |