Request/Response model
Overview
Use this request to delete phone call events.
If successful, the Service returns the Id of the deleted PhoneCallEvent .
The request is made by an App that is registered to a User account.
To delete a particular phonecall event in a desired context, issue a HTTP DELETE request:
HTTP-Method = "DELETE"
URI-Fragment = "/uapi/extensions/" User-Id "/" Extension-Number "/phoneCallEvents" ["/"Event-Type ["/" Event-Id]]
Query-Parameters = null
Request-Payload = null
Return-Object = Array<PhoneCallEvent>
DELETE /uapi/extensions/@me/0003*210/phoneCallEvents/0/NqeyDRqo4FtabmFj8gNWq3hsiGNYyq HTTP/1.1
HOST uapi.voipnow.com
Content Type: application/json
Authorization: Bearer token
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 assigned. | |
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 the event being deleted. When missing all events for Extension are deleted. |
Response
Success
If successful, the Service returns the Id of the deleted PhoneCallEvent and the following HTTP statuses:
HTTP Code | Description |
---|---|
200 | The Id of the deleted phone call event. |
204 | There is not Id to be returned. |
Failure
When it fails, the request returns the following error codes:
HTTP Code | Code | Description |
---|---|---|
400 | extension_invalid | Value supplied in the URI-Fragment as extension is invalid. The parameter must reference the number of an existing extension or cannot be set to @self. |
400 | pce_id_invalid | Value supplied in the URI-Fragment as eventId is invalid. The parameter must reference an existing phone call event. |
400 | pce_access_denied | You are not allowed to manage the phone call events. |
Examples
Below you can find two examples that will help you understand the request and the response:
This example deletes a phone call event assigned to extension 0003*210. The request is made by an App on behalf of a User.
DELETE /uapi/extensions/@me/0003*210/phoneCallEvents/0/NqeyDRqo4FtabmFj8gNWq3hsiGNYyq HTTP/1.1 HOST uapi.voipnow.com Content Type: application/json Authorization: Bearer token
Assuming that the request has been successful, the Service sends the following answer:
HTTP/1.1 200 OK ... [ { "id": "NqeyDRqo4FtabmFj8gNWq3hsiGNYyq" } ]
This example deletes all phone call events assigned to extension 0003*210. The request is made by an App on behalf of a User.
DELETE /uapi/extensions/@me/0003*210/phoneCallEvents HOST uapi.voipnow.com Content Type: application/json Authorization: Bearer token
Assuming that the request has been successful, the Service sends the following answer:
HTTP/1.1 200 OK ... [ { "id": "NqeyDRqo4FtabmFj8gNWq3hsiGNYyq" }, { "id": "Asds2qw2frtabmFj8gNWq3hsiGNYyq" }, { "id": "GOp2s68AfgtabmFj8gNWq3hsiGNYyq" } ]
Except where otherwise noted, content in this space is licensed under a Creative Commons Attribution 4.0 International.