Page tree

This method allows deleting a phone call event in particular contexts such as User, Organization or global.

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:

Model
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>
Example
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:

NameTypeRequiredDescription

userId

  User-Id

Yes

Id of the User which owns the Extension for which the event is assigned.
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.
eventTypeNumberNoThe type of the PhoneCallEvent.
eventIdObject-IdNoThe 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 CodeDescription
200The Id of the deleted phone call event.
204There is not Id to be returned.

Failure

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

HTTP CodeCodeDescription
400extension_invalidValue 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.
400pce_id_invalidValue supplied in the URI-Fragment as eventId is invalid. The parameter must reference an existing phone call event.
400pce_access_deniedYou 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.

HTTP Request
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 Response
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.

HTTP Request
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 Response
HTTP/1.1 200 OK
...
[
 { "id": "NqeyDRqo4FtabmFj8gNWq3hsiGNYyq"  },
 { "id": "Asds2qw2frtabmFj8gNWq3hsiGNYyq"  },
 { "id": "GOp2s68AfgtabmFj8gNWq3hsiGNYyq"  } 
]
#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.