Page tree

This method allows listing existing phone call events in particular contexts such as User, Organization or global.

Request/Response model

Overview

Use this request to list phone call events which are assigned to an Extension.

If successful, the Service returns a collection of PhoneCallEvent resources.

The request is made by an App that is registered to a User account.

To list existing PhoneCallEvents, issue a HTTP GET request:

Model
HTTP-Method       = "GET"
URI-Fragment      = "/uapi/extensions/" User-Id "/" Extension-Number "/phoneCallEvents" ["/" Event-Type ["/" Event-Id]]
Query-Parameters  = Get-PhoneCallEvent-Request-Parameters
Request-Payload   = null

Return-Object     = Collection<PhoneCallEvent>
Example
GET /uapi/extensions/@me/0003*210/phoneCallEvents/0/NqeyDRqo4FtabmFj8gNWq3hsiGNYyq HTTP/1.1
HOST uapi.voipnow.com
Authorization: Bearer token
Content Type: application/json

Request

This section describes how to format the request to the service.

URI fragment

The following parameters must be sent in the URI fragment:

NameTypeRequiredDescription

userId

User-Id

Yes

Id of the User which owns the Extension for which the event is added.
It can take one of the following values:
@me - refers to the authenticated User.
@viewer - also refers to the authenticated User.
@owner - refers to the User that owns the Extension used to make the phone call.
User-Id - refers to the unique identifier of the User.
Default: @me

extension UAPI-Extension-Number YesThe number of the Extension for which the event is added.
Allowed Extension types: Phone Terminal, Queue, Conference, and IVR.
Cannot be set to @self.
eventTypeNumberNo

The type of the PhoneCallEvent.
If missing events for all the types are returned.
Must be given if eventId is sent.

eventIdObject-IdNoThe Id of an existing PhoneCallEvent.

Get PhoneCallEvent request parameters

Restriction to Standard Request Parameters

All requests to list PhoneCallEvents support the Standard-Request-Parameters with the following restrictions:

NameTypeDescription
countNumber

The page size of a collection.
Maximum possible value is 5000.
Default: 20 entries

filterBy

String

Records can be filtered by all fields of the PhoneCallEvent .

filterValueStringThe value to filter by.
startIndexNumberThe start index of the paged collection.
Maximum possible value is 5000.
Default: 0
Custom Request Parameters

They also support the custom parameter:

NameTypeDescription

fields

Array<String>

An array of Phone Call Event field names. For standard values, please see the PhoneCallEvent resource.

Response

Success

If successful, the request returns collection of PhoneCallEvent resources and the following HTTP statuses:

HTTP CodeDescription
200The list of phone call events is returned.
204There are no phone call events to be returned.

Failure

When it fails, the request returns the following error codes:

HTTP CodeCodeDescription
400fields_invalidValue supplied in fields parameter is missing or invalid. The parameter must be set to a value of consisting of the name of the possible PhoneCallEvent fields separated by a comma (e.g. extension, id, answered).
400count_invalidValue supplied in count parameter is missing or invalid. The parameter must be set to a numeric value lower than 5000.
400filterby_invalidValue supplied in filterBy parameter is missing or invalid. The parameter must be set to the name of a PhoneCallEvent field.
400filterop_invalidValue supplied in filterOp parameter is missing or invalid. The parameter must be set to one of the values: contains, equals, starts with or present.
400filtervalue_invalidValue supplied in filterValue parameter is missing or invalid. The parameter must be set to a string value.
400sortorder_invalidValue supplied in sortOrder parameter is missing or invalid. The parameter must be set to one of the values: ascending or descending.
400startindex_invalidValue supplied in startIndex parameter is missing or invalid. The parameter must be set to a numeric value, higher or equal with 0 and lower than 5000.
400pce_access_deniedYou are not allowed to manage the phone call events.
400pce_id_invalidValue supplied in the URI-Fragment as eventId is invalid. The parameter must reference an existing phone call event.

Examples

Below you can find an example that will help you understand the request and the response.

This example lists the properties of the PhoneCallEvent with the Id MyPhoneCallId assigned to the extension 0003*210. The request is made by an App on behalf of a User.

HTTP Request
GET /uapi/extensions/@me/0003*210/phoneCallEvents/0/NqeyDRqo4FtabmFj8gNWq3hsiGNYyq HTTP/1.1
HOST uapi.voipnow.com
Authorization: Bearer token
Content Type: application/json

Assuming that the request has been successful, the Service sends the following answer:

HTTP Response
HTTP/1.1 200 OK
...
 
{
 "startIndex":0,
 "totalResults":1,
 "itemsPerPage":5,
 "filtered":true,
 "sorted":true,
 "entry":[
  {
   "type": "0",
   "id": "NqeyDRqo4FtabmFj8gNWq3hsiGNYyq",
   "method": "0",
   "note": "My phone call event is awesome",
   "url": "http://myevent.com/SaveMyPhoneCallDetails",
   "status": "1",
   "modified": "2012-07-10T18:16:12+03:00",
   "links": {"self":"https://x.x.x.x/uapi/extensions/@me/0003*210/phoneCallEvents/0/NqeyDRqo4FtabmFj8gNWq3hsiGNYyq"}
  }
 ]
}
#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))
  • No labels

Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.