Get command by id

Prev Next
Get
/inventory/command/{commandId}

Returns the command identified by the given id, with its parameters, its mapping and the conditions that enable it and define its running state.

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

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

Path parameters
commandId
stringRequired

The command identifier.

Minimum1
Exampleabcd1234
Responses
200

Successful operation.

Expand All
object
id
string

The command object identifier.

thingDefinition
object

The thing-definition identifier associated with the command.

id
string

The referenced object identifier.

Example1234abcd
name
string

The command name.

secure
boolean

The flag indicating whether the command is secured.

onCondition
object

The condition that defines the toggle command status.

metric
object

The condition metric.

id
string

The referenced object identifier.

Example1234abcd
predicate
string

The condition predicate.

Valid values[ "EQUAL", "NOT_EQUAL", "LESS", "GREATER", "LESS_EQUAL", "GREATER_EQUAL" ]
value
string

The condition value to check.

runningCondition
object

The condition that defines whether the command is running.

metric
object

The condition metric.

id
string

The referenced object identifier.

Example1234abcd
predicate
string

The condition predicate.

Valid values[ "EQUAL", "NOT_EQUAL", "LESS", "GREATER", "LESS_EQUAL", "GREATER_EQUAL" ]
value
string

The condition value to check.

enabledCondition
object

The condition that enables or disables the command button within the page.

metric
object

The condition metric.

id
string

The referenced object identifier.

Example1234abcd
predicate
string

The condition predicate.

Valid values[ "EQUAL", "NOT_EQUAL", "LESS", "GREATER", "LESS_EQUAL", "GREATER_EQUAL" ]
value
string

The condition value to check.

mapping
object

The command mapping used to send parameters to the thing.

path
string

The command mapping path.

Exampleexecute
parameters
Array of object

The parameters sent by the command.

object
name
string

The selection item name.

Examplepar1
type
string

The parameter type.

Valid values[ "BOOLEAN", "DOUBLE", "FLOAT", "INTEGER", "LONG", "ARRAY", "STRING" ]
value

The parameter value.

onCondition
boolean

The flag indicating whether the parameter must be sent according to the on-condition status; if omitted, it is always sent.

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 exceeded.

object
message
string

The error response.

ExampleAPI call rate limit exceeded
500

Internal server error.

object
message
string

The error response.

ExampleInternal Server Error