# Récupérer des documents

{% openapi src="/files/k0wV9YEEppPnffcGeVUk" path="/documents/" method="get" %}
[rememberizer\_openapi.yml](https://3811618827-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FwduaTA5Sz3nf9aH5k1S6%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=9d0098e1-f392-4761-be64-ff6f2caad99e)
{% endopenapi %}

## Exemples de Requêtes

{% 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 VOTRE_JWT_TOKEN"
```

{% hint style="info" %}
Remplacez `VOTRE_JWT_TOKEN` par votre véritable jeton JWT.
{% 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 VOTRE_JWT_TOKEN'
    }
  });
  
  const data = await response.json();
  console.log(data);
};

getDocuments();
```

{% hint style="info" %}
Remplacez `VOTRE_JWT_TOKEN` par votre véritable jeton JWT.
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests

def get_documents(page=1, page_size=20, integration_type=None):
    headers = {
        "Authorization": "Bearer VOTRE_JWT_TOKEN"
    }
    
    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" %}
Remplacez `VOTRE_JWT_TOKEN` par votre véritable jeton JWT.
{% endhint %}
{% endtab %}
{% endtabs %}

## Paramètres de la requête

| Paramètre         | Type   | Description                                                                                                     |
| ----------------- | ------ | --------------------------------------------------------------------------------------------------------------- |
| page              | entier | Numéro de page pour la pagination. Par défaut, 1.                                                               |
| page\_size        | entier | Nombre d'éléments par page. Par défaut, 10.                                                                     |
| integration\_type | chaîne | Filtrer les documents par type d'intégration. Options : google\_drive, slack, dropbox, gmail, common\_knowledge |

## Format de Réponse

```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": "Proposition de Projet.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": "indexé",
      "indexed_on": "2023-06-15T10:30:00Z",
      "size": 250000
    },
    // ... plus de documents
  ]
}
```

## Types d'intégration disponibles

| Type d'intégration | Description                        |
| ------------------ | ---------------------------------- |
| google\_drive      | Documents de Google Drive          |
| slack              | Messages et fichiers de Slack      |
| dropbox            | Fichiers de Dropbox                |
| gmail              | Emails de Gmail                    |
| common\_knowledge  | Sources de connaissances publiques |

Ce point de terminaison récupère une liste de documents à partir de vos sources de données connectées. Vous pouvez filtrer par type d'intégration pour vous concentrer sur des sources spécifiques.


---

# Agent Instructions: 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:

```
GET https://docs.rememberizer.ai/fr/ressources-pour-les-developpeurs/api-docs/retrieve-documents.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
