Jobs

Update an Asynchronous Streaming Job

Updates an asynchronous streaming job. This is an asynchronous operation which returns an identifier (field: id) for the job to be created, in the response. The id can be used to query the status of the job using the GET jobs endpoint. If a change in the job graph is detected, a new version of the job will be created and sent back in the response object. Job update lifecycle is represented by the state field in the GET response. Following states can be expected in the response:

  • PENDING: Job is in the process of being updated.
  • RUNNING: Job is running.
  • STOPPED: Job is stopped.
  • FAILED: Job update failed.
  • INFRA_UPDATE: Job is undergoing an infra change.
put/v1/jobs/{id}

Request

  • Base URL
    https://docs.grepr.ai (the document declares no server; this is the origin it was published from)
  • Auth
    • API key in header GREPR-API-KEY
    • or OpenID Connect (https://grepr-prod.us.auth0.com/.well-known/openid-configuration)

Path parameters

idstring required

Id of the job to update

Query parameters

rollbackEnabledboolean

If set to true, the rollback path will be enabled if this job update fails.

Request body

desiredState'CREATED' | 'PENDING' | 'INFRA_UPDATE' | 'INFRA_UPDATE_WAIT' | 'VERIFYING' | 'WAITING' | 'RUNNING' | 'STOPPED' | 'FINISHED' | 'FAILED' | 'CANCELLED' | 'DELETED' | 'UPDATING' | 'STARTING' | 'RESTARTING' | 'STOPPING' | 'ROLLING_BACK' | 'DELETING' required

Desired state of the job

fromVersioninteger required

Version of the job being updated, should be set to the current version of the job. If the current version of the job does not match this value, a 409 Conflict is returned.

teamIdsstring[]

The team IDs that this job is associated with.

Example request

{
  "desiredState": "RUNNING",
  "jobGraph": {
    "edges": [
      "source -> sink"
    ],
    "vertices": [
      {
        "end": "2024-08-07T22:05:07Z",
        "integrationId": "0jn5rdc93r10t",
        "name": "source",
        "processing": "BATCH",
        "query": {
          "query": "service:grepr-query",
          "type": "datadog-query"
        },
        "start": "2024-08-07T22:00:07Z",
        "table": "logevent_raw_devpipeline",
        "type": "logs-iceberg-table-source"
      },
      {
        "name": "sink",
        "type": "logs-sync-sink"
      }
    ]
  }
}

Response

Job updated successfully

Changes

No recorded changes to this operation across all 1 revision of this API.