Templates
Device template configuration
Retrieve all device templates in the organization.
Required permissions, when user-scoped authentication is used: PRODUCT_VIEW.
OAuth2 Bearer token obtained from authentication endpoint
Organization ID (optional)
Page number (0-indexed)
0Page size (max 1000)
50List of templates
1Bad request
Forbidden
Too many requests
Internal server error
GET /api/v1/organization/templates HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"content": [
{
"id": 101,
"templateIds": [
"TMPL8RITg_f9Q"
],
"parentId": 101,
"orgId": 101,
"name": "Temperature Sensor Template"
}
],
"totalElements": 1
}Retrieve detailed information about a specific template.
Required permissions, when user-scoped authentication is used: PRODUCT_VIEW.
OAuth2 Bearer token obtained from authentication endpoint
Template ID
Template details
Template ID
101List of template IDs, that are used on the device
TMPL8RITg_f9QParent template ID
101Organization ID, that the template belongs to
101Template name
Temperature Sensor TemplateDevice board type
Connection type, that is used on the device
Template description
A template for temperature sensorspath of the template logo image, that should be prefixed with the server URL
/logo.pngTemplate creation timestamp
1707244800000Bad request
Forbidden
Template not found or access denied
Too many requests
Internal server error
GET /api/v1/organization/template?templateId=1 HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": 101,
"templateIds": [
"TMPL8RITg_f9Q"
],
"parentId": 101,
"orgId": 101,
"name": "Temperature Sensor Template",
"boardType": "Arduino",
"connectionType": "ETHERNET",
"description": "A template for temperature sensors",
"logoUrl": "/logo.png",
"createdAt": 1707244800000
}Update template properties.
Only the original (root) template can be edited (the one with parentId = null). Sub-organizations cannot modify templates that were created by a parent organization.
Required permissions, when user-scoped authentication is used: PRODUCT_EDIT. Also, when the user-scoped authentication is used, user should have developer mode enabled.
OAuth2 Bearer token obtained from authentication endpoint
Template ID
New template name. Can only contain letters, digits and spaces.
Temperature SensorDevice board type
Connection type, that is used on the device
New template description. Can only contain letters, digits, spaces and punctuation marks.
Template for temperature sensorsTemplate updated successfully
Template ID
101List of template IDs, that are used on the device
TMPL8RITg_f9QParent template ID
101Organization ID, that the template belongs to
101Template name
Temperature Sensor TemplateDevice board type
Connection type, that is used on the device
Template description
A template for temperature sensorspath of the template logo image, that should be prefixed with the server URL
/logo.pngTemplate creation timestamp
1707244800000Bad request
Forbidden
Template not found or access denied
Too many requests
Internal server error
PUT /api/v1/organization/template?templateId=1 HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 128
{
"name": "Temperature Sensor",
"boardType": "Arduino",
"connectionType": "ETHERNET",
"description": "Template for temperature sensors"
}{
"id": 101,
"templateIds": [
"TMPL8RITg_f9Q"
],
"parentId": 101,
"orgId": 101,
"name": "Temperature Sensor Template",
"boardType": "Arduino",
"connectionType": "ETHERNET",
"description": "A template for temperature sensors",
"logoUrl": "/logo.png",
"createdAt": 1707244800000
}Delete a device template.
You can't delete template, that is used in the sub-organizations. If any device is using the template in the root organization, it will be deleted.
Required permissions, when user-scoped authentication is used: PRODUCT_DELETE. Also, when the user-scoped authentication is used, user should have developer mode enabled.
OAuth2 Bearer token obtained from authentication endpoint
Template ID
Template deleted successfully
No content
Bad request
Forbidden
Template not found or access denied
Too many requests
Internal server error
DELETE /api/v1/organization/template?templateId=1 HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No content
Create a new device template.
Required permissions, when user-scoped authentication is used: PRODUCT_CREATE. Also, when the user-scoped authentication is used, user should have developer mode enabled.
OAuth2 Bearer token obtained from authentication endpoint
Organization ID to create template in. If not specified, the template will be created in the organization, that is associated with the authentication token.
101New template name. Can only contain letters, digits and spaces.
Temperature SensorDevice board type
Connection type, that is used on the device
New template description. Can only contain letters, digits, spaces and punctuation marks.
Template for temperature sensorsTemplate created successfully
Template ID
101List of template IDs, that are used on the device
TMPL8RITg_f9QParent template ID
101Organization ID, that the template belongs to
101Template name
Temperature Sensor TemplateDevice board type
Connection type, that is used on the device
Template description
A template for temperature sensorspath of the template logo image, that should be prefixed with the server URL
/logo.pngTemplate creation timestamp
1707244800000Bad request
Forbidden
Organization not found or access denied
Too many requests
Internal server error
POST /api/v1/organization/template/create HTTP/1.1
Host: blynk.cloud
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 140
{
"orgId": 101,
"name": "Temperature Sensor",
"boardType": "Arduino",
"connectionType": "ETHERNET",
"description": "Template for temperature sensors"
}{
"id": 101,
"templateIds": [
"TMPL8RITg_f9Q"
],
"parentId": 101,
"orgId": 101,
"name": "Temperature Sensor Template",
"boardType": "Arduino",
"connectionType": "ETHERNET",
"description": "A template for temperature sensors",
"logoUrl": "/logo.png",
"createdAt": 1707244800000
}Last updated
Was this helpful?

