Zuar Runner API

Almost every action performed in the Zuar Runner UI has a corresponding REST API endpoint. This means you can programmatically create and manage jobs and use Zuar Runner as a data source.

All of the information below references Zuar Runner’s REST API. Zuar Runner also contains a Zuar WAF and it’s corresponding “auth” API documentation is here.

If you are looking for information related to authentication endpoints like adding and removing users, editing users, etc., please see Zuar Runner Auth API page.

Base URL

There are currently 2 versions of the Zuar Runner API. By exploring Zuar Runner’s Swagger Docs, you can determine which version of the endpoint is required. https://{runner_url}/docs

Version 1

https://{runner_url}/api/

Version 2

https://{runner_url}/api/v2

Authentication

Zuar Runner’s API uses a revocable API key for access. This is consistent across all version of the Zuar Runner API.

https://{runner_url}/api/v2/{endpoint}?API_KEY={api_key}

API Key

  1. Click on the Settings menu.

  2. Under the About tab on the settings page there is a Product Configuration section. Locate the API Key area and click on the edit icon.

  3. View, generate, and regenerate Zuar Runner’s API key.

    generate mitto api key

Authorization

The Zuar Runner API key has full admin access.

Endpoints and Methods

As mentioned above, Zuar Runner has Swagger documentation at https://{runner_url}/docs. You can see all the API endpoints and test them using the Swagger UI.

mitto swagger docs ../_images/mitto__swagger1.png

Responses

Zuar Runner’s APIs return data in JSON format. Here is an example from /files:

{
  files: [
    {
      name: "example.csv",
      size: 7874,
      size_hr: "7.7 KiB",
      mtime: {
        utc: "2019-08-20T20:49:22.256707+00:00",
        epoch: 1566334162.256707,
        local: "2019-08-20T15:49:22.256707-05:00",
        local_hr: "8-20 3:49:22PM CDT"
      },
      mode: "-rw-r--r--"
    }
  ],
  count: 1,
  size: 7874,
  display-size: "7.7 KiB"
}

Example Requests

Using a cUrl request to start a job. The request below will trigger job ID 70:

curl --location --request POST 'https://mitto.zuarbase.net/api/v2/jobs/70/:actions?API_KEY={addkeyhere}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
  "action": "START"
}'