Skip to main content

Getting started

The Cord API allows you to query resources (e.g. labels, datasets), and interact with our automation features programmatically.

To call this service, we recommend that you use the Cord-provided Python client. If your application needs to use your own libraries to call this service, use the following information when you make the API requests.

The Cord API has the following endpoint and all URIs below are relative to this endpoint:


https://api.cord.tech/public

Installation and authentication#

Create API key#

Start by creating an API key for authentication. API keys are specific to projects or datasets. You can generate multiple API keys for each project or dataset.

  1. To create an API key, log in to your account on app.cord.tech.

  2. Navigate to the 'Projects' or 'Datasets' tab in the navigation menu. Select a project or dataset.

  3. Select the 'Settings' tab in the project or dataset menu. Select 'API keys'.

  4. Click on the 'Create API key' button as illustrated below. Select relevant scopes and click 'Create'.

Create API key
  1. Copy your API key and make a note of project or dataset ID. The API key is only displayed once.

Fetching project information#

Fetch information associated with a given project. Replace <resource_id> and <resource_api_key> with a project ID and API key.


curl --location --request POST 'https://api.cord.tech/public' \--header 'Content-Type: application/json' \--header 'ResourceID: <resource_id>' \--header 'Authorization: <resource_api_key>' \--header 'Accept: application/json' \--data-raw '{    "query_type": "project",    "query_method": "GET",    "values": {        "uid": null,        "payload": null    }}'

Equivalently using NodeJS with Axios:


var axios = require('axios');var data = JSON.stringify(  {    "query_type": "project",    "query_method":"GET",    "values": {      "uid": null,      "payload": null    }  });
var config = {  method: 'post',  url: 'https://api.cord.tech/public',  headers: {    'Content-Type': 'application/json',    'ResourceID': '<resource_id>',    'Authorization': '<resource_api_key>',    'Accept': 'application/json'  },  data : data};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});

Fetching dataset information#

Fetch information associated with a given dataset. Replace <resource_id> and <resource_api_key> with a dataset ID and API key.


curl --location --request POST 'https://api.cord.tech/public' \--header 'Content-Type: application/json' \--header 'ResourceID: <resource_id>' \--header 'Authorization: <resource_api_key>' \--header 'Accept: application/json' \--data-raw '{    "query_type": "dataset",    "query_method": "GET",    "values": {        "uid": null,        "payload": null    }}'

Equivalently using NodeJS with Axios:


var axios = require('axios');var data = JSON.stringify(  {    "query_type": "dataset",    "query_method":"GET",    "values": {      "uid": null,      "payload": null    }  });
var config = {  method: 'post',  url: 'https://api.cord.tech/public',  headers: {    'Content-Type': 'application/json',    'ResourceID': '<resource_id>',    'Authorization': '<resource_api_key>',    'Accept': 'application/json'  },  data : data};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});