Document Collections

Add Documents To Collection

POST
Add documents to a document collection. Note that the documents must already exist in the document catalog to use this endpoint. If you want to upload a new document to a collection, use the uploadDocumentContents endpoint.

Request

This endpoint expects an object.
collectionId
UUIDRequired
The ID of the document collection you want to add to.
resourceIdentifiers
list of unionsRequired
The set of resource identifier for which you want to check authorization. Currently limited to 20 resources.
POST
1curl -X POST https://api.credal.ai/api/v0/documentCollections/addDocumentsToCollection \
2 -H "Authorization: Bearer <apiKey>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "collectionId": "82e4b12a-6990-45d4-8ebd-85c00e030c24",
6 "resourceIdentifiers": [
7 {
8 "type": "external-resource-id",
9 "externalResourceId": "170NrBm0Do7gdzvr54UvyslPVWkQFOA0lgNycFmdZJQr",
10 "resourceType": "GOOGLE_DRIVE_ITEM"
11 },
12 {
13 "type": "external-resource-id",
14 "externalResourceId": "398KAHdfkjsdf09r54UvyslPVWkQFOA0lOiu34in923",
15 "resourceType": "GOOGLE_DRIVE_ITEM"
16 }
17 ]
18}'