Skip to content

Rest API

All Arkindex features are usable through its Rest API. You can view all the available endpoints and their parameters in the OpenAPI specification.

In the API, a project is currently referred to as a corpus, although this will change in the future.

Reference of a single API Endpoint

Clients

We have open-sourced two API clients in Python to ease the usage of our platform.

Python API client

A low-level API client in Python is available on PyPI as arkindex-client. Its source code is freely available on this repository.

You can install it on your computer (provided you have Python 3.6+ installed) using pip:

pip install arkindex-client

You’ll then be able to write scripts that can use Arkindex API, using OpenAPI endpoint names:

# Example script to list pages in a project
from arkindex import ArkindexClient
api = ArkindexClient()
api.login('client@company.com', 'PASSWORD')

for element in api.paginate('ListElements', corpus='some project', type='page'):
    print(element['name'])

More documentation is available on the official package page.

Command line tool

A more high-level tool is available using the command line. It implements common operations to be more efficient with Arkindex. It is available on PyPI as arkindex-cli. Its source code is freely available on this repository.

A dedicated detailed documentation is available at cli.arkindex.org.

The arkindex-cli project can be installed (provided you have Python 3.6+ installed) using pip:

pip install arkindex-cli

For example, you can upload a list of IIIF images on the server:

arkindex login
arkindex upload iiif-images my_list.txt project_id

For a list of all the available commands, and usage examples, see the CLI documentation.