# Dokumente abrufen

{% openapi src="/files/ruiFvGmmJmrVu2Iycaim" path="/documents/" method="get" %}
[rememberizer\_openapi.yml](https://2490272757-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fx5M0COIHmFFlpJ9e5pvp%2Fuploads%2Fgit-blob-77b6137eeb641262ec8e531c78123c02b825b865%2Frememberizer_openapi.yml?alt=media\&token=22d7ca07-e3b4-475f-840e-857109bf09bc)
{% endopenapi %}

## Beispielanfragen

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

{% hint style="info" %}
Ersetzen Sie `YOUR_JWT_TOKEN` durch Ihr tatsächliches JWT-Token.
{% 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 YOUR_JWT_TOKEN'
    }
  });
  
  const data = await response.json();
  console.log(data);
};

getDocuments();
```

{% hint style="info" %}
Ersetzen Sie `YOUR_JWT_TOKEN` durch Ihr tatsächliches JWT-Token.
{% endhint %}
{% endtab %}

{% tab title="Python" %}

```python
import requests

def get_documents(page=1, page_size=20, integration_type=None):
    headers = {
        "Authorization": "Bearer YOUR_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" %}
Ersetzen Sie `YOUR_JWT_TOKEN` durch Ihr tatsächliches JWT-Token.
{% endhint %}
{% endtab %}
{% endtabs %}

## Anfrageparameter

| Parameter         | Typ          | Beschreibung                                                                                              |
| ----------------- | ------------ | --------------------------------------------------------------------------------------------------------- |
| page              | ganzzahlig   | Seitenzahl für die Paginierung. Standard ist 1.                                                           |
| page\_size        | ganzzahlig   | Anzahl der Elemente pro Seite. Standard ist 10.                                                           |
| integration\_type | Zeichenkette | Dokumente nach Integrationsart filtern. Optionen: google\_drive, slack, dropbox, gmail, common\_knowledge |

## Antwortformat

```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": "Projektvorschlag.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": "indiziert",
      "indexed_on": "2023-06-15T10:30:00Z",
      "size": 250000
    },
    // ... mehr Dokumente
  ]
}
```

## Verfügbare Integrationsarten

| Integrationsart   | Beschreibung                      |
| ----------------- | --------------------------------- |
| google\_drive     | Dokumente von Google Drive        |
| slack             | Nachrichten und Dateien von Slack |
| dropbox           | Dateien von Dropbox               |
| gmail             | E-Mails von Gmail                 |
| common\_knowledge | Öffentliche Wissensquellen        |

Dieser Endpunkt ruft eine Liste von Dokumenten aus Ihren verbundenen Datenquellen ab. Sie können nach Integrationsart filtern, um sich auf bestimmte Quellen zu konzentrieren.


---

# 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/de/entwicklerressourcen/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.
