2. Step by step guide

2.1. API Key generation

  1. Register on the Zillin website https://zillin.io/

  2. Go to the ‘API’ tab.

  3. Add key:

alternate text

  1. The newly generated key will be shown below.

alternate text

2.2. Choosing API Version

To make a request to specific API version, you need to add authentication header with name ‘api-version’ and value of version e.g ‘2.0’

If no header will be present, the request will be sent to the default version. Currently, the default version is 1.0.

Additionally, we have added response headers ‘api-supported-versions’ and ‘api-deprecated-versions’ with information about current supported and deprecated versions.

2.3. First request

Descriptions of available methods can be found here: https://api.zillin.io/swagger

Each request requires authorization header with API key: “Authorization: c4dc6d89c92f453d8d67e571120b3bb4”

Requests can be made in many different ways like:

2.3.1. Using our site

  1. Go to: https://api.zillin.io/swagger

  2. Click the ‘Authorize’ button.

alternate text

  1. Paste and confirm API key.

alternate text

  1. Choose desired method e.g ‘get datasets’

alternate text

  1. Click ‘try it out’ button

alternate text

  1. Set required workspaceId parameter (can be obtained by ‘get workspaces’ method) and optionally API version.

alternate text

  1. Click ‘execute’ button

alternate text

  1. The response body with response headers will be shown below.

alternate text

2.3.2. Using Postman

  1. Choose a method, URL and set authorization type to ‘No Auth’

alternate text

  1. Move to the headers tab, add required headers:

alternate text

  1. Move to the params tab, add required paramater and send request:

alternate text

  1. Response body and headers will be shown below

alternate text

2.3.3. Using command line with curl

Authorization header: “Authorization: c4dc6d89c92f453d8d67e571120b3bb4”

API version header: “api-version: 1”

Response type header: “accept: text/plain”

Choosen method: GET “https://api.zillin.io/api/Datasets

  1. Run the whole command:

curl -X GET “https://api.zillin.io/api/Datasets” -H “Authorization: c4dc6d89c92f453d8d67e571120b3bb4” -H “api-version: 1” -H “accept: text/plain”

alternate text

  1. The response will be shown below:

alternate text

2.4. Using API in your own application

To use API in your application you need to generate a client.

Many developers still hardcode their clients. It might not be a good solution, because it increases the possibilities of bugs in the specification. It is inefficient as well. The better way to generate your clients is to use a swagger editor.

2.4.1. Generating client with the online swagger editor

  1. Go to page https://editor.swagger.io/

  2. Select ‘file’ and ‘import URL’

alternate text

  1. Find the desired URL on our website https://api.zillin.io/swagger

  2. Choose the version and click the link from the left:

alternate text

  1. Paste URL into the box and click the ‘ok’ button.

alternate text

  1. Choose the desired language e.g python

alternate text

  1. Save the zip file. The ‘swagger_client’ folder will display models and APIs:

alternate text