Job Device Search V3

API provides the capability to search for Job Devices using an Elasticsearch query, terms and match_phrase format. In the query string format, different attributes of device can be combined using AND/OR operators in the query. The search results can be restricted to specific account by providing the accountId in addition to the query.

Required permission: job-read, device-read

Searchable Properties: jobId, taskIndex, deviceIdentifier, deviceTypeId, jobName, userId, deviceTaskStatus, transactionStatus, statusDate, jobCreationDate, updatedOn, filePlatformId, externalFileId, reportedName, fileVersion, isCurrent, otaDiagnosticCode, otaDiagnosticString, otaStatCode, appId, commandType

Sortable Properties: jobId, taskIndex, deviceTypeId, userId, deviceTaskStatus, transactionStatus, statusDate, jobCreationDate, filePlatformId, externalFileId, otaDiagnosticCode, otaStatCode

Sample input request body:

Search for a specific JobId using query_string

{
  "account": {
      "accountId": 11024,
      "includeSubaccounts": true
  },
  "query": {
    "query_string": {
      "query": "jobId: 39265"
    }
  },
  "sort": [
      {
          "propertyName": "jobId",
          "order": "ASC"
      }
  ]
}

Request multiple jobs using query_string

{
  "account": {
      "accountId": 11024,
      "includeSubaccounts": true
  },
  "query": {
    "query_string": {
      "query": "jobId: (39265 OR 123123)"
    }
  },
  "sort": [
      {
          "propertyName": "jobId",
          "order": "ASC"
      }
  ]
}

Request multiple jobs using query_string with multiple properties

{
  "account": {
      "accountId": 11024,
      "includeSubaccounts": true
  },
  "query": {
    "query_string": {
      "query": "jobId: 39265 AND deviceIdentifier: 1110055555"
    }
  },
  "sort": [
      {
          "propertyName": "jobId",
          "order": "ASC"
      }
  ]
}

Request multiple deviceIdentifiers using terms

{
    "account": {
        "accountId": 11024,
        "includeSubaccounts": true
    },
    "query": {
        "bool": {
            "must": [
                {
                    "terms": {
                        "deviceIdentifier": [
                            1110055555, 
                            11100555123
                        ]
                    }
                }
            ]
        }
    },
    "sort": [
      {
          "propertyName": "jobId",
          "order": "ASC"
      }
    ]
}

Request jobId using match_phrase

{
    "account": {
        "accountId": 11024,
        "includeSubaccounts": true
    },
    "query": {
        "bool": {
            "must": [
                {
                    "match_phrase": {
                        "jobId": "39265"
                    }
                }
            ]
        }
    },
    "sort": [
      {
          "propertyName": "jobId",
          "order": "ASC"
      }
    ]
}
Language
Authorization
Click Try It! to start a request and see the response here!