APIs
Authentication

Authenticate to Grepr REST APIs

By default, most endpoints in the Grepr REST API are restricted and cannot be accessed until enabled. The exception is the POST /v1/triggers endpoint to create external triggers.

To request API access for your organization, contact Grepr support.

After your API access is enabled, you must use a Grepr API key to authenticate all requests. The following sections describe how to create and use an API key.

Create a Grepr API Key

To create an API key in the Grepr UI:

  1. Click your profile picture, then click API Keys.

API Keys

  1. If no API key is shown in the API Keys dialog, click Generate to create a key.

API Key Page

Use the API key with the Grepr API

You must include the API key in the GREPR-API-KEY header of all API requests. If you submit a request using an API key that is invalid or revoked, a 401 Unauthorized response is returned. You must create a new key before re-submitting the request.

The following example uses curl to list jobs based on specific parameters:

curl -XGET "https://<your_org_id>.app.grepr.ai/api/v1/jobs?processing=STREAMING&execution=ASYNCHRONOUS" \
-H "Content-Type: application/json" \
-H "GREPR-API-KEY: <your_api_key>"

Example response:

{
  "items": [
    {
      "id": "0ABC123DEF456",
      "name": "Demo Job",
      "version": 0,
      "organizationId": "grepr",
      "execution": "ASYNCHRONOUS",
      "processing": "STREAMING",
      "state": "RUNNING",
      "desiredState": "RUNNING",
      "jobGraph": {
        "vertices": [],
        "edges": []
      },
      "createdAt": "2021-09-01T00:00:00Z",
      "updatedAt": "2021-09-01T00:00:00Z",
      "tags": {
        "createdUsing": "API",
        "createdByUser": "Hardworking Beaver"
      }
    }
  ]
}

Notes

  • API Key Security : Keep your API key secure. Do not expose it in your client-side code or commit it to a version control repository.