Documents
Count documents on deliverables
Available with or without Documents Hub. Counts only accessible deliverables.
POST
/
document
/
counts-by-deliverable
Count documents on deliverables
curl --request POST \
--url https://{instance}/api/v2/document/counts-by-deliverable \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"deliverableIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({deliverableIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://{instance}/api/v2/document/counts-by-deliverable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/document/counts-by-deliverable"
payload = { "deliverableIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"values": [
{
"count": 123,
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}⌘I
Count documents on deliverables
curl --request POST \
--url https://{instance}/api/v2/document/counts-by-deliverable \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"deliverableIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({deliverableIds: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']})
};
fetch('https://{instance}/api/v2/document/counts-by-deliverable', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/document/counts-by-deliverable"
payload = { "deliverableIds": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"] }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"values": [
{
"count": 123,
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}