Jobs

Submit a sync job

Submits a job whose results will be returned synchronously as a stream of nd-json. Both streaming and batch jobs using a source with synchronous processing type are supported. The returned data is new-line delimited json log event records. The returned data will be wrapped in an EventRecord object that contains the state of the job. The server will periodically send heartbeats to the client through the same stream so the client knows the server is still alive. The client in return should send a heartbeat back to the server using the /sync/heartbeat endpoint to keep the connection alive. The client should use the heartbeat token returned in the EventRecord object to send the heartbeat. The connection will be closed if the client does not send a heartbeat within the timeout period. Additionally, the connection will close if the job fails or finished, or if the job runs for too long. This last timeout is dependent on whether the job is a batch or streaming job.

post/v1/jobs/sync

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

Sync job submitted successfully

Changes

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