Low level API

Below we describe the low level API to the Quantum Inspire platform. Quantum Inspire also offers a Software Development Kit (SDK) to advanced users that will allow programatic control over all functionality using Python. For more information see the Software Development Kit page.

Application Programmer Interface (API)

Warning: the interface defined by this alpha-release may change in the future.

The REST API can be found on https://api.quantum-inspire.com/. The API can be used from the browser by following the link, and clicking through the objects in the database.

Forms are provided at the bottom of most pages to create new objects or modify existing objects.

Data model

To give you an idea of the relation between the objects in the API, please refer to this (preliminary) UML class diagram:

Core API

To make programmatic access to the API easy, a Core API schema is published on https://api.quantum-inspire.com/schema.

A basic example consumer of this schema written in Python using the coreapi module might look like this:

          import coreapi
# Note: BasicAuthentication is not recommended, use the API token instead
auth = coreapi.auth.BasicAuthentication(username='username',
# Initialize a client & load the schema document
client = coreapi.Client(auth=auth)
schema = client.get("https://dev.quantum-inspire.com/api/schema")
# Interact with the API endpoint
action = ["projects", "list"]
result = client.action(schema, action)

Direct access

It is of course also possible to directly access the API url's, for example from within Python by using the requests module:

          import requests
from requests.auth import HTTPBasicAuth
server = r'https://dev.quantum-inspire.com/api'
auth = HTTPBasicAuth(username, passwd)
result=requests.get(server+'/projects', auth=auth)
print('result status: %d' % result.status_code)