Commands

Preview command encoder

Run a custom JavaScript encoder against concrete params in a sandbox (no side effects). Returns the rendered downlink bytes (hex / base64) or a structured encoder error. The HTTP status stays 200 even when the encoder itself fails (see the error field).

Required scope: commands:write

post/api/v2/devices/{id}/commands/preview-encoder

Request

  • Base URL: https://api.chirpwireless.io
  • URL: https://api.chirpwireless.io/api/v2/devices/{id}/commands/preview-encoder
  • Auth: API key in header X-API-Key and API key in header X-Organization-Id

Path parameters

idstring required

Digital device ID

Request body

organizationIdstring required

Organization ID

customEncoderstring required

JavaScript encoder source to run in the sandbox.

encodedParamsTemplateobject

Optional template rendered into encoder input.

paramsobject

Concrete parameter values supplied to the encoder.

fPortinteger

Response

Encoder preview result. HTTP stays 200 even when the encoder fails (inspect the error field).

logsstring[]
executionTimeMsnumber

Changes

No recorded changes to this operation across all 1 revision of this API.