Log a Device Event
Trigger Device Event
POST
https://{server_address}/api/v1/organization/device/trigger-event
Note: The combined length of the event code and description must not exceed 1024 symbols
Headers
Name
Type
Description
Authorization*
Bearer {access_token}
Content-Type
application/json
Request Body
Name
Type
Description
deviceId*
1
Device identifier.
eventCode*
high_temp
Event code.
eventDescription
Temperature is over 20°
Triggered event description. Should be up to 300 symbols in length (may be increased for enterprise clients).
{
"error": {
"message": "Device with identifier 1 is not found or belong to another organization."
}
}
Request examples:
# curl command example:
$ curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer {accessToken}" \
-d '{"deviceId":1,"eventCode":"high_temp"}' \
https://fra1.blynk.cloud/api/v1/organization/device/trigger-event
$ curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer eIdWHQqRfFmvP5LDDh-IGxPUzi7I27HthzCPAVmS" \
-d '{"deviceId":1,"eventCode":"high_temp"}' \
https://fra1.blynk.cloud/api/v1/organization/device/trigger-event
Last updated
Was this helpful?