Note |
---|
Documentation under development |
Reference URL: Publishes a device’s telemetry event.
Info |
---|
Note: This is a regional API. |
You can find the URL and SystemKey required in the call by clicking API Keys (key icon) at the top-right of the Registry Details page.
The ClearBlade-UserToken value can be set to a JWT (note the claims required for HTTP calls).
NOTE: Applicable only for https://cloudiot.google.com/iot/docs/reference/cloudiotdevice/rest/v1/projects.locations.registries.devices/publishEventPublishes a telemetry event for a deviceclearblade.com users:
The ClearBlade-UserToken value can also be set to the token found by clicking the API keys icon at the top-right of the Registry Details page. However, using the JWT is preferred since it is device-specific.
HTTP request
POST https:{URL}/api/cloudiotdevice.googleapis.com/v1/{name=projects/*/locations/*/registries/*/devices/*}:publishEvent
The URL uses gRPC Transcoding syntax.
Each request must include a JWT in the header.
...
v/4/webhook/execute/{SystemKey}/cloudiotdevice_devices
Query parameters
Parameters | |
---|---|
|
The device’s name |
. For example, or
The device’s name can be set to the deviceId or numId (i.e., without the project, location, and registry info. prepended). | |
|
The value must be |
Header parameters
Parameters | |
---|---|
| See the note at the start of this document on where to find the token. |
Request body
The request body contains data with the following this structure:
JSON representation | ||
---|---|---|
|
Fields | |
---|---|
|
|
The telemetry event’s optional subfolder. This can be used to classify event types |
and is included in the Pub/Sub message attributes. | |
|
Set only if the message is sent through a gateway or a gateway is making the request on a device’s behalf |
. | |
|
Payload data in binary format. A base64-encoded string. |
Response status codes
Code | Meaning |
---|---|
204 | Success |
Response body
If successful, the response body will be empty.