Help Center/ Intelligent EdgeFabric/ API Reference/ API/ End Device Template Management/ Querying Details About an End Device Template
Updated on 2023-11-23 GMT+08:00

Querying Details About an End Device Template

Function

This API is used to query details about an end device template.

URI

GET /v2/{project_id}/edgemgr/device-templates/{device_template_id}

Table 1 Path parameters

Parameter

Mandatory

Description

project_id

Yes

Project ID. For details about how to obtain a project ID, see Obtaining a Project ID.

device_template_id

Yes

Device template ID.

Request

Table 2 Parameters in the request header

Parameter

Mandatory

Type

Description

Content-Type

Yes

String

Message body type (format).

The default value application/json is recommended.

X-Auth-Token

Yes

String

User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token.

Response

Response parameters

Table 3 Parameters in the response body

Parameter

Type

Description

device_template

Table 7 object

Details about the end device template.

Example response

{
    "device_template": {
        "property_visitors": {},
        "description": "This is a camera template",
        "tags": {},
        "created_at": "2019-11-07T03:20:04.041160+08:00",
        "updated_at": "2019-11-07T03:21:00.347476+08:00",
        "access_protocol": "userdefine",
        "twin": {
            "runstate": {
                "expected": {
                    "value": "running"
                },
                "optional": true,
                "metadata": {
                    "type": "string"
                }
            }
        },
        "attributes": {
            "cameraURL": {
                "optional": true,
                "value": "127.0.0.1",
                "metadata": {
                    "type": "string"
                }
            }
        },
        "project_id": "ed202955e111444e8ced21a1bd75fc59",
        "id": "42e20164-5158-4316-a821-5fe127c483b0",
        "name": "CameraTemplate"
    }
}

Error Codes

For details, see Error Codes.