curl -X GET 'https://api.moustacheai.com/api/v1/agents/28ce3b2d-5791-4905-8d66-123456789abc/rag-resources?externalId=notion-page-42' \
-H "Authorization: Bearer MON_API_TOKEN"
[
{
"id": 123,
"external_id": "notion-page-42",
"file_name": "guide.pdf",
"file_type": "application/pdf",
"file_size_bytes": 20480,
"status": "READY",
"chunk_count": 18,
"error_message": null,
"created_at": "2026-06-18T09:00:00.000Z",
"updated_at": "2026-06-18T09:01:12.000Z"
}
]
Base documentaire
Lister les documents et leur statut
GET
/
api
/
v1
/
agents
/
{agentUUID}
/
rag-resources
curl -X GET 'https://api.moustacheai.com/api/v1/agents/28ce3b2d-5791-4905-8d66-123456789abc/rag-resources?externalId=notion-page-42' \
-H "Authorization: Bearer MON_API_TOKEN"
[
{
"id": 123,
"external_id": "notion-page-42",
"file_name": "guide.pdf",
"file_type": "application/pdf",
"file_size_bytes": 20480,
"status": "READY",
"chunk_count": 18,
"error_message": null,
"created_at": "2026-06-18T09:00:00.000Z",
"updated_at": "2026-06-18T09:01:12.000Z"
}
]
Renvoie le tableau des documents de l’agent, depuis son RAG interne ou son Vector Store, triés du plus récent au plus ancien (résultats paginés). À utiliser pour suivre l’ingestion (
status passe de PENDING → PROCESSING → READY, ou FAILED).
Paramètres
string
required
UUID de l’agent. Il doit appartenir à la société propriétaire du token.
string
Ne renvoyer que le document portant cet identifiant externe.
string
Filtrer par statut :
PENDING, PROCESSING, READY ou FAILED.integer
default:"100"
Taille de page. Défaut 100, plafonné à 200.
integer
default:"0"
Décalage pour la pagination (défaut 0). Combinez avec
limit pour parcourir
tout.Réponses
| Code | Corps JSON |
|---|---|
| 200 | Tableau des documents (voir l’exemple de réponse) |
| 400 | status, limit ou offset invalide |
| 401 | { "error": "Provide Auth via Authorization with \"Bearer YOUR_MOUSTACHE_AI_API_TOKEN\"" } |
| 404 | { "error": "Agent not found for your company" } |
| 429 | { "error": "Rate limit exceeded" } (en-tête Retry-After) |
| 500 | { "error": "Failed to list RAG resources" } |
curl -X GET 'https://api.moustacheai.com/api/v1/agents/28ce3b2d-5791-4905-8d66-123456789abc/rag-resources?externalId=notion-page-42' \
-H "Authorization: Bearer MON_API_TOKEN"
[
{
"id": 123,
"external_id": "notion-page-42",
"file_name": "guide.pdf",
"file_type": "application/pdf",
"file_size_bytes": 20480,
"status": "READY",
"chunk_count": 18,
"error_message": null,
"created_at": "2026-06-18T09:00:00.000Z",
"updated_at": "2026-06-18T09:01:12.000Z"
}
]
Was this page helpful?