Back to API Documentation

Documents API

Document storage, versioning, and search capabilities

Version
1.0.0
Base URL
ws://hyperion:9999/documents-api
Endpoints
28

Endpoints

GET/api/v1/documents

List documents with metadata (no content)

Response

{
  "documents": [
    {
      "id": "507f1f77bcf86cd799439011",
      "title": "API Architecture Specification",
      "category": "specification",
      "tags": ["api", "architecture", "backend"],
      "createdAt": "2025-01-07T10:00:00Z",
      "updatedAt": "2025-01-08T14:30:00Z",
      "version": 2
    }
  ],
  "total": 96
}
POST/api/v1/documents

Create a new document

Request Body

{
  "processId": "507f1f77bcf86cd799439012",
  "title": "User Authentication Guide",
  "content": "# Authentication\n\nThis guide covers...",
  "category": "guide",
  "tags": ["auth", "security", "tutorial"]
}

Response

{
  "id": "507f1f77bcf86cd799439020",
  "title": "User Authentication Guide",
  "category": "guide",
  "version": 1,
  "createdAt": "2025-01-08T16:00:00Z"
}
GET/api/v1/documents/{documentId}

Get full document with content

Response

{
  "id": "507f1f77bcf86cd799439011",
  "processId": "507f1f77bcf86cd799439012",
  "title": "API Architecture Specification",
  "content": "# API Architecture\n\nThis document outlines...",
  "category": "specification",
  "tags": ["api", "architecture"],
  "version": 2,
  "createdAt": "2025-01-07T10:00:00Z",
  "updatedAt": "2025-01-08T14:30:00Z"
}
PUT/api/v1/documents/{documentId}

Update document content or metadata

Request Body

{
  "title": "Updated API Architecture Specification",
  "content": "# Updated API Architecture\n\nRevised content...",
  "tags": ["api", "architecture", "v2"]
}

Response

{
  "id": "507f1f77bcf86cd799439011",
  "version": 3,
  "updatedAt": "2025-01-08T17:00:00Z"
}