# Import/Export

Bulk data import and export

## Submit Annotation

> Submits annotation answer for a task

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Import/Export","description":"Bulk data import and export"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"AnnotateRequest":{"type":"object","required":["answer"],"properties":{"answer":{"type":"object","description":"Annotation answer object (structure depends on project categorySchema)"}}},"LabelResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"label":{"$ref":"#/components/schemas/LabelTask"}}}}},"LabelTask":{"type":"object","properties":{"_id":{"type":"string"},"project":{"type":"string"},"asset":{"type":"string"},"stage":{"type":"string"},"status":{"type":"string"},"assignee":{"type":"string"},"externalId":{"type":"string"},"batches":{"type":"array","items":{"type":"string"}},"priority":{"type":"number"},"answer":{"type":"object"},"createdAt":{"type":"string","format":"date-time"},"completedAt":{"type":"string","format":"date-time"},"duration":{"type":"number","description":"Duration in seconds"}}}}},"paths":{"/annotate/{taskId}":{"post":{"tags":["Import/Export"],"summary":"Submit Annotation","description":"Submits annotation answer for a task","operationId":"annotateTask","parameters":[{"name":"taskId","in":"path","required":true,"schema":{"type":"string"},"description":"Task ID"},{"name":"isPlugin","in":"query","schema":{"type":"string","enum":["true","false"]},"description":"Set to 'true' if annotation from plugin"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnnotateRequest"}}}},"responses":{"200":{"description":"Annotation submitted successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelResponse"}}}}}}}}}
```

## Import Attachments

> Imports attachments and associates them with assets

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Import/Export","description":"Bulk data import and export"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"ImportAttachmentsRequest":{"type":"object","required":["project","attachments"],"properties":{"project":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","required":["attachmentUrl"],"properties":{"assetId":{"type":"string"},"externalId":{"type":"string"},"attachmentUrl":{"type":"string"},"attachmentType":{"type":"string"}}}}}},"ImportAttachmentsResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"project":{"type":"object","properties":{"attachmentsImported":{"type":"integer"},"assetsUpdated":{"type":"integer"}}}}}}}}},"paths":{"/attachments":{"post":{"tags":["Import/Export"],"summary":"Import Attachments","description":"Imports attachments and associates them with assets","operationId":"importAttachments","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportAttachmentsRequest"}}}},"responses":{"200":{"description":"Attachments imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportAttachmentsResponse"}}}}}}}}}
```

## Import Labels

> Imports pre-labeled data into a project

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Import/Export","description":"Bulk data import and export"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"ImportLabelsRequest":{"type":"object","required":["project","labels"],"properties":{"project":{"type":"string"},"labels":{"type":"array","items":{"type":"object","required":["answer"],"properties":{"assetId":{"type":"string"},"externalId":{"type":"string"},"answer":{"type":"object"},"status":{"type":"string"},"assignee":{"type":"string"}}}}}},"ImportLabelsResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"project":{"type":"string","description":"Success message indicating labeled task count"}}}}}}},"paths":{"/import/labels":{"post":{"tags":["Import/Export"],"summary":"Import Labels","description":"Imports pre-labeled data into a project","operationId":"importLabels","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportLabelsRequest"}}}},"responses":{"200":{"description":"Labels imported successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportLabelsResponse"}}}}}}}}}
```

## Export Tasks

> Exports task data from projects in various formats

```json
{"openapi":"3.0.3","info":{"title":"Ango Hub API v2","version":"2.0.0"},"tags":[{"name":"Import/Export","description":"Bulk data import and export"}],"servers":[{"url":"https://imeritapi.ango.ai/v2","description":"EU Production Server"},{"url":"https://us-api.ango.ai/v2","description":"US Production Server"},{"url":"https://in-api.ango.ai/v2","description":"India Production Server"},{"url":"https://testapi.ango.ai/v2","description":"Test Server"}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"apikey","description":"API key for authentication. Format - apikey YOUR_API_KEY"}},"schemas":{"ExportResponse":{"type":"object","properties":{"status":{"type":"string"},"data":{"type":"object","properties":{"exportPath":{"type":"string"}}}}}}},"paths":{"/export":{"get":{"tags":["Import/Export"],"summary":"Export Tasks","description":"Exports task data from projects in various formats","operationId":"exportTasks","parameters":[{"name":"project","in":"query","required":true,"schema":{"type":"string"},"description":"Project ID"},{"name":"format","in":"query","schema":{"type":"string","enum":["json","split","ndjson"],"default":"json"},"description":"Export format"},{"name":"type","in":"query","schema":{"type":"string","enum":["task","issue"],"default":"task"},"description":"Export type (task or issue)"},{"name":"stage","in":"query","schema":{"type":"string"},"description":"Filter by stages (JSON array string, e.g., [\"Complete\"])"},{"name":"batches","in":"query","schema":{"type":"string"},"description":"Filter by batches (JSON array string, e.g., [\"Batch1\"])"},{"name":"sendEmail","in":"query","schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Send export download link via email"},{"name":"doNotNotify","in":"query","schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Do not send notifications about export"},{"name":"includeMetadata","in":"query","schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Include asset metadata in export"},{"name":"includeHistory","in":"query","schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Include task history (all state changes)"},{"name":"includeOnlyKeyFrames","in":"query","schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Include only key frames for video annotations"},{"name":"includeIdleBlurDurations","in":"query","schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Include idle and blur duration statistics"},{"name":"updatedAt","in":"query","schema":{"type":"string"},"description":"Filter by update date (JSON object, e.g., {\"$gt\":\"2020-08-19T07:37:15.000000Z\",\"$lt\":\"2020-08-26T07:37:15.000000Z\"})"},{"name":"createdAt","in":"query","schema":{"type":"string"},"description":"Filter by creation date (JSON object, e.g., {\"$gt\":\"2020-07-27T07:37:15.000000Z\",\"$lt\":\"2020-08-26T07:37:15.000000Z\"})"},{"name":"filters","in":"query","schema":{"type":"string"},"description":"MongoDB-style filter object for advanced task filtering (JSON string).\nSupports any MongoDB query operators on task fields.\nCommon use cases:\n- Filter by task IDs: {\"_id\": {\"$in\": [\"taskId1\", \"taskId2\"]}}\n- Filter by assignee: {\"assignee\": \"user@example.com\"}\n- Filter by external ID: {\"externalId\": {\"$regex\": \"^prefix_\"}}\n"}],"responses":{"200":{"description":"Export prepared successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExportResponse"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.imerit.net/api/docs/import-export.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
