Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated using 4PSA automated script
Excerpt

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

Table of Contents
maxLevel3
excludeApps Using This, Quick Examples, Need Help?

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:

Panel
borderColor#DADADA
bgColor#FFFFFF
borderWidth1
titleBGColor#F0F0F0
borderStyledashed
titleModel
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>
Panel
borderColor#DADADA
bgColor#FFFFFF
borderWidth1
titleBGColor#F0F0F0
borderStyledashed
titleExample
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.

Anchor
urifragment
urifragment

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:

Localtab Group
Localtab
activetrue
titleDelete a PhoneCallEvent

This example deletes a phone call event assigned to extension 0003*210. The request is made by an App on behalf of a User.

Anchor
example1
example1

Code Block
titleHTTP 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:

Code Block
titleHTTP Response
HTTP/1.1 200 OK
...
[
 { "id": "NqeyDRqo4FtabmFj8gNWq3hsiGNYyq"  }
]
Localtab
titleDelete Multiple PhoneCallEvents

This example deletes all phone call events assigned to extension 0003*210. The request is made by an App on behalf of a User.

Anchor
example2
example2

Code Block
titleHTTP 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:

Code Block
titleHTTP Response
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.