Lodol Docs

Encord

API actions for the Encord integration.

Encord

Connect to Encord for data annotation, labeling, and active learning project management.


Add users to project

Add users to an Encord project with a specified role.

Parameters

ParameterTypeRequiredDescription
project_hashstringYesThe project hash to add users to
user_emailsarrayYesList of email addresses to add
user_rolestringYesRole for the users (e.g., annotator, reviewer, admin)

Response

{
  "users_added": [
    {
      "user_email": "new_user@example.com",
      "user_role": "annotator"
    }
  ]
}

Create dataset

Create a new Encord dataset for storing data units.

Parameters

ParameterTypeRequiredDescription
titlestringYesTitle for the new dataset
descriptionstringNoDataset description
storage_locationstringNoStorage backend (CORD_STORAGE, AWS, GCP, AZURE)

Response

{
  "dataset_hash": "new_ds_abc123",
  "title": "My Dataset"
}

Create ontology

Create a new Encord ontology defining annotation categories.

Parameters

ParameterTypeRequiredDescription
titlestringYesTitle for the new ontology
descriptionstringNoOntology description
structureobjectNoOntology structure in Encord SDK format (objects with id, name, color, shape, featureNodeHash fields)

Response

{
  "ontology_hash": "new_ont_abc123",
  "title": "My Ontology"
}

Create project

Create a new Encord project with specified datasets and ontology.

Parameters

ParameterTypeRequiredDescription
titlestringYesTitle for the new project
dataset_hashesarrayYesList of dataset hash identifiers to attach
descriptionstringNoProject description
ontology_hashstringNoOntology hash to associate with the project

Response

{
  "project_hash": "new_proj_abc123"
}

Create storage folder

Create a new storage folder in Encord.

Parameters

ParameterTypeRequiredDescription
namestringYesName of the new folder
descriptionstringNoFolder description
parent_folder_uuidstringNoUUID of the parent folder (creates at root if omitted)

Response

{
  "name": "New Folder",
  "uuid": "f1a2b3c4-d5e6-7890-abcd-ef1234567890"
}

Export labels (COCO format)

Export project labels in COCO format.

Parameters

ParameterTypeRequiredDescription
project_hashstringYesThe project hash to export labels from
label_hashesarrayNoSpecific label hashes to export (exports all if omitted)

Response

{
  "coco_labels": {
    "annotations": [
      {
        "category_id": 1,
        "id": 1,
        "image_id": 1
      }
    ],
    "categories": [
      {
        "id": 1,
        "name": "cat"
      }
    ],
    "images": [
      {
        "file_name": "image_001.png",
        "id": 1
      }
    ]
  }
}

Get dataset details

Retrieve detailed information about a specific Encord dataset.

Parameters

ParameterTypeRequiredDescription
dataset_hashstringYesThe unique hash identifier of the dataset

Response

{
  "dataset_hash": "ds_abc123",
  "description": "Product training images",
  "title": "Training Images"
}

Get ontology details

Retrieve detailed information about a specific Encord ontology.

Parameters

ParameterTypeRequiredDescription
ontology_hashstringYesThe unique hash identifier of the ontology

Response

{
  "description": "Bounding box ontology",
  "ontology_hash": "ont_abc123",
  "structure": {
    "classifications": [],
    "objects": []
  },
  "title": "Object Detection"
}

Get project details

Retrieve detailed information about a specific Encord project.

Parameters

ParameterTypeRequiredDescription
project_hashstringYesThe unique hash identifier of the project

Response

{
  "created_at": "2024-01-15T10:30:00Z",
  "description": "Classify product images",
  "ontology_hash": "ont789xyz",
  "project_hash": "abc123def456",
  "status": "open",
  "title": "Image Classification Project"
}

Get workflow stages

List all workflow stages for an Encord project.

Parameters

ParameterTypeRequiredDescription
project_hashstringYesThe project hash to get workflow stages for

Response

{
  "stages": [
    {
      "stage_type": "AnnotationStage",
      "title": "Annotation",
      "uuid": "s1a2b3c4-d5e6-7890-abcd-ef1234567890"
    },
    {
      "stage_type": "ReviewStage",
      "title": "Review",
      "uuid": "s2a2b3c4-d5e6-7890-abcd-ef1234567890"
    }
  ]
}

List datasets

List all Encord datasets, optionally filtering by title.

Parameters

ParameterTypeRequiredDescription
title_likestringNoFilter datasets by title (partial match)

Response

{
  "datasets": [
    {
      "created_at": "2024-01-10T08:00:00Z",
      "dataset_hash": "ds_abc123",
      "description": "Product training images",
      "title": "Training Images"
    }
  ]
}

List groups

List all workspace groups in Encord.

Response

{
  "groups": [
    {
      "group_hash": "grp_abc123",
      "name": "Annotation Team"
    }
  ]
}

List label rows

List label rows for an Encord project with optional filters.

Parameters

ParameterTypeRequiredDescription
project_hashstringYesThe project hash to list labels from
data_title_likestringNoFilter by data title (partial match)
label_statusesarrayNoFilter by label statuses

Response

{
  "label_rows": [
    {
      "annotation_task_status": "COMPLETED",
      "created_at": "2024-02-01T12:00:00Z",
      "data_hash": "data_xyz789",
      "data_title": "image_001.png",
      "label_hash": "lbl_abc123",
      "label_status": "LABELLED"
    }
  ]
}

List ontologies

List all Encord ontologies, optionally filtering by title.

Parameters

ParameterTypeRequiredDescription
title_likestringNoFilter ontologies by title (partial match)

Response

{
  "ontologies": [
    {
      "description": "Bounding box ontology",
      "ontology_hash": "ont_abc123",
      "title": "Object Detection"
    }
  ]
}

List project users

List all users with access to an Encord project.

Parameters

ParameterTypeRequiredDescription
project_hashstringYesThe project hash to list users for

Response

{
  "users": [
    {
      "user_email": "annotator@example.com",
      "user_role": "annotator"
    }
  ]
}

List projects

List all Encord projects, optionally filtering by title.

Parameters

ParameterTypeRequiredDescription
title_likestringNoFilter projects by title (partial match)

Response

{
  "projects": [
    {
      "created_at": "2024-01-15T10:30:00Z",
      "description": "Classify product images",
      "project_hash": "abc123def456",
      "status": "open",
      "title": "Image Classification Project"
    }
  ]
}

List storage folders

List Encord storage folders, optionally searching by name.

Parameters

ParameterTypeRequiredDescription
searchstringNoSearch term to filter folders by name

Response

{
  "folders": [
    {
      "description": "Folder for training images",
      "name": "Training Data",
      "uuid": "f1a2b3c4-d5e6-7890-abcd-ef1234567890"
    }
  ]
}

List storage items

List items in an Encord storage folder.

Parameters

ParameterTypeRequiredDescription
folder_uuidstringYesUUID of the storage folder
searchstringNoSearch term to filter items

Response

{
  "items": [
    {
      "item_type": "image",
      "name": "image_001.png",
      "uuid": "i1a2b3c4-d5e6-7890-abcd-ef1234567890"
    }
  ]
}

Move workflow task

Move a task to the next stage or a specific destination in the workflow.

Parameters

ParameterTypeRequiredDescription
project_hashstringYesThe project hash
data_hashstringYesThe data hash identifying the task
stage_uuidstringYesThe UUID of the current workflow stage
pathway_namestringNoAction to take: 'submit' (advance annotation), 'approve' or 'reject' (review tasks)
destination_stage_uuidstringNoUUID of the destination stage (bypasses normal flow)

Response

{
  "status": "success"
}

Upload data to dataset

Upload cloud-hosted data to an Encord dataset via integration.

Parameters

ParameterTypeRequiredDescription
dataset_hashstringYesThe dataset hash to upload data to
integration_idstringYesCloud integration ID (from Encord platform settings)
file_urlsarrayYesList of cloud file URLs or a JSON config object

Response

{
  "data_hashes": [
    "data_abc123",
    "data_def456"
  ],
  "dataset_hash": "ds_abc123",
  "status": "success"
}

On this page