REST API V2
V2 REST API References for Image Annotation (Bounding Box / Segmentation)
API Overview for Image Annotation (Bounding Box / Segmentation)
Verb | Endpoint | Description |
GET | /v2/labelfiles | Get the loading status when selecting a label file |
GET | /v2/folders | Get the folder status when selecting a project folder |
GET | /v2/:annotation_type/projects/:project_name | Get the status of creating a project |
GET | /v2/:annotation_type/projects/:project_name/reloadstatus | Get the reload status on refreshing/reloading a project |
GET | /v2/:annotation_type/projects/importstatus | Get the status of importing a project configuration file |
GET | /v2/:annotation_type/projects/exportstatus | Get the status of exporting a project |
GET | /v2/:annotation_type/projects/:project_name/statistic | Get the statistics of a project |
GET | /v2/:annotation_type/projects/:project_name/addstatus | Get the add images status of a project |
PUT | /:annotation_type/projects/:project_name/star | Toggle the starring status of a project |
PUT | /v2/labelfiles | Select a label text file |
PUT | /v2/folders | Select a project folder |
PUT | /v2/projects | Create a new project with preferred options |
PUT | /v2/:annotation_type/projects/:project_name/reload | Reload/refresh a project by rechecking through the project folder |
PUT | /v2/:annotation_type/projects/:project_name/export/:export_type | Start export process of a project. |
PUT | /v2/:annotation_type/projects/:projectname/rename/:new_project_name | Rename an existing project to a new unique project name |
PUT | /:annotation_type/projects/:project_name | Close a project |
PUT | /v2/:annotation_type/projects/:project_name/imgsrc/rename | Rename project data |
PUT | v2/:annotation_type/projects/:project_name/add | Add images to a project |
DELETE | /v2/:annotation_type/projects/:project_name/uuids | Delete project data |
:annotation_type accepts the following parameter
bndbox
Example: /bndbox/projects/helloworld
seg .
Example: /seg/projects/helloworld
for the corresponding image annotation techniques.
API Detailed Walkthrough
Get the loading status when selecting a label file
GET
http://localhost:{port}/v2/labelfiles
Get the loading status when selecting a label file
Path Parameters
Name | Type | Description |
---|---|---|
string |
Get the folder status when selecting a project folder
GET
http://localhost:{port}/v2/folders
Get the folder status when selecting a project folder.
Path Parameters
Name | Type | Description |
---|---|---|
string |
Get the status of creating a project
GET
http://localhost:{port}/v2/:annotation_type/projects/:project_name
Get the status of creating a project.
Path Parameters
Name | Type | Description |
---|---|---|
project_name* | string | Project name |
annotation_tye* | string | Type of annotation |
Get the reload status on refreshing/reloading a project.
GET
http://localhost:{port}/v2/:annotation_type/projects/:project_name/reloadstatus
Get the reload status of refreshing/reloading a project.
Path Parameters
Name | Type | Description |
---|---|---|
project_name* | string | Project name |
annotation_type* | string | Type of annotation |
Get the status of importing a project configuration file
GET
http://localhost:{port}/v2/:annotation_type/projects/importstatus
Check the status of importing a project configuration file.
Path Parameters
Name | Type | Description |
---|---|---|
annotation_type* | string | Type of annotation |
Get the status of exporting a project
GET
http://localhost:{port}/v2/:annotation_type/projects/exportstatus
To check the export status of a project. Should be called after calling export api
Path Parameters
Name | Type | Description |
---|---|---|
annotation_type* | string | Type of annotation |
Get the statistics of a project
GET
http://localhost:{port}/v2/:annotation_type/projects/:project_name/statistic
To get the number of labeled images, the number of unlabeled images, and the number of labels per class in a project
Path Parameters
Name | Type | Description |
---|---|---|
project_name* | string | Name of project |
annotation_type* | string | Type of annotation |
Get the add images status of a project
GET
http://localhost:{port} /v2/:annotation_type/projects/:project_name/addstatus
To get the status of added images to a project
Path Parameters
Name | Type | Description |
---|---|---|
annotation_type* | String | Type of annotation |
project_name* | String | Project name |
Toggle the starring status of a project
PUT
http://localhost:{port}/:annotation_type/projects/:project_name/star
Toggle the starring status of a project to be on or off.
Path Parameters
Name | Type | Description |
---|---|---|
project_name* | string | Project name |
annotation_type* | string | Type of annotation |
Request Body
Name | Type | Description |
---|---|---|
status | string | Status of the starring of a project Only accept "true" and "false" |
Select a label text file
PUT
http://localhost:{port}/v2/labelfiles
Select and load a label text file.
Path Parameters
Name | Type | Description |
---|---|---|
string |
Select a project folder
PUT
http://localhost:{port}/v2/folders
Select a folder for a new project.
Path Parameters
Name | Type | Description |
---|---|---|
string |
Create a new project
PUT
http://localhost:{port}/v2/projects
Create a new project name with preferred options
Request Body
Name | Type | Description |
---|---|---|
status | string | Options of new project: "raw" for creating project from scratch, "config" for importing project from json file |
project_name | string | New project name |
annotation_type | string | Type of annotation |
project_path | string | Absolute path of a folder with data |
label_file_path | string | Absolute path of a label file |
Export project
PUT
http://localhost:{port}/v2/:annotation_type/projects/:project_name/export/:export_type
Export project into either a configuration file or zipped file (configuration file with data points). Will only start export process. Get the status of project by calling export status api.
Path Parameters
Name | Type | Description |
---|---|---|
export_type* | string | Type of export file Parameter : "cfg": for config files only "cfgdata": for config files with data |
project_name* | string | Project name |
annotation_type* | string | Type of annotation |
Rename an existing project to a new unique project name
PUT
http://localhost:{port}/v2/:annotation_type/projects/:project_name/rename/:new_project_name
Rename an existing project to a new unique project name.
Path Parameters
Name | Type | Description |
---|---|---|
new_project_name* | string | New project name |
project_name* | string | Project name |
annotation_type* | string | Type of annotation |
Close a project
PUT
http://localhost:{port}/projects/:project_name
Indicate the closing state of a project.
Path Parameters
Name | Type | Description |
---|---|---|
project_name* | string | Project name |
Request Body
Name | Type | Description |
---|---|---|
status | string | State of the project as "closed" Example: { "status": "closed"} |
Rename project data
PUT
http://localhost:{port}/v2/:annotation_type/projects/:project_name/imgsrc/rename
Rename data points of a project. Used inside project workspace. API requires a json body.
Path Parameters
Name | Type | Description |
---|---|---|
project_name* | string | Name of current project to rename data |
annotation_type* | string | Type of annotation |
Request Body
Name | Type | Description |
---|---|---|
new_fname | string | New data filename to change |
uuid | string | uuid of data |
Add images to project
PUT
http://localhost:{port}/v2/:annotation_type/projects/:project_name/add
Add selected images from source folder to project folder
Path Parameters
Name | Type | Description |
---|---|---|
annotation_type* | String | Type of annotation |
project_name* | String | Project name |
Delete project data
DELETE
http://localhost:{port}/v2/:annotation_type/projects/:project_name/uuids
Deleting data from project. Will modify the data points in the root folder. When performing deletion, data is placed in a deleted folder.
Path Parameters
Name | Type | Description |
---|---|---|
project_name* | string | Name of current project |
annotation_type* | string | Type of annotation |
Request Body
Name | Type | Description |
---|---|---|
img_path_list | array | Array of strings of data path. |
uuid_list | array | Array of strings of uuid of data. Does not support multiple delete for now. |
Last updated