Skip to main content
Retrieve all versions of a specific task by its unique identifier. Task versions track the history of changes made to a task.

Get Task Versions

const API_KEY = process.env.TELA_API_KEY;
const taskId = 'task_uuid';

const response = await fetch(`https://api.tela.ai/task/${taskId}/versions`, {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${API_KEY}`,
    'Content-Type': 'application/json'
  }
});

const data = await response.json();
console.log(data);

Parameters

NameTypeRequiredDescription
idstringYesThe UUID of the task to retrieve versions for

Response

The response returns an array of task version objects, representing the history of changes made to the task.

Example Response

[
  {
    "id": "550e8400-e29b-41d4-a716-446655440010",
    "taskId": "550e8400-e29b-41d4-a716-446655440000",
    "version": 2,
    "name": "Updated Document Analysis Task",
    "status": "completed",
    "outputContent": {
      "content": {
        "summary": "Updated summary"
      }
    },
    "changedBy": "[email protected]",
    "changedAt": "2023-01-02T12:00:00.000Z"
  },
  {
    "id": "550e8400-e29b-41d4-a716-446655440011",
    "taskId": "550e8400-e29b-41d4-a716-446655440000",
    "version": 1,
    "name": "Document Analysis Task",
    "status": "created",
    "outputContent": null,
    "changedBy": "[email protected]",
    "changedAt": "2023-01-01T00:00:00.000Z"
  }
]