Rename a document collection
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/document-collections/{collection_id}/"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/document-collections/{collection_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/document-collections/{collection_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"document_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Documents
Rename a document collection
Update the collection’s name. The slug is immutable. Requires admin permissions.
PATCH
/
projects
/
{project_id}
/
document-collections
/
{collection_id}
/
Rename a document collection
import requests
url = "https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/document-collections/{collection_id}/"
payload = { "name": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/document-collections/{collection_id}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request PATCH \
--url https://eu.app.clarifeye.ai/api/v1/projects/{project_id}/document-collections/{collection_id}/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'{
"name": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"slug": "<string>",
"document_count": 123,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}{
"error": "You do not have permission to perform this action."
}{
"error": "Not found."
}Authorizations
BearerAuthTokenAuth
Use Authorization: Bearer
Body
application/json
Response
Updated
A named grouping of documents within a project. Membership is the
Document.collection foreign key (single collection per document); a mirrored
["tag", slug] pair is also kept on each document's metadata so the
retrieval/extraction layers can scope to a collection.
Human-readable label (editable).
Stable identifier documents are linked by. Derived from name at creation
and immutable afterwards (renaming changes only name).
Number of active documents in this collection (server-annotated).