Get a Phone Template
Gets the complete data of a phone template, including the schema, configuration, and template content.
Request URL
GET {base_url}/uc-cautop/api/v1/phone-templates/{id}
Request parameters
- Headers
-
Parameter Required Type Description Authorization Yes String The access token used for authentication. Format: Bearer
{access_token}.x-tenant-code No String The tenant name. Note: You can obtain tenant name using the Query Tenants interface.
- Path parameters
-
Parameter Required Type Description id Yes String The ID of the template. You can obtain the ID using the Search Custom Phone Templates or Search Default Phone Templates interface.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
| code | String | The HTTP status code of the request.
|
| message | String | The status message of the request. |
| detailMessage | String | The detailed error information. When the request is successful, this parameter returns empty. |
| result | Object<Phone_Template> | The complete data of the template. |
- Phone_Template
-
Parameter Type Description id String The unique ID of the template. ucId String The UC ID of the visible scope. Compare this parameter with the uc_id of the current logged-in user to determine whether the template is created by the user. ownerType String The type of the owner:
admin: The administrator.reseller: The reseller.
ownerId String The ID of the owner, which determines the ownership together with ownerType. name String The name of the template, which is unique under the same administrator. templateType String The type of the template:
default: The system default template, which is synchronized from AppCenter.- basic / advanced / custom: The custom template types.
vendor String The identifier of the phone vendor. supportedModels Array<String> The list of phone models supported by the template. phoneType String The type of the device:
deskphone: The desk phone.conferencephone: The conference phone.dect: The DECT wireless phone.
baseTemplateId String The ID of the base template, which is returned only for custom templates and points to the default template that the custom template is derived from. schemaJson String The configuration schema in JSON Schema format, which describes the structure, field types, default values, and validation rules of configJson. configJson String The user configuration values in JSON format, which is returned only for custom templates. templateContent String The template content in Go template format. When rendering, the values in configJson are substituted into the template variables to generate the final configuration file. outputFilename String The output file name pattern, which supports variables such as {mac}. For example, {mac}.cfg. outputFormat String The format of the output file, such as cfg, xml, or conf. description String The description of the template. version String The version number of AppCenter, which is used to detect whether the template has updates. createdAt String The creation time, in Unix timestamp format (seconds). updatedAt String The last update time, in Unix timestamp format (seconds). linekeys Array<Linekey_Data> The linekey configurations of the template. numberOfHandsets Integer The number of handsets supported by the DECT phone. The value is 0 for non-DECT phones. ownerEmail String The email address of the owner primary account, which is used by the front end to display the owner field. configFile Object<File_Resource_Ref> The reference of the original mac.cfg file. templateFile Object<File_Resource_Ref> The reference of the original zip file. assignTo Object<Assign_To> The assignment scope of the template.
- Linekey_Data
-
Parameter Type Description model String The phone model that the linekey configuration applies to. content String The content of the linekey configuration.
- File_Resource_Ref
-
Parameter Type Description resourceId String The resource ID of the file. fileName String The name of the file. fileSize String The size of the file, in bytes.
- Assign_To
-
Parameter Type Description myTenantAssignment Object<My_Tenant_Assignment> The assignment to the own tenant. resellerAssignment Object<Reseller_Assignment> The assignment to resellers.
- My_Tenant_Assignment
-
Parameter Type Description enabled Boolean Whether the resource is assigned to the admin's own tenant.
true: Assigned.false: Not assigned.
scope String The assignment scope. This parameter takes effect only when the value of
enabledistrue.all: Visible to all tenants directly under the admin.specific: Visible only to the tenants specified bytenantCodes.
tenantCodes Array<String> The list of tenant codes. This parameter takes effect only when the value of scopeisspecific.
- Reseller_Assignment
-
Parameter Type Description enabled Boolean Whether the resource is assigned to resellers.
true: Assigned.false: Not assigned.
scope String The assignment scope. This parameter takes effect only when the value of
enabledistrue.all: Visible to all resellers except those specified byexcludedResellerIds.specific: Visible only to the resellers specified byresellers.
resellers Array<Reseller_Assign_Item> The list of reseller assignments. This parameter takes effect only when the value of scopeisspecific.excludedResellerIds Array<String> The list of excluded reseller IDs. This parameter takes effect only when the value of scopeisall.
- Reseller_Assign_Item
-
Parameter Type Description resellerId String The user ID of the reseller. tenantScope String The tenant visibility scope under the reseller.
all: Visible to all tenants under the reseller.specific: Visible only to the tenants specified bytenantCodes.
tenantCodes Array<String> The list of tenant codes. This parameter takes effect only when the value of tenantScopeisspecific.
Example
Request example
GET /uc-cautop/api/v1/phone-templates/371100695713411072 HTTP/1.1
Host: api.cn.novoone.com
Authorization: Bearer eyJraWQiOiJjbi0wLWtleS0xIiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJkaXN0cmlidXRvcmV4YW1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jint
Response example
HTTP/1.1 200 OK { "requestId": "9e7a0fb570bf63f1907dd4c62e64eaad", "code": "200", "message": "SUCCESS", "detailMessage": "", "result": { "id": "371100695713411072", "ucId": "3076913644890832896", "ownerType": "admin", "ownerId": "3076913644915998720", "name": "aitdoc-tpl-44500", "templateType": "basic", "vendor": "Fanvil", "supportedModels": [ "P103G", "P103P", "P104G", "P101P", "P103W" ], "phoneType": "deskphone", "baseTemplateId": "336400601608613888", "schemaJson": "(schema json omitted)", "configJson": "{}", "templateContent": "(template content omitted)", "outputFilename": "", "outputFormat": "cfg", "description": "ait-doc-test", "version": "1.0.4", "createdAt": "1792544500", "updatedAt": "1792544500", "linekeys": [ { "model": "P104G", "content": "<DSSKEY CONFIG MODULE>\r\n--Sidekey Config1--:\r\nFkey1 Type :{{.FunctionkeyType_1}}\r\nFkey1 Value :{{.FunctionkeyCodeValue_1}}{{.FunctionkeyValue_1}}@{{.FunctionkeyLine_1}}/{{.FunctionkeySubtype_1}}{{.FunctionkeyCodeExtension_1}}{{.FunctionkeyExtension_1}}\r\nFkey1 Title :{{.FunctionkeyLabel_1}}\r\nFkey2 Type :{{.FunctionkeyType_2}}\r\nFkey2 Value :{{.FunctionkeyCodeValue_2}}{{.FunctionkeyValue_2}}@{{.FunctionkeyLine_2}}/{{.FunctionkeySubtype_2}}{{.FunctionkeyCodeExtension_2}}{{.FunctionkeyExtension_2}}\r\nFkey2 Title :{{.FunctionkeyLabel_2}}\r\nFkey3 Type :{{.FunctionkeyType_3}}\r\nFkey3 Value :{{.FunctionkeyCodeValue_3}}{{.FunctionkeyValue_3}}@{{.FunctionkeyLine_3}}/{{.FunctionkeySubtype_3}}{{.FunctionkeyCodeExtension_3}}{{.FunctionkeyExtension_3}}\r\nFkey3 Title :{{.FunctionkeyLabel_3}}\r\nFkey4 Type :{{.FunctionkeyType_4}}\r\nFkey4 Value :{{.FunctionkeyCodeValue_4}}{{.FunctionkeyValue_4}}@{{.FunctionkeyLine_4}}/{{.FunctionkeySubtype_4}}{{.FunctionkeyCodeExtension_4}}{{.FunctionkeyExtension_4}}\r\nFkey4 Title :{{.FunctionkeyLabel_4}}\r\nFkey5 Type :{{.FunctionkeyType_5}}\r\nFkey5 Value :{{.FunctionkeyCodeValue_5}}{{.FunctionkeyValue_5}}@{{.FunctionkeyLine_5}}/{{.FunctionkeySubtype_5}}{{.FunctionkeyCodeExtension_5}}{{.FunctionkeyExtension_5}}\r\nFkey5 Title :{{.FunctionkeyLabel_5}}\r\nFkey6 Type :{{.FunctionkeyType_6}}\r\nFkey6 Value :{{.FunctionkeyCodeValue_6}}{{.FunctionkeyValue_6}}@{{.FunctionkeyLine_6}}/{{.FunctionkeySubtype_6}}{{.FunctionkeyCodeExtension_6}}{{.FunctionkeyExtension_6}}\r\nFkey6 Title :{{.FunctionkeyLabel_6}}\r\nFkey7 Type :{{.FunctionkeyType_7}}\r\nFkey7 Value :{{.FunctionkeyCodeValue_7}}{{.FunctionkeyValue_7}}@{{.FunctionkeyLine_7}}/{{.FunctionkeySubtype_7}}{{.FunctionkeyCodeExtension_7}}{{.FunctionkeyExtension_7}}\r\nFkey7 Title :{{.FunctionkeyLabel_7}}\r\n--Sidekey Config2--:\r\nFkey1 Type :{{.FunctionkeyType_8}}\r\nFkey1 Value :{{.FunctionkeyCodeValue_8}}{{.FunctionkeyValue_8}}@{{.FunctionkeyLine_8}}/{{.FunctionkeySubtype_8}}{{.FunctionkeyCodeExtension_8}}{{.FunctionkeyExtension_8}}\r\nFkey1 Title :{{.FunctionkeyLabel_8}}\r\nFkey2 Type :{{.FunctionkeyType_9}}\r\nFkey2 Value :{{.FunctionkeyCodeValue_9}}{{.FunctionkeyValue_9}}@{{.FunctionkeyLine_9}}/{{.FunctionkeySubtype_9}}{{.FunctionkeyCodeExtension_9}}{{.FunctionkeyExtension_9}}\r\nFkey2 Title :{{.FunctionkeyLabel_9}}\r\nFkey3 Type :{{.FunctionkeyType_10}}\r\nFkey3 Value :{{.FunctionkeyCodeValue_10}}{{.FunctionkeyValue_10}}@{{.FunctionkeyLine_10}}/{{.FunctionkeySubtype_10}}{{.FunctionkeyCodeExtension_10}}{{.FunctionkeyExtension_10}}\r\nFkey3 Title :{{.FunctionkeyLabel_10}}\r\nFkey4 Type :{{.FunctionkeyType_11}}\r\nFkey4 Value :{{.FunctionkeyCodeValue_11}}{{.FunctionkeyValue_11}}@{{.FunctionkeyLine_11}}/{{.FunctionkeySubtype_11}}{{.FunctionkeyCodeExtension_11}}{{.FunctionkeyExtension_11}}\r\nFkey4 Title :{{.FunctionkeyLabel_11}}\r\nFkey5 Type :{{.FunctionkeyType_12}}\r\nFkey5 Value :{{.FunctionkeyCodeValue_12}}{{.FunctionkeyValue_12}}@{{.FunctionkeyLine_12}}/{{.FunctionkeySubtype_12}}{{.FunctionkeyCodeExtension_12}}{{.FunctionkeyExtension_12}}\r\nFkey5 Title :{{.FunctionkeyLabel_12}}\r\nFkey6 Type :{{.FunctionkeyType_13}}\r\nFkey6 Value :{{.FunctionkeyCodeValue_13}}{{.FunctionkeyValue_13}}@{{.FunctionkeyLine_13}}/{{.FunctionkeySubtype_13}}{{.FunctionkeyCodeExtension_13}}{{.FunctionkeyExtension_13}}\r\nFkey6 Title :{{.FunctionkeyLabel_13}}\r\nFkey7 Type :{{.FunctionkeyType_14}}\r\nFkey7 Value :{{.FunctionkeyCodeValue_14}}{{.FunctionkeyValue_14}}@{{.FunctionkeyLine_14}}/{{.FunctionkeySubtype_14}}{{.FunctionkeyCodeExtension_14}}{{.FunctionkeyExtension_14}}\r\nFkey7 Title :{{.FunctionkeyLabel_14}}\r\n--Sidekey Config3--:\r\nFkey1 Type :{{.FunctionkeyType_15}}\r\nFkey1 Value :{{.FunctionkeyCodeValue_15}}{{.FunctionkeyValue_15}}@{{.FunctionkeyLine_15}}/{{.FunctionkeySubtype_15}}{{.FunctionkeyCodeExtension_15}}{{.FunctionkeyExtension_15}}\r\nFkey1 Title :{{.FunctionkeyLabel_15}}\r\nFkey2 Type :{{.FunctionkeyType_16}}\r\nFkey2 Value :{{.FunctionkeyCodeValue_16}}{{.FunctionkeyValue_16}}@{{.FunctionkeyLine_16}}/{{.FunctionkeySubtype_16}}{{.FunctionkeyCodeExtension_16}}{{.FunctionkeyExtension_16}}\r\nFkey2 Title :{{.FunctionkeyLabel_16}}\r\nFkey3 Type :{{.FunctionkeyType_17}}\r\nFkey3 Value :{{.FunctionkeyCodeValue_17}}{{.FunctionkeyValue_17}}@{{.FunctionkeyLine_17}}/{{.FunctionkeySubtype_17}}{{.FunctionkeyCodeExtension_17}}{{.FunctionkeyExtension_17}}\r\nFkey3 Title :{{.FunctionkeyLabel_17}}\r\nFkey4 Type :{{.FunctionkeyType_18}}\r\nFkey4 Value :{{.FunctionkeyCodeValue_18}}{{.FunctionkeyValue_18}}@{{.FunctionkeyLine_18}}/{{.FunctionkeySubtype_18}}{{.FunctionkeyCodeExtension_18}}{{.FunctionkeyExtension_18}}\r\nFkey4 Title :{{.FunctionkeyLabel_18}}\r\nFkey5 Type :{{.FunctionkeyType_19}}\r\nFkey5 Value :{{.FunctionkeyCodeValue_19}}{{.FunctionkeyValue_19}}@{{.FunctionkeyLine_19}}/{{.FunctionkeySubtype_19}}{{.FunctionkeyCodeExtension_19}}{{.FunctionkeyExtension_19}}\r\nFkey5 Title :{{.FunctionkeyLabel_19}}\r\nFkey6 Type :{{.FunctionkeyType_20}}\r\nFkey6 Value :{{.FunctionkeyCodeValue_20}}{{.FunctionkeyValue_20}}@{{.FunctionkeyLine_20}}/{{.FunctionkeySubtype_20}}{{.FunctionkeyCodeExtension_20}}{{.FunctionkeyExtension_20}}\r\nFkey6 Title :{{.FunctionkeyLabel_20}}\r\nFkey7 Type :{{.FunctionkeyType_21}}\r\nFkey7 Value :{{.FunctionkeyCodeValue_21}}{{.FunctionkeyValue_21}}@{{.FunctionkeyLine_21}}/{{.FunctionkeySubtype_21}}{{.FunctionkeyCodeExtension_21}}{{.FunctionkeyExtension_21}}\r\nFkey7 Title :{{.FunctionkeyLabel_21}}" } ], "numberOfHandsets": 0, "ownerEmail": "distributorexample@outlook.com", "configFile": null, "templateFile": null, "assignTo": null } }