This documentation describes a release under development. Documentation for the latest release, 3.6.2, can be found here.

Mitto API

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

All of the information below references Mitto’s REST API. Mitto 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 Mitto Auth API page.

Base URL

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

Version 1

https://{mitto_url}/api/

Version 2

https://{mitto_url}/api/v2

Authentication

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

https://{mitto_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 Mitto’s API key.

    generate mitto api key

Authorization

The Mitto API key has full admin access.

Endpoints and Methods

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

mitto swagger docs ../_images/mitto__swagger1.png

Responses

Mitto’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"
}'