Jobs

Submit an Asynchronous Job

Submit an async job (streaming or batch). 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. Job creation lifecycle is represented by the state field in the GET response. States represent the following:

  • PENDING: Job has been successfully accepted for submission
  • WAITING: Job is waiting on other jobs to finish to be submitted.
  • STARTING: Job is being transitioned to the RUNNING state.
  • RUNNING: Job is running.
  • FAILED : Job creation failed.
post/v1/jobs/async

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)

Request body

execution'SYNCHRONOUS' | 'ASYNCHRONOUS' required

Execution mode of the job

namestring required

Name of the job

processing'BATCH' | 'STREAMING' required

Processing method of the job

tagsobject

Custom tags added to the job for ease of search

teamIdsstring[]

The team IDs that this job is associated with.

Example request

{
  "execution": "ASYNCHRONOUS",
  "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"
      }
    ]
  },
  "name": "demo_pipeline",
  "processing": "STREAMING",
  "tags": {
    "env": "dev",
    "type": "logs"
  }
}

Response

Async job submitted successfully

createdAtstring date-time required

Time the job was accepted for creation

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

editedBystring

User who created this job version, in format 'Full Name (userId)' or 'system' for automated operations

endedAtstring date-time

Time the job was ended

execution'SYNCHRONOUS' | 'ASYNCHRONOUS' required

Execution mode of the job

greprVersionstring

The version of Grepr used to create the job

idstring required

Id of the job

namestring required

Name of the job

organizationIdstring required

Organization ID of the job

processing'BATCH' | 'STREAMING' required

Processing method of the job

startedAtstring date-time

Time the job was started

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

State of the job

tagsobject required

Custom tags attached to the job for ease of search

teamIdsstring[]

The team IDs that this job is associated with.

updatedAtstring date-time required

Time the job was last updated

versioninteger required

Version of the job

Example response

{
  "id": "0ABC12DEF4G",
  "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"
      }
    ]
  },
  "name": "demo_pipeline_1",
  "organizationId": "grepr"
}

Changes

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