Jump to: navigation, search

What are operations?

The typical core requests in a REST API include create, read, update, and delete; however, there are several areas of the Web Services API where the design departs from these core requests on resources.

Many of the APIs that make up the Web Services API have differing requests for a particular resource that must be processed asynchronously. To accommodate these requests, Web Services API introduces the notion of an "operation". If a Web Services resource supports this concept, then you can send a POST request with the name of the operation to be executed, along with any supporting parameters it requires.

You'll find that operations are implemented across the Web Services API for a variety of resources.

Consider the Voice API, where the majority of the traditional voice functionality, such as agent state manipulation and call control, is implemented in this manner. For example, the call resource supports operations such as Dial, Answer, and Hangup, while the device resource supports operations such as Ready and NotReady.

If an operation is required for a particular request, it's listed in the "Parameters" table on the request page:

Parameter Value
operationName Answer

To use an operation, just include the operation name in the POST body:

POST api/v2/me/calls/012PUFMMS0ASNAK48O7GK2LAES00000C
{
  "operationName": "Answer"
}
This page was last edited on February 15, 2024, at 19:11.
Comments or questions about this documentation? Contact us for support!