# 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](https://www.zuar.com/help/waf/) and it's corresponding "auth" API documentation is [here](https://www.zuar.com/help/waf/auth-api/). If you are looking for information related to authentication endpoints like adding and removing users, editing users, etc., please see [Mitto Auth API page](/api/auth). ## 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. .. image:: assets/mitto__api_key.png :alt: generate mitto api key ## Authorization The Mitto API key has full admin access. ## Endpoints and Methods As mentioned above, Mitto has [Swagger](https://swagger.io/) documentation at `https://{mitto_url}/docs`. You can see all the API endpoints and test them using the Swagger UI. .. image:: assets/mitto__swagger.png :alt: mitto swagger docs .. image:: assets/mitto__swagger1.png ## Responses Mitto's APIs return data in JSON format. Here is an example from `/files`: ```json { 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: ```bash 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" }' ```