Blueprints API
The Blueprints API helps to manage device blueprints.
Validate Blueprint
POST blueprints/validate
Validates a specified blueprint.
Request
$ curl -X POST \
http://api.enapter.com/v3/blueprints/validate \
-d '{
"data": "..."
}'
Body Parameters
databytesrequired#A zipped folder with Enapter blueprint.
Response
The list containing validation errors, if occurred.
{
"validation_errors": []
}
{
"validation_errors": ["missed file manifest.yml"]
}
Upload Blueprint
POST blueprints/upload
Uploads blueprint to the Enapter Platform.
Request
$ curl -X POST \
http://api.enapter.com/v3/blueprints/upload \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}' \
-d '{
"data": "...",
}'
databytesrequired#A zipped folder with Enapter blueprint.
Response
{
"blueprint_id": "bluepri2-61n4-4t9d-e6v0-69i310cb110e",
"created_at": 1735689600
}
Get Blueprint
GET blueprints/{blueprint_id}
Returns information about a specified blueprint.
Request
$ curl http://api.enapter.com/v3/blueprints/bluepri2-61n4-4t9d-e6v0-69i310cb110e \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}'
Response
{
"blueprint": {
"id": "bluepri2-61n4-4t9d-e6v0-69i310cb110e",
"created_at": 1735689600,
"full_names": [
{
"namespace": "enapter",
"name": "gas_sensor",
"tag": "2.0"
},
{
"namespace": "enapter",
"name": "gas_sensor",
"tag": "3.0"
}
]
}
}
blueprint.idstring#Blueprint's ID.
blueprint.created_atinteger#The timestamp when the blueprint was first created.
blueprint.full_names.namespacestring#Blueprint's namespace. By default, all blueprints belong to the
enapternamespace.
blueprint.full_names.namestring#Blueprint's name.
blueprint.full_names.tagstring#Blueprint's tag. The tag is used as an optional identifier to specify a particular version or variant of the blueprint.
Get Blueprint By Name
GET blueprints/{namespace}/{name}/{tag}
Returns information about a specified blueprint.
Request
$ curl http://api.enapter.com/v3/blueprints/enapter/electrolyser/3.0 \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}'
Response
{
"blueprint": {
"id": "bluepri2-61n4-4t9d-e6v0-69i310cb110e",
"created_at": 1735689600,
"full_names": [
{
"namespace": "enapter",
"name": "gas_sensor",
"tag": "2.0"
},
{
"namespace": "enapter",
"name": "gas_sensor",
"tag": "3.0"
}
]
}
}
blueprint.idstring#Blueprint's ID.
blueprint.created_atinteger#The timestamp when the blueprint was first created.
blueprint.full_names.namespacestring#Blueprint's namespace. By default, all blueprints belong to the
enapternamespace.
blueprint.full_names.namestring#Blueprint's name.
blueprint.full_names.tagstring#Blueprint's tag. The tag is used as an optional identifier to specify a particular version or variant of the blueprint.
Get Blueprint as .zip archive
GET blueprints/{blueprint_id}/zip
Downloads blueprint as a .zip archive.
Request
$ curl http://api.enapter.com/v3/blueprints/bluepri2-61n4-4t9d-e6v0-69i310cb110e -G \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}' \
-d view=ORIGINAL
Path Parameters
viewstring#ORIGINAL- as the blueprint was uploaded to Enapter Platform.COMPILED- a compiled version of the blueprint.
Response
A .zip archive containing the requested view of the blueprint.
Get Blueprint Compatible Devices
GET blueprints/{blueprint_id}/compatible_devices
Returns lists of runtimes and devices, which are compatible with a specified blueprint.
Request
$ curl http://api.enapter.com/v3/blueprints/bluepri2-61n4-4t9d-e6v0-69i310cb110e/compatible_devices \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}'
Response
{
"devices": [
{
"id": "devicea0-45f2-4e9e-a6f0-69a310ab110b",
"blueprint_id": "bluepri1-50n3-4t9d-e6v0-69i310cb110e",
"name": "Hydrogen detector",
"site_id": "sitebba0-79f2-4e9e-a6f0-69a310ab110b",
"updated_at": 1735689600,
"slug": "gas-detector-in-living-room",
"type": "LUA",
"authorized_role": "INSTALLER"
}
],
"runtimes": [
{
{
"id": "fecbbba0-79f2-4e9e-a6f0-69a310ab110b",
"blueprint_id": "bluepri0-79n2-4t9e-u6c0-69m310ab110b",
"name": "My UCM",
"site_id": "sitebba0-79f2-4e9e-a6f0-69a310ab110b",
"updated_at": 1735689600,
"slug": "my-ucm",
"type": "HARDWARE_UCM",
"authorized_role": "INSTALLER"
}
}
]
}
Get All Device Profiles
GET blueprints/download_device_profiles
Downloads all device profiles from Enapter Platform as a .zip archive.
Request
$ curl http://api.enapter.com/v3/blueprints/download_device_profiles \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}'
Response
A .zip archive containing all profiles from the Enapter platform.
Upload Device Profiles
POST /blueprints/upload_device_profiles
You can upload device profile(s) only to the Enapter Platform on Gateway 3.x.x.
Uploads specified device profile(s) to the Enapter Platform. The profile(s) then can be used in a device manifest.
Request
$ curl -X POST \
http://api.enapter.com/v3/blueprints/upload_device_profiles \
-H 'X-Enapter-Auth-Token: {ACCESS_TOKEN}' \
-d '{
"data": "...",
}'
Body Parameters
databytesrequired#Profile(s) (directories with a manifest.yml file only) that should be uploaded in a .zip format.