Recupera contenuti dei documenti

Retrieve specific document contents by 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": 1
}

Esempi di Richieste

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

Sostituisci YOUR_JWT_TOKEN con il tuo token JWT effettivo e 12345 con un ID documento reale.

Parametri del percorso

Parametro
Tipo
Descrizione

document_id

intero

Obbligatorio. L'ID del documento di cui recuperare i contenuti.

Parametri di Query

Parametro
Tipo
Descrizione

start_chunk

intero

L'indice del chunk di partenza. Il valore predefinito è 0.

end_chunk

intero

L'indice del chunk finale. Il valore predefinito è start_chunk + 20.

Formato di Risposta

{
  "content": "Il testo completo dei contenuti del documento...",
  "end_chunk": 20
}

Risposte di Errore

Codice di Stato
Descrizione

404

Documento non trovato

500

Errore interno del server

Paginazione per Documenti di Grandi Dimensioni

Per documenti di grandi dimensioni, il contenuto è suddiviso in parti. Puoi recuperare il documento completo effettuando più richieste:

  1. Effettua una richiesta iniziale con start_chunk=0

  2. Usa il valore end_chunk restituito come start_chunk per la richiesta successiva

  3. Continua fino a quando non hai recuperato tutte le parti

Questo endpoint restituisce il contenuto testuale grezzo di un documento, consentendoti di accedere a tutte le informazioni per un'elaborazione o analisi dettagliata.

Last updated