Getting agent details

This resource returns details related to the specified agent, most commonly used to get the GUID of the current or previous call.

Request Scheme

HTTPS

Request URI

GET v{v#}/{accountKey}/agents/{agentId}

Request Headers

Authorization (required)

This header requires an OAuth bearer token. For information on the bearer token, see How to use your bearer access token.

Accept (required)

application/json

Indicates that the media type required from the server is JavaScript Object Notation (JSON)

Examples


Most URLs in the example code use the following values:

  • ***. To access the API for your region, replace *** with the correct subdomain for your region:
  • a1b2c3d4e5. The value represents the Vonage Contact Center account on which the API request is run. To run the API request on your account data, you must replace a1b2c3d4e5, where used, with your account's API key. For example, if your API key is mtovfiliti3, use mtovfiliti3 in place of a1b2c3d4e5.
  • <ACCESS_TOKEN>. The value represents a bearer access token which you must use to validate every request. Replace <ACCESS_TOKEN> where used with your bearer access token. For information about getting a bearer access token, see Getting a bearer access token.

Determine the call GUID for agent 462's previous call

curl -X GET "https://***.newvoicemedia.com/v0/a1b2c3d4e5/agents/462" -H "Authorization: Bearer <ACCESS_TOKEN>" -H "Accept: application/json"

Determine the call GUID for agent 462's current call

curl -X GET "https://***.newvoicemedia.com/v0/a1b2c3d4e5/agents/462" -H "Authorization: Bearer <ACCESS_TOKEN>" -H "Accept: application/json"

Example: Successful response


Most URLs in the example code use the following values:

  • ***. To access the API for your region, replace *** with the correct subdomain for your region:
  • a1b2c3d4e5. The value represents the Vonage Contact Center account on which the API request is run. To run the API request on your account data, you must replace a1b2c3d4e5, where used, with your account's API key. For example, if your API key is mtovfiliti3, use mtovfiliti3 in place of a1b2c3d4e5.
  • <ACCESS_TOKEN>. The value represents a bearer access token which you must use to validate every request. Replace <ACCESS_TOKEN> where used with your bearer access token. For information about getting a bearer access token, see Getting a bearer access token.

Returns HTTP Status Code 200 OK.

{
id: "462"
links: [
{
href: https://***.newvoicemedia.com/V0/a1b2c3d4e5/Agents/462
rel: "_self"
}
{
href: https://***.newvoicemedia.com/V0/a1b2c3d4e5/Calls/01461e37-deb9-b2bf-240d-032be5fe917e
rel: "currentCall"
}
]
currentCallGuid: "01461e37-deb9-b2bf-240d-032be5fe917e"
}