API Documentation
Page detailing all API methods to use Ango Hub programmatically.
List of API Methods
List Projects
GET
https://api.ango.ai/v2/listProjects
Returns a list of all projects visible to the user.
Example request:
curl --location --request GET 'https://api.ango.ai/v2/listProjects' --header 'Content-Type: application/json' --header 'apikey: YOUR-API-KEY-HERE'
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | Response content type. Must be |
apikey* | String | API Key obtained from hub.ango.ai/account |
Get Project
GET
https://api.ango.ai/v2/project/{project_id}
Returns information about a project, including labeling tools, consensus count, assigned users, review configuration, and name and description.
Example request:
curl --location --request GET 'https://api.ango.ai/v2/project/61602b346ee9eb45e8273fbb' --header 'Content-Type: application/json' --header 'apikey: YOUR-API-KEY-HERE'
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | Response content type. Must be |
apikey* | String | API Key obtained from hub.ango.ai/account |
Get Tasks of Project
GET
https://api.ango.ai/v2/project/{project_id}/tasks
Returns all tasks in a project, with all of their information, including labeling tools, status, etc.
Example request:
curl --location --request GET 'https://api.ango.ai/v2/project/615ffd3c455fc7000e6c45eb/tasks' --header 'Content-Type: application/json' --header 'apikey: YOUR-API-KEY-HERE'
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | Response content type. Must be |
apikey* | String | API Key obtained from hub.ango.ai/account |
Get Task
GET
https://api.ango.ai/v2/task/{task_id}
Returns all information about a task given the task's ID.
Example request:
curl --location --request GET 'https://api.ango.ai/v2/task/616433306b763c8c0e922b14' --header 'Content-Type: application/json' --header 'apikey: YOUR-API-KEY-HERE'
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | Response content type. Must be |
apikey* | String | API Key obtained from hub.ango.ai/account |
Upload File
POST
https://api.ango.ai/v2/project/{project_id}/upload
Upload local files as assets to a project. Multiple files can be uploaded with one request by sending more than one 'files' form.
Example request:
curl --location --request POST 'https://api.ango.ai/v2/project/615ffd3c455fc7000e6c45eb/upload' --header 'Content-Type: multipart/form-data' --header 'apikey: YOUR-API-KEY-HERE' --form 'files=@"/home/ofk/Pictures/Screenshot from 2021-08-29 12-06-49.png"' --form 'files=@"/home/ofk/Pictures/Screenshot from 2021-08-26 17-16-11.png"'
Headers
Name | Type | Description |
---|---|---|
apikey* | String | API Key obtained from hub.ango.ai/account |
Content-Type* | String | Response content type. Must be |
Request Body
Name | Type | Description |
---|---|---|
form* | String |
|
Upload Files from Cloud Storage
POST
https://api.ango.ai/v2/project/{project_id}/cloud
Uploads files from cloud storage to a specified Ango Hub project as assets.
Example request:
curl --location --request POST 'https://api.ango.ai/v2/project/61602b346ee9eb45e8273fbb/cloud'
--header 'Content-Type: application/json'
--header 'apikey: YOUR-API-KEY-HERE'
--data-raw '{ "assets": [ { "data": "https://angohub.s3.us-east-2.amazonaws.com/1605167545820-0b395d1ef7df81b7558f87eb47a59dda4dbe19bd.jpg", "externalId": "111" }, { "data": "https://angohub.s3.us-east-2.amazonaws.com/1605167545822-0b0b60d298c4afebed824d8ee2f793676c7835bf.jpg", "externalId": "113" } ] }'
Headers
Name | Type | Description |
---|---|---|
Content-Type* | String | Response content type. Must be |
apikey* | String | API Key obtained from hub.ango.ai/account |
Request Body
Name | Type | Description |
---|---|---|
assets* | Array | Array of objects each containing two key-value pairs: |
Create Issue
POST
https://api.ango.ai/v2/issues
Creates an issue. If a position
parameter is sent, the issue will be created at the position requested (on single images, multi-page TIFFs, video, and text only.)
Example request:
curl --location --request POST 'https://api.ango.ai/v2/issues'
--header 'apikey: YOUR-API-KEY-HERE'
--data-raw '{ "content":"Issue Text Here", "labelTask": "6143498454e17400149964d1", "position": "[50,120]" }'
Headers
Name | Type | Description |
---|---|---|
apikey* | String | API Key obtained from hub.ango.ai/account |
Request Body
Name | Type | Description |
---|---|---|
content* | String | Issue text |
labelTask* | String | ID of the label task where the issue is to be created. |
position | String | For images: stringified array with the X and Y position where the issue is to be created on the asset. Example: "[50, 120]" For text: stringified index of the character in the text where the issue will be created. Example: "54". |
page | Int | For multi-page TIFFs and videos, the zero-indexed page/frame number where the issue is to be displayed. |
Create Attachment
POST
https://api.ango.ai/v2/attachments
Adds an attachment to an existing labeling task.
Example request:
curl --location --request POST 'https://api.ango.ai/v2/attachments'
--header 'apikey: YOUR-API-KEY-HERE'
--data-raw '{
"project": "61d444045e299635ed689056",
"attachments": [
{
"data": "https://angohub-public-assets.s3.eu-central-1.amazonaws.com/uploaded-data-0a0988b2-d6ca-420e-97e6-577b96417989.png",
"externalId": "uploaded-data-65dfb652-d7c8-4fa5-b6d5-de6bfe2a4365.png",
"attachments": [
{
"type": "IMAGE",
"value": "https://sample-image.jpg"
},
{
"type": "VIDEO",
"value": "http://sample-video.mp4"
},
{
"type": "TEXT",
"value": "Some sample text"
}
]
}
]
}'
Headers
Name | Type | Description |
---|---|---|
apikey* | String | API Key obtained from hub.ango.ai/account |
Request Body
Name | Type | Description |
---|---|---|
project* | String | ID of the project where the attachment is to be created. Found at the end of the project URL. |
attachments* | Array | Array of objects describing task/attachment pairs. See example. |
data* | String | URL to the asset where the attachment is to be added. |
externalId* | String | External ID of the asset. Found in the project under the Assets tab. |
type* | String | Attachment data type. Available types are IMAGE, VIDEO, and TEXT. Supported IMAGE file types are .png and .jpg. The supported video type is .mp4, and the supported text type is .txt. |
value* | String | In case the type is TEXT, the content of the attachment in plain text. In case the type is IMAGE or VIDEO, a URL linking to the image or video. |
Last updated