Newer
Older
cortex-hub / ai-hub / docs / api_reference / documents.md

API Reference: Documents

GET /documents/

Summary: List All Documents

Description: List All Documents

Responses

Status Code Description
200 Successful Response

Example Usage

curl -X 'GET' \
  'http://localhost:8000/api/v1/documents/' \
  -H 'accept: application/json'

POST /documents/

Summary: Add a New Document

Description: Add a New Document

Request Body

Required: Yes

  • Media Type: application/json
  • Schema: DocumentCreate (Define in Models)

Responses

Status Code Description
200 Successful Response
422 Validation Error

Example Usage

curl -X 'POST' \
  'http://localhost:8000/api/v1/documents/' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{}'

DELETE /documents/{document_id}

Summary: Delete a Document

Description: Delete a Document

Parameters

Name In Required Type Description
document_id path Yes integer

Responses

Status Code Description
200 Successful Response
422 Validation Error

Example Usage

curl -X 'DELETE' \
  'http://localhost:8000/api/v1/documents/{document_id}' \
  -H 'accept: application/json'