Excerpt |
---|
This method allows listing of PhoneCalls resources in particular contexts such as User, Organization or global. |
Table of Contents maxLevel 3 exclude Apps Using This, Quick Examples, Need Help?
Request/Response model
Overview
This request lists the phone calls that are in the system at a given time.
If successful, it returns a collection of PhoneCall resources that contain details only about the phone call.
The request is made by an App that is registered to a User account.
To list a single phone call, you must send the PhoneCall Id to the Service. To list the phone calls in a desired context, issue a HTTP GET request.
Panel | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
HTTP-Method = "GET" URI-Fragment = "/uapi/phoneCalls/" User-Id "/" Extension-Number [ "/" PhoneCall-Id ] Query-Parameters = multiple Request-Payload = null Return-Object = Collection<PhoneCall> |
Panel | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
|
Request
This section describes how to format the request to the service.
URI fragment
Anchor | ||||
---|---|---|---|---|
|
The following parameters must be sent in the URI fragment.
Name | Type | Required | Description |
---|---|---|---|
userId | Yes | Id of the User that owns the an Extension involved in the call. | |
extension | Yes | Number of the extension involved in the call. | |
phoneCallId | No | Id of a PhoneCall resource that must be updated. |
Query parameters
Anchor | ||||
---|---|---|---|---|
|
All requests to list phone calls support the Standard-Request-Parameters and the custom fields parameter. All parameters are optional.
Name | Type | Inheritance | Restrictions | Description |
---|---|---|---|---|
count | Number | Standard | Maximum value 5000 | The page size of a collection. |
filterBy | String | Standard | Phone call id or published date | Records can be filtered by PhoneCall id and published date. |
filterValue | String | Standard | Phone call id or published date | The value to filter by. |
startIndex | Number | Standard | Maximum value 5000 | The start index of the paged collection. Default: 0 |
fields | Array<String> | Particular | None | An array of PhoneCall field names. For standard values, please see the PhoneCall resource. |
Response
Success
If successful, the request returns a collection of PhoneCalls and the following HTTP statuses:
HTTP Code | Description |
---|---|
200 | The list of phone calls is returned. |
204 | There are no phone calls 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 posible PhoneCall 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 PhoneCall 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, startsWith 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. |
Response body
If any 4xx or 5xx status codes is returned, the body contains the error response . When the request is successful and 200 OK is returned, the body contains a JSON representation.
Examples
Below you can find two examples that will help you understand the request and the response.
Localtab Group | ||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.