Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

For easy viewing and testing of REST API resources, there is an interactive API browser, which is located at: https://<address of your domain api>/api/ver1.0/client_api_explorer/<your api domain address>.
The address of your api domain is the address of your domain in the system specified in the PDF file with the PBX data sent to you by email.

The API Browser is an interactive page that shows all available REST API resources, their methods, and the input parameters and response fields of the methods.

Table of Contents
maxLevel3

Authorization in the interactive API browser

To make API requests through an interactive browser, you need a registered trusted application.

View file
name%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%BE%D1%82%202016-06-29%2012_44_11.png_version=1&modificationDate=1467192396791&cacheVersion=1&api=v2&width=517&height=400

Image Added

In the authentication section, in the client_id and client_secret fields you must enter the Application ID and Application Secret values obtained during application registration, respectively. Next, click on the "Try it out!". If the application data is correct, the response returns an access token (access_token), which can be used to make requests through the interactive browser on behalf of your application.

View file
name%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%BE%D1%82%202016-06-29%2012_44_59.png_version=1&modificationDate=1467192396508&cacheVersion=1&api=v2&width=428&height=400

Image Added

The resulting access token should be entered in the "Access Token Field" at the top of the page and saved by clicking the "Set Token" button.

View file
name%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%BE%D1%82%202016-06-29%2012_46_22.png_version=1&modificationDate=1467192396213&cacheVersion=1&api=v2&width=255&height=250

Image Added

After saving the token via the interactive browser, you can make requests to the REST API.

Working in the interactive API browser

The screenshot below shows an example of a request to get a list of internal numbers of an authorized client:

View file
name%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%BE%D1%82%202016-06-29%2012_47_06.png_version=1&modificationDate=1467192395857&cacheVersion=1&api=v2&width=399&height=400

Image Added

Example of a request to get a list of conversation records of the current client:

View file
name%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%20%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%20%D0%BE%D1%82%202016-06-29%2012_47_48.png_version=2&modificationDate=1467192488904&cacheVersion=1&api=v2&width=413&height=400

In case of errors in writing a request from the code, it is a good practice to use an interactive browser for self-checking. For example, if it is not clear what exactly was passed incorrectly in the request body, you need to use the interactive browser for self-checking as follows:

View file
nameimage2019-11-18_13-56-33.png_version=1&modificationDate=1574074594441&cacheVersion=1&api=v2&width=703&height=250

When you click on the Model Schema array, the request body is automatically generated. You will only need to remove the extra query parameters and fill in the necessary parameters with values (the last parameter excludes enumeration and should not end with a comma).

← Creating and authorizing applications Getting files Authorizing PBX ApplicationsGetting Files via HTTP basic authentication Basic Authentication