Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Publishes a telemetry event for a device.


You can find URL, SystemKey and Token required in the call by clicking on API Keys (key icon) at the top-right of the Registry Details page.

HTTP request

POST '{URL}/api/v/4/webhook/execute/{SystemKey}/cloudiotdevice_devices' -H 'ClearBlade-UserToken: {Token}'

Query parameters

Parameters

name

string

 

The name of the device. For example, projects/p0/locations/us-central1/registries/registry0/devices/device0

or

projects/p0/locations/us-central1/registries/registry0/devices/{numId}.

The name of the device can also be set simply to the deviceId or the numId (i.e. without project, location and registry info. prepended).

method

string

 

Value must be  publishEvent


Request body

The request body contains data with the following structure:

JSON representation

{
  "subFolder": string,
  "gatewayInfo": {
    object(GatewayInfo)
  },
  "binaryData": string
}

Fields

subFolder

string

Optional subfolder for the telemetry event. This can be used to classify types of events, and is included in the Pub/Sub message attributes.

gatewayInfo

object(GatewayInfo)

Set only if the message is sent through a gateway or a gateway is making the request on behalf of a device.

binaryData

string (bytes format)

Payload data in binary format.

A base64-encoded string.

Response body

If successful, the response body will be empty.

  • No labels