Aana API (0.1.0)

Download OpenAPI description
Languages
Servers
https://v1.api.aana.ai/

Analyze

Operations

Indexing

Operations

Collections

Operations

Webhooks

Operations

Tasks

Operations

Count Tasks

Request

Count tasks per status.

curl -i -X GET \
  https://v1.api.aana.ai/tasks/count \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

Successful Response

Bodyapplication/json
createdinteger or null

The number of tasks in the CREATED status.

assignedinteger or null

The number of tasks in the ASSIGNED status.

completedinteger or null

The number of tasks in the COMPLETED status.

runninginteger or null

The number of tasks in the RUNNING status.

failedinteger or null

The number of tasks in the FAILED status.

not_finishedinteger or null

The number of tasks in the NOT_FINISHED status.

totalintegerrequired

The total number of tasks.

Response
application/json
{ "created": 0, "assigned": 0, "completed": 0, "running": 0, "failed": 0, "not_finished": 0, "total": 0 }

Get Task Status

Request

Get the task status by task ID.

Path
task_idstringrequired

The task ID.

Example: 11111111-1111-1111-1111-111111111111
curl -i -X GET \
  https://v1.api.aana.ai/tasks/11111111-1111-1111-1111-111111111111 \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

Successful Response

Bodyapplication/json
idstringrequired

The task ID.

Example: "11111111-1111-1111-1111-111111111111"
endpointstringrequired

The endpoint to which the task is assigned.

dataanyrequired

The task data.

statusstringrequired

The task status.

Enum"created""assigned""completed""running""failed""not_finished"
resultany

The task result.

Response
application/json
{ "data": { "image": {} }, "endpoint": "/index", "id": "11111111-1111-1111-1111-111111111111", "status": "running" }

Delete Task

Request

Delete the task by task ID.

Path
task_idstringrequired

The task ID.

Example: 11111111-1111-1111-1111-111111111111
curl -i -X DELETE \
  https://v1.api.aana.ai/tasks/11111111-1111-1111-1111-111111111111 \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

Successful Response

Bodyapplication/json
idstringrequired

The task ID.

Example: "11111111-1111-1111-1111-111111111111"
endpointstringrequired

The endpoint to which the task is assigned.

dataanyrequired

The task data.

statusstringrequired

The task status.

Enum"created""assigned""completed""running""failed""not_finished"
resultany

The task result.

Response
application/json
{ "data": { "image": {} }, "endpoint": "/index", "id": "11111111-1111-1111-1111-111111111111", "status": "running" }

List Tasks

Request

List all tasks.

Query
statusstring or null

Filter tasks by status. If None, all tasks are returned.

Enum"created""assigned""completed""running""failed""not_finished"
pageinteger

The page number.

Default 1
per_pageinteger

The number of tasks per page.

Default 100
curl -i -X GET \
  'https://v1.api.aana.ai/tasks?page=1&per_page=100&status=created' \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

Successful Response

Bodyapplication/json
tasksArray of objectsrequired

The list of tasks.

idstringrequired

The task ID.

Example: "11111111-1111-1111-1111-111111111111"
endpointstringrequired

The endpoint to which the task is assigned.

dataanyrequired

The task data.

statusstringrequired

The task status.

Enum"created""assigned""completed""running""failed""not_finished"
resultany

The task result.

Response
application/json
{ "tasks": [ {} ] }

Retry Failed Task

Request

Retry a failed task by resetting its status to CREATED.

Path
task_idstringrequired

The task ID.

Example: 11111111-1111-1111-1111-111111111111
curl -i -X POST \
  https://v1.api.aana.ai/tasks/11111111-1111-1111-1111-111111111111/retry \
  -H 'x-api-key: YOUR_API_KEY_HERE'

Responses

Successful Response

Bodyapplication/json
idstringrequired

The task ID.

Example: "11111111-1111-1111-1111-111111111111"
endpointstringrequired

The endpoint to which the task is assigned.

dataanyrequired

The task data.

statusstringrequired

The task status.

Enum"created""assigned""completed""running""failed""not_finished"
resultany

The task result.

Response
application/json
{ "data": { "image": {} }, "endpoint": "/index", "id": "11111111-1111-1111-1111-111111111111", "status": "running" }