Documents
Register uploaded files
Requires documentsHubEnabled. Register existing storage keys, not multipart file content. Repeated document keys are deduplicated.
POST
/
document
/
hub
/
bulk-upload
Register uploaded files
curl --request POST \
--url https://{instance}/api/v2/document/hub/bulk-upload \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
[
{
"name": "<string>",
"documentKey": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"folderName": "<string>"
}
]
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
name: '<string>',
documentKey: '<string>',
lastModifiedAt: '2023-11-07T05:31:56Z',
folderName: '<string>'
}
])
};
fetch('https://{instance}/api/v2/document/hub/bulk-upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/document/hub/bulk-upload"
payload = [
{
"name": "<string>",
"documentKey": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"folderName": "<string>"
}
]
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"documentKey": "<string>"
}
]
}{
"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": {}
}Authorizations
Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.
Body
application/json
Response
Successful response.
Show child attributes
Show child attributes
⌘I
Register uploaded files
curl --request POST \
--url https://{instance}/api/v2/document/hub/bulk-upload \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
[
{
"name": "<string>",
"documentKey": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"folderName": "<string>"
}
]
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify([
{
name: '<string>',
documentKey: '<string>',
lastModifiedAt: '2023-11-07T05:31:56Z',
folderName: '<string>'
}
])
};
fetch('https://{instance}/api/v2/document/hub/bulk-upload', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/document/hub/bulk-upload"
payload = [
{
"name": "<string>",
"documentKey": "<string>",
"lastModifiedAt": "2023-11-07T05:31:56Z",
"folderName": "<string>"
}
]
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"values": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"documentKey": "<string>"
}
]
}{
"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": {}
}