Skip to content

An Example Client


The client used throughout these pages serves as an example. The Python programming language has been chosen both for the its clarity and ubiquity. There are intentionally no library dependencies. If you are working with ${LANGUAGE} and need a client, you can use this example as a reference while consulting the complete JSON schemas.

Getting Started


  1. You have a working installation of Python 3.
  2. You are familiar with the variables ARDOQ_API_HOST, ARDOQ_API_TOKEN and ARDOQ_ORL_LABEL described in the previous section.


  1. Create a new directory called ardoq_api_examples. It doesn't matter where where the directory is located.
  2. Download the Example Ardoq Client and place it in the directory. It should have the name
  3. Create a new file called and place it in the directory.

Testing the Client

In order to test the client and your credentials we can query the /api/v2/me endpoint. Modify the newly created file to contain the following:

import example_ardoq_client
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("--host", metavar="ARDOQ_API_HOST", type=str, help="host name")
parser.add_argument("--org", metavar="ARDOQ_ORG_LABEL", type=str, help="org label")
parser.add_argument("--token", metavar="ARDOQ_API_TOKEN", type=str, help="API Token")

if __name__ == "__main__":
    args = parser.parse_args()

    api = example_ardoq_client.API(,, ardoq_api_token=args.token


Assuming that you have an API token 12345 that grants you access to myorg hosted on a custom domain

python3 --host --token XXXXXXXX

Should display something similar.

Using Ardoq host:
Using API token ending: ...XXXX
Using Org Label: <NOT PROVIDED>
{'org': {'label': 'myorg', 'name': 'My Org'}, 'user': {'email': ''}}

If you are not using a custom domain (ie your Ardoq instance is hosted on then you could use the following

python3 --org myorg --token XXXXXXXX
Which would display
Using Ardoq host:
Using API token ending: ...XXXX
Using Org Label: myorg
{'org': {'label': 'myorg', 'name': 'My Org'}, 'user': {'email': ''}}


If you get an unexpected result please make sure that you have read the section about making a request.