v1

latestOpenAPI 3.0.32026-07-24214879985.1 KB
Jobs

List Jobs. Filtering by userId, type, state namespace, createTimestamp, updateTimestamp, expireTimestamp.

get/jobs

Query parameters

pageTokenstring

Token string value that references a page for pagination. This value is received when retrieving the first page in the nextPageToken and prevPageToken fields. When a pageToken is provided, the backend remembers search parameters from the original request, so search parameters that affect the result set or order are optional and will be ignored if provided. Representation parameters like include should still be applied.

pageSizeinteger

The number of entries to return per page. The maximum range of valid page sizes is documented with minimum and maximum values, but the range might be further limited dynamically based on the requested information, account, and system status. Values outside of the (dynamic) allowed range will not result in an error, but will be clamped to the nearest limit. Thus, logic to detect the last page should not be based on comparing the requested size with the received size, but on the existence of a nextPageToken value.

sortstring[]

Comma separated list of of fields that should be sorted. By default, the users response is sorted by first name.

  • sort= - not providing any value will result in error 400
  • sort=+firstName,+firstName - same values will result in error 400
  • sort=-firstName,+firstName - mutually exclusive values will return error 400
  • There is no limit on the number of sort fields. All available sort fields can be combined freely, as the backend supports sorting by all of them.
  • qRelevance is optional ordering parameter which is available if q filter is used, if q filter is not passed qRelevance as ordering parameter will return error 400
userIdstring required

User that the Job runs under and/or for. In the case a regular user invokes the POST /jobs endpoint, this is their user ID.

Example:cafe0010

Filter by Jobs.userId. REQUIRED.

type'preview' | 'main' required

The stream type of the device used to generate the media.

state'pending' | 'started' | 'failure' | 'success' | 'revoked'

State of the Job. When updating a Job, appropriate state changes are enforced. - Pending Jobs can be updated to any state. - Started Jobs can be updated to failure, success, or revoked. - Failure Jobs cannot be updated. - Success Jobs cannot be updated. - Revoked Jobs cannot be updated. When a Job is revoked, the worker is notified through any communication the worker performs that needs to touch the Job resource. For example, when the worker is trying to add a result or update progress through the API, it will receive an error which should result in termination of the work. This error will be a 400 or 500 error. Delete Jobs will interrupt the worker using the same methods (404 error, etc). Uses Celery task state conventions: https://docs.celeryq.dev/en/stable/reference/celery.states.html#misc

Filter by Jobs.state

namespacestring

Jobs with common concerns are grouped according to their namespace. For example, Reports has it's own reports namespace to make filtering and finding report type jobs easier.

Example:reports

Filter by Jobs.namespace

createTimestamp__gtestring date-time
Example:2021-04-22T00:00:00.000+00:00

Minimum timestamp for creation date.

createTimestamp__ltestring date-time
Example:2021-04-22T00:00:00.000+00:00

Maximum timestamp for creation date.

updateTimestamp__gtestring date-time
Example:2021-04-22T00:00:00.000+00:00

Minimum timestamp for update date.

updateTimestamp__ltestring date-time
Example:2021-04-22T00:00:00.000+00:00

Maximum timestamp for update date.

expireTimestamp__gtestring date-time
Example:2021-04-22T00:00:00.000+00:00

Minimum timestamp for expire date.

expireTimestamp__ltestring date-time
Example:2021-04-22T00:00:00.000+00:00

Maximum timestamp for expire date.

state__instring[]

Filter Jobs.state to those having all given state

Response

List Jobs

nextPageTokenstring nullable required

Token to retrieve the next page. The value of this token is passed into the field pageToken. This value can be null if there is no next page.

prevPageTokenstring nullable required

Token to retrieve the previous page. The value of this token is passed into the field pageToken. This value can be null of there is no previous page.

totalSizeinteger nullable

The number of resource entries being returned from the result set. This can be omitted if the API endpoint does not have total size information.

Example response

{
  "results": [
    {
      "detailedState": {
        "totalItems": 10,
        "currentItems": 4
      },
      "type": "reports.user-permissions",
      "namespace": "reports",
      "arguments": {
        "timeRangeSelect": "day"
      },
      "userId": "cafe0010",
      "scheduleTimestamp": "2020-01-01T00:00:00.000Z",
      "createTimestamp": "2020-01-01T00:00:00.000Z",
      "updateTimestamp": "2020-01-01T00:00:00.000Z",
      "expireTimestamp": "2020-01-01T00:00:00.000Z"
    }
  ]
}