TABLE OF CONTENTS

Grant access to External APIs

Before one can activate enduser tickets for a specific user, this needs to be allowed on the organisation configuration level first. This can be done in Organisation configuration.

  1. Login to org configuration in Admin view mode
  2. Choose Services from the top menu
  3. Choose External API authorization
  4. You can grant access in three levels
    • Organization level
    • User Group level
    • User level
  5. In this example we grant access to specific user so search for the username and choose the correct user
  6. Once you have the correct user selected, you can grant specific enduser APIs. In this example the user receives access to all APIs as show in following screenshot

Create enduser API ticket for user

Enduser API ticket can be generated from Onecloud portal when logged in as user.

  1. Make sure that user is logged and User view mode is active if admin access is also available
  2. Choose Home
  3. Choose Tickets
  4. Add the Name and choose the APIs that you want to get access to. This example grants Queue statistics and SMS APIs for my user
  5. Once the API ticket has been created, the ticket should show up at Granted tickets box

Test Enduser API

  1. Enduser API documentation can be found from https://www.setera.com/officeplus/enduser/
  2. Documentation is protected with the following credentials:
    • Username: api
    • Password: documentation
  3. Locate Authorize icon and insert your API token and click Authorize
  4. Locate the queue/statistics API endpoint and click Try it out button.
  5. Fill in the mandatory data for domain and user input fields. (I'm using setera.com for domain and aki.huolman for user)
  6. Click the Execute button and you should receive information below in the Responses section. I've selected application/json as the payload format which is returned back to me from the API.

    Swagger also generates executable CURL command if curl is the preferred way to communicate with the API
    curl -X GET "https://onecloud.setera.com/api/queue/statistics/setera.com/aki.huolman?t=970.VDpkYjAIn0T5kliNzcxOWU0" -H "accept: application/json"
  7. Example response
{
"queue-statistics": {
"queue": [{
"@domain": "setera.com",
"@id": "5732",
"@name": "Support/Orders/Billing",
"@number": "+358201500800",
"answeredCallsForPeriod": "10",
"answeredCallsLast24h": "20",
"availableAgents": "1",
"averageWait": "0",
"droppedCallsForPeriod": "0",
"droppedCallsLast24h": "1",
"lastWait": "2",
"loggedInAgents": "4",
"longestWaiting": "0",
"current-agent-presence": {
"activity": {
"@count": "5",
"@name": "Available"
}
},
"queueLength": "0",
"totalCallsForPeriod": "10",
"totalCallsLast24h": "20"
}]
}
}