📂 Create a Dataset from a local folder for On-Prem installations
Overview
This guide explains how to use the API to trigger dataset creation and processing for the visual layer. You will learn how to construct and send an API request to initiate dataset processing.
API Endpoint
http://[host]:2080/api/v1/process?path=[full data folder path]&name=[dataset name]
Request Parameters
Parameter | Description |
---|---|
host | The server address where the API is hosted. |
path | The full path to the data folder containing the files for processing. |
name | The desired name for the dataset. |
Example Request
Assume you have a dataset stored at /data/project/images
on the server, and you want to create a dataset named visual_analysis_01
. Your API request should be:
http://example.com:2080/api/v1/process?path=/data/project/images&name=visual_analysis_01
API Response
Upon successful execution, the API will return a JSON response indicating the status of the dataset creation process referring to the dataset_id.
Example Response
{
"status": "success",
"message": "Dataset processing started",
"dataset_id": "12345",
"name": "visual_analysis_01"
}
Error Handling
If there is an issue with the request, the API will return an error message. Possible errors include:
- Invalid Path: The specified path does not exist.
- Missing Parameters: Either
path
orname
is missing. - Server Error: Internal server issues preventing processing.
Example Error Response
{
"status": "error",
"message": "Invalid path specified"
}
Additional Notes
- Only one dataset can be precessed at a time.
- Additional datasets will be refused as long as there is a processing dataset in progress.
- Ensure the API server is accessible and running.
- The specified
path
must be valid and contain the necessary files for processing. - The dataset name should be unique to avoid conflicts with existing datasets.
Conclusion
By following this guide, you can efficiently trigger dataset creation and processing using the API. If you encounter issues, check the error messages or consult your API administrator for further troubleshooting.
Updated about 6 hours ago