List Versions
List all versions of a document.
GET /v1/documents/:id/versions
Path Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | Document ID |
Example Request
curl https://api.inherent.systems/v1/documents/doc_abc123/versions \
-H "Authorization: Bearer $INHERENT_API_KEY"
Response
{
"versions": [
{
"version": 3,
"created_at": "2024-01-18T14:20:00Z",
"created_by": "api_key_xyz",
"change_summary": "Updated authentication section",
"stats": {
"size_bytes": 32768,
"chunks": 24,
"tokens": 8192
}
},
{
"version": 2,
"created_at": "2024-01-15T10:30:00Z",
"created_by": "api_key_xyz",
"change_summary": "Added rate limiting documentation",
"stats": {
"size_bytes": 28672,
"chunks": 20,
"tokens": 7168
}
},
{
"version": 1,
"created_at": "2024-01-10T09:00:00Z",
"created_by": "api_key_xyz",
"change_summary": "Initial version",
"stats": {
"size_bytes": 16384,
"chunks": 12,
"tokens": 4096
}
}
],
"document_id": "doc_abc123",
"current_version": 3
}
Response Fields
| Field | Type | Description |
|---|---|---|
versions | array | List of versions |
versions[].version | integer | Version number |
versions[].created_at | datetime | Creation timestamp |
versions[].created_by | string | API key or user ID |
versions[].change_summary | string | Optional change description |
versions[].stats | object | Version statistics |
document_id | string | Document ID |
current_version | integer | Latest version number |