Query Configuration Options for Auto Provisioning

Query the information of configuration options required when adding IP phone(s) for auto provisioning.

Request URL

GET {base_url}/{api_path}/auto_provisioning/compatibility?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
menu Yes String The configuration option that you want to query.
Valid value:
  • phone_vendor: Phone vendor
  • phone_model: Phone model
  • phone_template: Available provisioning template of the phone
  • autop_method: Supported auto provisioning method of the phone
vendor No String Phone vendor.
Note: This parameter is required when querying phone_model and autop_method.
model No String Phone model.
Note: This parameter is required when querying phone_template and autop_method.

Response parameters

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
data Array<Option_Info> The information of the available options.
Option_Info
Table 3.
Parameter Type Description
text String The name of the available option.
Note: This parameter returns the provisioning link when querying auto provisioning method.
value String The value of the available option.
type String The type of the available option.

Examples

Query supported phone vendors
Query the information of available phone vendors.
Request example
GET /openapi/v1.0/auto_provisioning/compatibility?access_token=Gm4Vj4CUq2GsfCprykiv0mE0KHNc52HV&menu=phone_vendor HTTP/1.1
Host: 192.168.5.150:8088
User-Agent: OpenAPI
Response example
HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "data": [
        {
            "text": "Alcatel-Lucent Enterprise",    //Phone vendor name
            "value": "Ale",                         //Phone vendor parameter value
            "type": "Deskphone"                     //Phone type
        },
        ... ...
       {
            "text": "Yealink",
            "value": "Yealink",
            "type": "Deskphone"
        }
    ]
}
Query supported phone models of a specific phone vendor
Query the information of the supported Yealink phones.
Request example
GET /openapi/v1.0/auto_provisioning/compatibility?access_token=fy59UJHFHJvOMthVlQM4z9sq6gFHcZVn&menu=phone_model&vendor=Yealink HTTP/1.1
Host: 192.168.5.150:8088
User-Agent: OpenAPI
Response example
HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "data": [
        {
            "text": "CP920",               //Phone model name
            "value": "CP920",              //Phone model parameter value
            "type": "Conferencephone"      //Phone type
        },
         ... ...
        {
            "text": "SIP-W80DM",
            "value": "SIP-W80DM",
            "type": "DECT"
        },
         ... ...
        {
            "text": "VP59",
            "value": "VP59",
            "type": "Deskphone"
        }
    ]
}
Query available provisioning template for a specific phone model
Query the information of the provisioning template for Yeastar phone CP920.
Request example
GET /openapi/v1.0/auto_provisioning/compatibility?access_token=fy59UJHFHJvOMthVlQM4z9sq6gFHcZVn&menu=phone_template&model=CP920 HTTP/1.1
Host: 192.168.5.150:8088
User-Agent: OpenAPI
Response example
HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "data": [
        {
            "text": "YSDP_YealinkCP",   //Template name
            "value": "24"               //The unique ID of the template
        }
    ]
}
Query supported auto provisioning method of a specific phone model
Query the information of the provisioning method for Yealink phone CP920.
Request example
GET /openapi/v1.0/auto_provisioning/compatibility?access_token=fy59UJHFHJvOMthVlQM4z9sq6gFHcZVn&menu=autop_method&vendor=Yealink&model=CP920 HTTP/1.1
Host: 192.168.5.150:8088
User-Agent: OpenAPI
Response example
HTTP/1.1 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS",
    "data": [
        {
            "text": "http://192.168.5.150:7778/api/autoprovision/H70R1oiPnlJCnp6L",  //provisioning link
            "value": "pnp"                                                           //provisioning method
        },
        {
            "text": "http://192.168.5.150:7778/api/autoprovision/H70R1oiPnlJCnp6L",
            "value": "dhcp"
        },
        {
            "text": "https://112.57.75.183:18207/api/autoprovision/H70R1oiPnlJCnp6L",
            "value": "rps",
            "type": "full"
        },
        {
            "text": "https://yeastardocs.ras.yeastar.com:443/api/autoprovision/H70R1oiPnlJCnp6L",
            "value": "rps_fqdn",
            "type": "full"
        }
    ]
}