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:
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>
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:
Name | Type | Required | Description |
---|---|---|---|
userId | Yes | Id of the User which owns the Extension for which the event is added. | |
extension | UAPI-Extension-Number | Yes | The number of the Extension for which the event is added. Allowed Extension types: Phone Terminal , Queue , Conference , and IVR .Cannot be set to @self. |
eventType | Number | No | The type of the PhoneCallEvent. |
eventId | Object-Id | No | The 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:
Name | Type | Description |
---|---|---|
count | Number | The page size of a collection. |
filterBy | String | Records can be filtered by all fields of the PhoneCallEvent . |
filterValue | String | The value to filter by. |
startIndex | Number | The start index of the paged collection. Maximum possible value is 5000. Default: 0 |
Custom Request Parameters
They also support the custom parameter:
Name | Type | Description |
---|---|---|
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 Code | Description |
---|---|
200 | The list of phone call events is returned. |
204 | There are no phone call events to be returned. |
Failure
When it fails, the request returns the following error codes:
HTTP Code | Code | Description |
---|---|---|
400 | fields_invalid | Value 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). |
400 | count_invalid | Value supplied in count parameter is missing or invalid. The parameter must be set to a numeric value lower than 5000. |
400 | filterby_invalid | Value supplied in filterBy parameter is missing or invalid. The parameter must be set to the name of a PhoneCallEvent field. |
400 | filterop_invalid | Value supplied in filterOp parameter is missing or invalid. The parameter must be set to one of the values: contains, equals, starts with or present. |
400 | filtervalue_invalid | Value supplied in filterValue parameter is missing or invalid. The parameter must be set to a string value. |
400 | sortorder_invalid | Value supplied in sortOrder parameter is missing or invalid. The parameter must be set to one of the values: ascending or descending. |
400 | startindex_invalid | Value 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. |
400 | pce_access_denied | You are not allowed to manage the phone call events. |
400 | pce_id_invalid | Value 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.
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/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"} } ] }
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.