Request Structure

This topic describes the structure of YCM API requests, including request header, request method, and request URL.

Note: The YCM API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

Request example

A request example is shown as below, which is a request of Query All the Cloud PBXs.
GET /dm/open_api/v2/cloud_pbx/instances HTTP/1.1
Authorization: Bearer {access_token}
  • GET specifies the request method.
  • /dm/open_api/v2/cloud_pbx/instances is the target API endpoint of querying all the P-Series Cloud PBXs.
  • HTTP/1.1 is the Hypertext Transfer Protocol.
  • specifies the YCM domain.
  • Authorization: Bearer {access_token} is used to authenticate the request.

Authenticate requests

To request an API endpoint, you must add the access token to the Authorization field in the HTTP header. In this way, the authorization server allows you to make REST API requests.

Authorization Format

Authorization: Bearer {access_token}
Authorization Example
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NzM0OSwicmVmcmVzaFZlcnNpb24iOjE2Mzg5NDM5MTJ9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjM4OTQ1NzEyLCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiJhNzgwMTA3Yi0wOGE1LTRmM2YtODY4Yi04NjFmMjUxOWUxMzAiLCJjbGllbnRfaWQiOiJrcDl5eW50bXVlc3VrNWpvV3ZNa1RiQ0J4cU82TEtSaCJ9.iX7FMOQQKuiKLCNO8wBtnKz6n3Ydv-OFtcut3j8JV-o

Request methods

YCM API supports the following request methods:

HTTP method Usage
GET Query information.
POST Add an object or execute specific operations.
PUT Update or modify configurations.
DELETE Delete specific objects.

Request URL

The request URL format is as follows:
All URLs referenced in the documentation have the following base URL:
Endpoint indicates the specific address of API request.
  • Endpoint format of authorization requests:
  • Endpoint format of other requests:
Refer to the API Interface Summary List for all available API endpoints on Yeastar Central Management.