Get command payload

Prev Next
Get
/data/commands

Retrieves the payload of the command for a deferred execution on the thing.
This API will return the string-encoded payload of the command.
If the command-definition contains the USER_AUTHORIZATION_IDS parameter (used for white-listing) one string-encoded payload is generated for each authorization id.
The string-encoded payload contains the following properties:

  - ts:The timestamp UTC (in seconds) referred to the payload creation time.
  - sta: The timestamp UTC (in seconds) referred to the payload validity start time.
  - stp: The timestamp UTC (in seconds) referred to the payload validity stop time.
  - aid: The user to thing authorization identifier.
  - pid: A random identifier generated on each request.
  - cmd: The name of the command.
  - dat: The object holding all the command parameters.
  - page: The multiple payload splitting information (present in case the USER_AUTHORIZATION_IDS is used) in the format 0xXXYY, where:
       - XX is the exadecimal number identifying the total number of authorization ids.
       - YY is the exadecimal number identifying the authorization index.

In case the command-definition is secure, the payload is encrypted with the Shared Key (AES certificate) configured on the Thing, and then Base64 encoded.

Required permissions: READ_THING, EXECUTE_THING_COMMAND.

Security
HTTP
Type bearer
Header parameters
X-Servitly-Tenant
stringRequired

The name of the target tenant (e.g. acme).

Query parameters
thingId
string

Condition on thing id.

Exampleabcd1234
commandName
stringRequired

The command name whose payload must be retrieved.

Maximum1.0
Responses
200

Successful operation.

object
payloads
Array of string

The array of string-encoded payloads.

string
Example{"ts":1605179226000,"aid":"0x5752600086677582500510006620000000000000000000000000000000000000","sta":1579015139,"stp":1894634339,"cmd":"Clean","dat":{"clean":true},"pid":1426857182}
401

User not authenticated.

object
message
string

The error response.

ExampleUser not authenticated
403

User not authorized.

object
message
string

The error response.

ExampleUser not authorized
404

Resource was not found.

object
message
string

The error response.

ExampleResource not found
429

API call rate limit exeeded.

object
message
string

The error response.

ExampleAPI call rate limit exeeded
500

Internal server error.

object
message
string

The error response.

ExampleInternal Server Error