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 28 Next »

Publishes a device’s telemetry event.

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 token required in the call can be found on the Registry Details page or a JWT generated (note the claims required for HTTP calls). Using the JWT is recommended since it is device-specific.

HTTP request

POST {URL}/api/v/4/webhook/execute/{SystemKey}/cloudiotdevice_devices

Query parameters

Parameters

name

string 

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

or

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

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

method

string

The value must be publishEvent

Header parameters

Parameters

ClearBlade-UserToken

See the note at the start of this document on where to find the token.

Request body

The request body contains data with this structure:

JSON representation

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

Fields

subFolder

string

The telemetry event’s optional subfolder. This can be used to classify event types 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 a device’s behalf.

binaryData

string (bytes format)

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.

  • No labels