List Documents

Get a paginated list of documents

GEThttps://api.jamdesk.com/api/v1/documents

Returns a paginated list of documents, optionally filtered by collection.

Query Parameters

collectionstring

Filter by collection name.

limitintegerdefault: 20

Maximum number of results to return.

orderBystring

Field to sort by.

orderstring

Sort order: asc or desc.

curl -X GET "https://api.example.com/v1/documents?collection=posts&limit=10" \
  -H "Authorization: Bearer $TOKEN"
{
  "data": [
    {
      "id": "doc_abc",
      "collection": "posts",
      "data": {
        "title": "Hello World",
        "content": "..."
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z"
    }
  ],
  "meta": {
    "total": 42,
    "limit": 10,
    "offset": 0
  }
}