All actions for files and folders can be found in the SDK references:
The following script creates a new folder in the root directory of Files. Ensure that you:
<private_key_path>
with the path to your private key.<folder_name>
with the name you want to give your folder. We recommend using unique folder names.A folder to store my files
with a meaningful description for your folder.my: folder_metadata
with any metadata you want to add to the folder. Remove the line if you do not want to add any metadata to the folder.The following scripts initiate uploads from your cloud storage to a specified folder in Encord using a properly formatted JSON upload file. It works for all file types.
Upload is still in progress, try again later!
is returned, use the script to check the upload status to see whether the upload has finished. Ensure that you:
path/to/json/file.json
with the path to a JSON file specifying which cloud storage files should be uploaded.A folder to store my files
with a meaningful description for your folder."my": "folder_metadata"
with any metadata you want to add to the folder.To update client metadata, include the "upsert_metadata": true
flag in the upload JSON file. It can only be used in conjunction with "skip_duplicate_urls": true
.
Use the following script to check the status of your private cloud registration.
Upload is still in progress, try again later!
is returned, run the script again to check the status at a later time. Ensure that you:
<upload_job_id>
with the upload_job_id
shown in the output of the script used to start the upload. In the example output of the script provided, the upload_job_id
= c4026edb-4fw2-40a0-8f05-a1af7f465727
.<private_key_path>
with the path to your private key.<folder_name>
with the folder name. The scripts assume that the specified folder name is unique.Instead of using a JSON file to specify cloud files and URLs, you can use DataUploadItems
. This method is recommended for cloud data registrations in the specific use cases listed below.
You can increase the speed at which Image Groups are registered to Encord by including imageMetadata
for each image belonging to the image group. For this you must use the following method of importing images and creating Image Groups.
When the audioMetadata
, imageMetadata
, or videoMetadata
flags are present in the JSON file, we directly use the supplied metadata without performing any additional validation, and do not store the file on our servers. It is crucial that the metadata you provide is accurate.
Ensure that you:
<path_to_private_key>
with your private key pathimageMetadata
for your files by replacing the example values.<integration_id>
with the id of the integration you want to use for the data registration.You can create Image Groups from individual images previously added to Encord. If the individual images include clientMetadata
and are then grouped into an Image Group, this metadata is retained at the frame level within the Image Group.
The following script combines three previously uploaded images in Encord into a single Image Group.
In the following script:
<private_key_path>
with your private key path.file_names
list with the names of images to be grouped.<folder_name>
with the title for the folder containing the files.<integration_id>
with the ID of the integration being used.clientMetadata
for the image group.The following scripts add data to a folder that already exists in Files.
<folder_name>
with the name of the folder you want to add data to.User/path/to/my/file
with the path to your image or video file.User/path/to/dicom/file1
and User/path/to/dicom/file2
with the paths to the DICOM files you want to create a series from. Add as many file paths as necessary.User/path/to/image/file1
and User/path/to/image/file2
with the paths to the image files you want to create an image group or image sequence from. Add as many file paths as necessary.The following script creates a new folder in Files and uploads image, video, DICOM, image group, or image sequence files to the newly created folder. A new folder is created each time the script is run.
In the following scripts, ensure that you:
A folder to store my files
with a meaningful description for your folder.my: folder_metadata
with any metadata you want to add to the folder. Remove the line if you do not want to add any metadata to the folder.User/path/to/my/file
with the path to your image or video file.User/path/to/dicom/file1
and User/path/to/dicom/file2
with the paths to the DICOM files you want to create a series from. Add as many file paths as necessary.User/path/to/image/file1
and User/path/to/image/file2
with the paths to the image files you want to create an image group or image sequence from. Add as many file paths as necessary.Listing the files in a folder can be used to verify that all data unit were successfully uploaded.
All actions for files and folders can be found in the SDK references:
The following script creates a new folder in the root directory of Files. Ensure that you:
<private_key_path>
with the path to your private key.<folder_name>
with the name you want to give your folder. We recommend using unique folder names.A folder to store my files
with a meaningful description for your folder.my: folder_metadata
with any metadata you want to add to the folder. Remove the line if you do not want to add any metadata to the folder.The following scripts initiate uploads from your cloud storage to a specified folder in Encord using a properly formatted JSON upload file. It works for all file types.
Upload is still in progress, try again later!
is returned, use the script to check the upload status to see whether the upload has finished. Ensure that you:
path/to/json/file.json
with the path to a JSON file specifying which cloud storage files should be uploaded.A folder to store my files
with a meaningful description for your folder."my": "folder_metadata"
with any metadata you want to add to the folder.To update client metadata, include the "upsert_metadata": true
flag in the upload JSON file. It can only be used in conjunction with "skip_duplicate_urls": true
.
Use the following script to check the status of your private cloud registration.
Upload is still in progress, try again later!
is returned, run the script again to check the status at a later time. Ensure that you:
<upload_job_id>
with the upload_job_id
shown in the output of the script used to start the upload. In the example output of the script provided, the upload_job_id
= c4026edb-4fw2-40a0-8f05-a1af7f465727
.<private_key_path>
with the path to your private key.<folder_name>
with the folder name. The scripts assume that the specified folder name is unique.Instead of using a JSON file to specify cloud files and URLs, you can use DataUploadItems
. This method is recommended for cloud data registrations in the specific use cases listed below.
You can increase the speed at which Image Groups are registered to Encord by including imageMetadata
for each image belonging to the image group. For this you must use the following method of importing images and creating Image Groups.
When the audioMetadata
, imageMetadata
, or videoMetadata
flags are present in the JSON file, we directly use the supplied metadata without performing any additional validation, and do not store the file on our servers. It is crucial that the metadata you provide is accurate.
Ensure that you:
<path_to_private_key>
with your private key pathimageMetadata
for your files by replacing the example values.<integration_id>
with the id of the integration you want to use for the data registration.You can create Image Groups from individual images previously added to Encord. If the individual images include clientMetadata
and are then grouped into an Image Group, this metadata is retained at the frame level within the Image Group.
The following script combines three previously uploaded images in Encord into a single Image Group.
In the following script:
<private_key_path>
with your private key path.file_names
list with the names of images to be grouped.<folder_name>
with the title for the folder containing the files.<integration_id>
with the ID of the integration being used.clientMetadata
for the image group.The following scripts add data to a folder that already exists in Files.
<folder_name>
with the name of the folder you want to add data to.User/path/to/my/file
with the path to your image or video file.User/path/to/dicom/file1
and User/path/to/dicom/file2
with the paths to the DICOM files you want to create a series from. Add as many file paths as necessary.User/path/to/image/file1
and User/path/to/image/file2
with the paths to the image files you want to create an image group or image sequence from. Add as many file paths as necessary.The following script creates a new folder in Files and uploads image, video, DICOM, image group, or image sequence files to the newly created folder. A new folder is created each time the script is run.
In the following scripts, ensure that you:
A folder to store my files
with a meaningful description for your folder.my: folder_metadata
with any metadata you want to add to the folder. Remove the line if you do not want to add any metadata to the folder.User/path/to/my/file
with the path to your image or video file.User/path/to/dicom/file1
and User/path/to/dicom/file2
with the paths to the DICOM files you want to create a series from. Add as many file paths as necessary.User/path/to/image/file1
and User/path/to/image/file2
with the paths to the image files you want to create an image group or image sequence from. Add as many file paths as necessary.Listing the files in a folder can be used to verify that all data unit were successfully uploaded.