Working with Datasets (API)
Creating a Dataset
You can use the API to create a Dataset using the example below. However, you need to create a public-private key pair for Encord first.
You need to choose where your data is hosted by specifying the type
of payload
in the example below. This determines the type of Dataset being created.
Storage location | Payload type argument |
---|---|
Encord storage | 0 |
AWS S3 | 1 |
GCP | 2 |
Azure blob | 3 |
Adding data
Adding data to Encord-hosted storage
Uploading videos
To upload a video to an Encord storage dataset, run the uploadVideo
function with the file path to the desired video as an input. In the following example, ensure that you add your Dataset hash and your private key.
Uploading single images
To upload a video to an Encord storage dataset, run the uploadImage
function with the file path to the desired image as an input.
Uploading image groups
Use the function createImageGroup
to upload and create an image group using Encord storage.
Adding data from private cloud
- Use the API to retrieve a list of available Cloud Integrations.
- Grab the id from the integration of your choice and call the API to add the data as a JSON file in the format specified by the private cloud section of the Dataset documentation.
Deleting data from a dataset
The following example works for videos, image groups, images, and DICOM series.
Was this page helpful?