Request Structure
This topic introduces the structure of API requests, including request method, request URL, and communication protocol.
All the API requests use POST method.
See the following API request of Log in a Queue as a request example.
POST /api/v1.1.0/queue/add_dynamicagent?token={token} HTTP/1.1 Content-Type:application/json; charset=utf-8 Host: 192.168.5.150 { "queueid": "6700", "extid": "1000", "password": "6700123" }
POSTspecifies the request method./api/v1.1.0/queue/add_dynamicagent?token={token}is the endpoint URI of Log in a Queue.Content-Type:application/json; charset=utf-8is the API contents format.Hostis the IP address of Yeastar S-Series VoIP PBX.queueid、extid、passwordare the request parameters of Log in a Queue.
Request URL
The format of API request URL:
{base_url}{endpoint}
- Base URL
Set the API base URL according to the web access settings on your PBX.
If the web access protocol is HTTPS, use the following base URL:
https://{pbx_ip}:{https_port}If the web access protocol is HTTP, use the following base URL:
http://{pbx_ip}:{http_port}
- Endpoint
An endpoint is a path for a specific API interface.
See the overview of API endpoints.