Query All the Provisioning Templates

Query the information of all the provisioning templates.

Request URL

GET {base_url}/dm/open_api/v1/provision_template

Request parameters

Headers
Parameter Required Type Description
Authorization Yes String Pass the access token in the header.

Format: Bearer {access_token}.

Response parameters

Parameter Type Description
data Array <Details> The detailed information.
requestId String The unique ID of the request, which can be used to quickly locate the request.
status String Request result:
  • Success
  • Failed
time Long The response time.
Note: The YCM API response returns a timestamp, you can convert the timestamp to detailed date and time as needed. For more information, see Convert Timestamp to Local Date and Time.
Details
Parameter Type Description
provisioningTemplateId Integer The unique ID of the provisioning template.
provisioningTemplateName String The name of the provisioning template.
provisioningTemplateCreateTime Long The create time of the provisioning template.
provisioningTemplateModifyTime Long The last modification time of the provisioning template.

Example

Request example

Query all the available provisioning templates.

GET /dm/open_api/v1/provision_template HTTP/1.1
Host: ycm.yeastar.com
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjdXN0b21Kd3RQYXlsb2FkSW5mbyI6eyJncmFudFR5cGUiOiJjbGllbnRfY3JlZGVudGlhbHMiLCJ5c0lkIjoxNzg5NjM2MDM5MDg1MDI1NjY0NSwicmVmcmVzaFZlcnNpb24iOjE2MzkwMTIwODh9LCJzY29wZSI6WyJhbGwiXSwiZXhwIjoxNjM5MDEzODg4LCJhdXRob3JpdGllcyI6WyJST0xFX0NMSUVOVCJdLCJqdGkiOiI3MGI3N2NiOC03MzZjLTQxODctYjM2Yy0xNjM0MzNlZWJjNWEiLCJjbGllbnRfaWQiOiJ5QXN4ZzdITkRFczNxSHprQk1aUU5Pblo2NTBPRUNNWSJ9._I0umqPvrMKnL1tlkragMjkuGWcYg1SAoTimfyKl7i8

Response example

HTTP/1.1 200 OK
{
    "data": [
        {
            "provisioningTemplateId": 306,
            "provisioningTemplateName": "Auto-Provision Template1",
            "provisioningTemplateCreateTime": 1683193984,
            "provisioningTemplateModifyTime": 1683351669
        },
        {
            "provisioningTemplateId": 3933,
            "provisioningTemplateName": "Auto-Provision Template2",
            "provisioningTemplateCreateTime": 1716863033,
            "provisioningTemplateModifyTime": 1716863033
        }
    ],
    "requestId": "4fa449382fa4c231c0cc83a83457286e",
    "status": "Success",
    "time": 1735535685
}