Inhalte von Dokumenten abrufen

Retrieve contents of a document by its ID.

get

Returns the content of the document with the specified ID, along with the index of the latest retrieved chunk. Each call fetches up to 20 chunks. To get more, use the end_chunk value from the response as the start_chunk for the next call.

Path parameters
document_idintegerRequired

The ID of the document to retrieve contents for.

Query parameters
start_chunkintegerOptional

Indicate the starting chunk that you want to retrieve. If not specified, the default value is 0.

end_chunkintegerOptional

Indicate the ending chunk that you want to retrieve. If not specified, the default value is start_chunk + 20.

Responses
200
Content of the document and index of the latest retrieved chunk.
application/json
get
GET /api/v1/documents/{document_id}/contents/ HTTP/1.1
Host: api.rememberizer.ai
Accept: */*
{
  "content": "text",
  "end_chunk": 20
}

Beispielanfragen

curl -X GET \
  "https://api.rememberizer.ai/api/v1/documents/12345/contents/?start_chunk=0&end_chunk=20" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN"

Ersetzen Sie YOUR_JWT_TOKEN durch Ihr tatsächliches JWT-Token und 12345 durch eine tatsächliche Dokument-ID.

Pfadparameter

Parameter
Typ
Beschreibung

document_id

ganzzahlig

Erforderlich. Die ID des Dokuments, dessen Inhalte abgerufen werden sollen.

Abfrageparameter

Parameter
Typ
Beschreibung

start_chunk

ganzzahlig

Der Start-Chunk-Index. Standard ist 0.

end_chunk

ganzzahlig

Der End-Chunk-Index. Standard ist start_chunk + 20.

Antwortformat

{
  "content": "Der vollständige Textinhalt der Dokumentenabschnitte...",
  "end_chunk": 20
}

Fehlerantworten

Statuscode
Beschreibung

404

Dokument nicht gefunden

500

Interner Serverfehler

Paginierung für große Dokumente

Für große Dokumente wird der Inhalt in Abschnitte unterteilt. Sie können das vollständige Dokument abrufen, indem Sie mehrere Anfragen stellen:

  1. Stellen Sie eine erste Anfrage mit start_chunk=0

  2. Verwenden Sie den zurückgegebenen end_chunk-Wert als start_chunk für die nächste Anfrage

  3. Fahren Sie fort, bis Sie alle Abschnitte abgerufen haben

Dieser Endpunkt gibt den Rohtextinhalt eines Dokuments zurück, sodass Sie auf die vollständigen Informationen für eine detaillierte Verarbeitung oder Analyse zugreifen können.

Last updated