Our APIs

All our KBC components have a public API on apiary. For sending requests to our API, we recommend either the Apiary Console or Postman Client. Most of our APIs take and produce data in JSON format. Many of them require a Storage API token, which is entered in the X-StorageApi-Token header.

List of Keboola APIs

All parts of the Keboola Connection platform can be controlled via an API. The main APIs for our components are:

API Description APIB
KBC Storage API Storage is the main KBC component storing all data. APIB
KBC Management API API managing KBC projects and users (and notifications and features). APIB
Docker Runner API Docker Runner is the component running other KBC components. APIB
JSON Parser API JSON Parser is a service converting JSON files to CSV. APIB
Transformation API Transformations is the component running SQL/R/Python transformations.
Provisioning API Provisioning is a service creating accounts for sandboxes, transformations and database writers. APIB
Provisioning Management API API managing servers for sandboxes, transformations. APIB
Syrup Queue API Syrup Queue is a component managing Jobs. APIB
OAuth Manager API OAuth2 is a component managing OAuth authorizations of other components. APIB
GoodData Writer API GoodData Writer is a component loading data into GoodData. APIB
Orchestrator API Orchestrator is a component automating and scheduling tasks in your project. APIB
Developer Portal API Developer Portal is an application separated from KBC for registering components. APIB

Regions and Endpoints

Keboola Connection is available in multiple regions — currently US (connection.keboola.com) and EU (connection.eu-central-1.keboola.com). Each region instance is a completely independent full stack of Keboola Connection services. In all of the above API documentations, the US region is used. If you are using other region, you have to use the correct endpoints for the APIs you wish to use. Otherwise you will obtain Invalid Token or unauthorized errors. The authoritative list of available endpoints is provided by the Storage API Index Call. The the following is a sample response:

{
    ...,
    "services": [
        {
            "id": "docker-runner",
            "url": "https:\/\/docker-runner.keboola.com"
        },
        {
            "id": "import",
            "url": "https:\/\/import.keboola.com"
        },
        {
            "id": "syrup",
            "url": "https:\/\/syrup.keboola.com"
        }
    ]
}

The services listed above are:

API Service Region URL
Storage   US https://connection.keboola.com/
Storage   EU https://connection.eu-central-1.keboola.com/
Run Jobs syrup US https://syrup.keboola.com
Run Jobs syrup EU https://syrup.eu-central-1.keboola.com
Sync Actions docker-runner US https://docker-runner.keboola.com
Sync Actions docker-runner EU https://docker-runner.eu-central-1.keboola.com
Importer import US https://import.keboola.com
Importer import EU https://import.eu-central-1.keboola.com

Important: Each of the stacks also uses its own set of IP addresses.

Calling API

There are several ways of sending requests to our APIs.

Apiary Console

Send requests to our API directly from the Apiary console by clicking on Switch to console or Try. Then fill the request headers and parameters and Call Resource.

Apiary console

The Apiary console is fine if you send API requests only occasionally. It requires no application installation; however, it has no history and no other useful features.

Postman Client

Postman is a generic HTTP API client. Use it if you work with KBC API on a more regular basis. We also provide a collection of useful API calls with examples. The collection contains code examples in various languages, the requests can also be imported into Postman application.

Postman Docs

cURL

cURL is a common library used by many systems. There is also a command-line interface (CLI) available. You can use the cURL CLI to create simple scripts working with KBC API. For example, to Run a Job, use

curl --data "{\"config\": \"sampledatabase\"}" --header "X-StorageAPI-Token: YourStorageToken" https://syrup.keboola.com/keboola.ex-db-mysql/run

To call the encryption API for R Custom Science, use

curl --data "sometext" --header "X-StorageAPI-Token: YourStorageToken" --header "Content-Type: text/plain" https://syrup.keboola.com/docker/dca-custom-science-r/encrypt