API Reference

Retrieve All Contexts

Returns the list of all contexts in a given workspace, sorted alphabetically by context name.

Expands
versions Retrieves all versions of each context in the list.
Endpoint
GET https://api.zatomic.ai/v1/contexts

// Examples
GET https://api.zatomic.ai/v1/contexts?expand=versions

Endpoint Response

A successful call returns a response that contains a list of context objects.

HTTP Status Codes
200 OK The contexts were retrieved, or an empty list was returned.
500 Internal Server Error Something went wrong on Zatomic's end.
Response Body
[
   {
      "context_id": "ctx_2qJhUNbuEg3J8dvw39jgL3UEJKS",
      "workspace_id": "wrk_2nKxr84BuEQIpUl3evP3XYyTxdo",
      "project_id": "prj_32Tk7u9OX9HN7AUXm3EjJKRJ5yD",
      "created": "2024-12-16T22:03:19.30308Z",
      "updated": "2024-12-16T22:03:19.568618Z",
      "name": "Context name",
      "type": "file|text",
      "description": "Context description.",
      "versions": []
   }
]