Jobs

Create a backfill job

Creates a logs or spans backfill batch job from backfill parameters (time window, query, vendor sinks, and optional type-specific fields). The dataType selects the built-in logs or spans template. This is an asynchronous batch job: the response returns an identifier (field: id) that can be used to query the status of the job using the GET jobs endpoint. The server builds the backfill job graph from the parameters, so callers do not assemble it themselves.

post/v1/jobs/backfills

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

OR

Example request

{
  "end": "2023-01-01T01:00:00Z",
  "limit": 100000,
  "name": "manual_backfill_1",
  "query": {
    "query": "service:grepr-service-1"
  },
  "sinks": [
    {
      "filter": {
        "query": "service:grepr-service-1"
      },
      "maxAllowedRate": 10,
      "maxBurstLimit": 2000,
      "name": "operation_name"
    }
  ],
  "start": "2023-01-01T00:00:00Z",
  "tags": {
    "source": "manual"
  }
}

Response

Backfill 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.