> For the complete documentation index, see [llms.txt](https://docs.rememberizer.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rememberizer.ai/pt/recursos-para-desenvolvedores/api-docs/retrieve-documents.md).

# Recuperar documentos

{% openapi src="/files/7wfxJNjaZYJgvBWvXvoQ" path="/documents/" method="get" %}
[rememberizer\_openapi.yml](https://606058861-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDrEOD8oYxrWDlC9WhJ3K%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=85552d2b-b485-42dc-a027-aa2441b8ca9f)
{% endopenapi %}

## Exemplo de Solicitações

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET \
  "https://api.rememberizer.ai/api/v1/documents/?page=1&page_size=20&integration_type=google_drive" \
  -H "Authorization: Bearer SEU_TOKEN_JWT"
```

{% hint style="info" %}
Substitua `SEU_TOKEN_JWT` pelo seu token JWT real.
{% endhint %}
{% endtab %}

{% tab title="JavaScript" %}

```javascript
const getDocuments = async (page = 1, pageSize = 20, integrationType = 'google_drive') => {
  const url = new URL('https://api.rememberizer.ai/api/v1/documents/');
  url.searchParams.append('page', page);
  url.searchParams.append('page_size', pageSize);
  if (integrationType) {
    url.searchParams.append('integration_type', integrationType);
  }
  
  const response = await fetch(url.toString(), {
    method: 'GET',
    headers: {
      'Authorization': 'Bearer SEU_TOKEN_JWT'
    }
  });
  
  const data = await response.json();
  console.log(data);
};

getDocuments();
```

{% hint style="info" %}
Substitua `SEU_TOKEN_JWT` pelo seu token JWT real.
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests

def get_documents(page=1, page_size=20, integration_type=None):
    headers = {
        "Authorization": "Bearer SEU_TOKEN_JWT"
    }
    
    params = {
        "page": page,
        "page_size": page_size
    }
    
    if integration_type:
        params["integration_type"] = integration_type
    
    response = requests.get(
        "https://api.rememberizer.ai/api/v1/documents/",
        headers=headers,
        params=params
    )
    
    data = response.json()
    print(data)

get_documents(integration_type="google_drive")
```

{% hint style="info" %}
Substitua `SEU_TOKEN_JWT` pelo seu token JWT real.
{% endhint %}
{% endtab %}
{% endtabs %}

## Parâmetros da Solicitação

| Parâmetro            | Tipo    | Descrição                                                                                                  |
| -------------------- | ------- | ---------------------------------------------------------------------------------------------------------- |
| página               | inteiro | Número da página para paginação. O padrão é 1.                                                             |
| tamanho\_da\_página  | inteiro | Número de itens por página. O padrão é 10.                                                                 |
| tipo\_de\_integração | string  | Filtrar documentos por tipo de integração. Opções: google\_drive, slack, dropbox, gmail, common\_knowledge |

## Formato de Resposta

```json
{
  "count": 257,
  "next": "https://api.rememberizer.ai/api/v1/documents/?page=2&page_size=20&integration_type=google_drive",
  "previous": null,
  "results": [
    {
      "document_id": "1aBcD2efGhIjK3lMnOpQrStUvWxYz",
      "name": "Proposta de Projeto.docx",
      "type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
      "path": "/Documents/Projects/Proposal.docx",
      "url": "https://drive.google.com/file/d/1aBcD2efGhIjK3lMnOpQrStUvWxYz/view",
      "id": 12345,
      "integration_type": "google_drive",
      "source": "user@example.com",
      "status": "indexado",
      "indexed_on": "2023-06-15T10:30:00Z",
      "size": 250000
    },
    // ... mais documentos
  ]
}
```

## Tipos de Integração Disponíveis

| Tipo de Integração | Descrição                      |
| ------------------ | ------------------------------ |
| google\_drive      | Documentos do Google Drive     |
| slack              | Mensagens e arquivos do Slack  |
| dropbox            | Arquivos do Dropbox            |
| gmail              | E-mails do Gmail               |
| common\_knowledge  | Fontes de conhecimento público |

Este endpoint recupera uma lista de documentos das suas fontes de dados conectadas. Você pode filtrar por tipo de integração para se concentrar em fontes específicas.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.rememberizer.ai/pt/recursos-para-desenvolvedores/api-docs/retrieve-documents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
