Querying a List of Edge Device Templates
Function
This API is used to query a list of edge device templates.
URI
GET /v2/{project_id}/edgemgr/device_templates?{name=xxx,limit=xxx,offset=xxx}
| Parameter | Mandatory | Description |
|---|---|---|
| project_id | Yes | Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| name | No | String | Edge device name, which supports fuzzy match. |
| offset | No | String | Start position for a query. The value range is 1–1000. The default value is 1000. |
| limit | No | String | Number of records displayed on each page. The value is a non-negative integer. The default value is 0. |
- If no query parameter is specified, all edge device templates of an account are returned.
- If multiple query parameters are specified, the edge device templates that meet all the specified query parameters are returned.
Request
None
Response
Response parameters
| Parameter | Type | Description |
|---|---|---|
| count | Integer | Number of edge device templates. |
| device_templates | Array of Table 5 objects | Details about the edge device template. |
Example response
{
"count": 1,
"device_templates": [
{
"property_visitors": {},
"description": "",
"tags": {
"key1": "value1"
},
"created_at": "2019-10-09T00:51:11.890571+08:00",
"updated_at": null,
"access_protocol": "userdefine",
"twin": {},
"attributes": {
"ggg": {
"optional": true,
"value": "ggg",
"metadata": {
"type": "string"
}
}
},
"project_id": "13b43583216e426b9dc9fad4000e9e1a",
"id": "3950b024-7716-4580-8b85-4ab4bd3eeef0",
"name": "mmmmmmm"
}
]
} Error Codes
For details, see Error Codes.
Last Article: Querying an Edge Device Template
Next Article: Deleting an Edge Device Template
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.