v1
latestOpenAPI 3.1.02026-07-24239123562.1 KBSearch commands
Use this endpoint to search all on-premises commands based on various filters. This endpoint is useful when you want to filter out commands, get all successful, or unsuccessful commands, get all commands that are sent to some agent/connector, commands that are created within a certain time range and more.
Query parameters
ID of the target that received and processed command(s). Supports one or more values, such as targetId=71003689-9619-43aa-809a-a693ede72e8b&targetId=740b1e83-eaf0-4e03-b134-97fb575a8c4c
Action label, such as TetraScience.Connector.sdc.CreateMeasurementOrder. Supports one or more values, such as action=TetraScience.Connector.sdc.CreateMeasurementOrder&action=TetraScience.Connector.ValidateConfig
Command status: CREATED, UNSENT, PENDING, EXPIRED, PURGED, ERROR, PROCESSING, REJECTED, SUCCESS, FAILURE. Supports one or more values, such as status=FAILURE&status=SUCCESS
Deprecated name for createdAtAfter
Deprecated name for createdAtBefore
Commands created on or before a given date (ISO timestamp)
Commands created on or after a given date (ISO timestamp)
Commands expiring on or before a given date (ISO timestamp)
Commands expiring on or after a given date (ISO timestamp)
Commands updated on or before a given date (ISO timestamp)
Commands updated on or after a given date (ISO timestamp)
Display commands started from specified number in the results array. By default, commands are displayed from the start of the array (the number 0). This parameter is included if the result set is large, pagination might be required. This parameter is typically used in conjunction with size.
Indicates the number of results to return in the request. This parameter is included if the result set is large, pagination might be required. This parameter is typically used in conjunction with from.
Sort field: createdAt | updatedAt | expiresAt.
Sort order: asc | desc
Metadata key-value pairs, such as metadata.vendor=tetra. Pairs must be exact matches of existing metadata values.
Response
200
Example response
{
"hits": [
{
"id": "013cf44b-e3ef-4757-84c2-ff19a133c955",
"orgSlug": "mgtest",
"targetId": "d7f4c013-26c3-4214-ae6c-f14467ad6848",
"action": "TetraScience.Connector.gdc.HttpRequest",
"expiresAt": "2021-01-10T23:58:43.749Z",
"metadata": {
"key1": "value1",
"key2": "value2"
},
"status": "SUCCESS",
"requestBody": {
"body": {
"url": "https://jsonplaceholder.typicode.com/posts",
"body": {
"raw": "{ \"title\": \"foo\", \"body\": \"bar\", \"userId\": 1 }",
"mode": "raw"
},
"method": "POST",
"ignore_tls_certificate": true
},
"action": "TetraScience.Connector.gdc.HttpRequest",
"targetId": "d7f4c013-26c3-4214-ae6c-f14467ad6848",
"commandId": "013cf44b-e3ef-4757-84c2-ff19a133c955",
"createdAt": "2021-01-08T23:32:31.456Z",
"expiresAt": "2021-01-10T23:58:43.749Z"
},
"responseBody": {
"body": "{\"title\":\"foo\",\"body\":\"bar\",\"userId\":1,\"id\":101}",
"headers": [
{
"date": "Fri, 08 Jan 2021 23:32:33 GMT"
}
],
"statusCode": 201
},
"requestPayloadDelivery": "embedded",
"createdByEntity": "user",
"createdBy": "59eb8bd4-8b10-43b3-ac57-fe3ab86c05fd",
"createdAt": "2021-01-08T23:32:31.456Z",
"updatedAt": "2021-01-08T23:32:34.219Z"
}
],
"size": 100,
"sort": "desc"
}