Create uploads from a new-file template
Materializes an IntegrationNewFile template into the target bucket. Server resolves default_content (inline strings or upload_id references in the integration's internal bucket), creates the Folder / Upload rows, and writes the bytes. Requires the template's parent integration to be APPLICATION-mode and installed on the bucket.
Authorization
OAuth2 upl:uploads:createOAuth 2.0 authorization
In: header
Scope: upl:uploads:create
Header Parameters
Define the version of the Connect protocol
1Define the timeout, in ms
Request Body
application/json
Reference to a bucket by ID or hostname
Folder path the template should be materialized into (the parent directory for UPLOAD; the parent of the created folder for FOLDER / VIRTUAL_FILE).
1 <= length <= 256IntegrationNewFile.id
uuidUser-supplied display name. For UPLOAD this becomes the upload's slug + filename (with the template's extension appended); for FOLDER / VIRTUAL_FILE this becomes the folder name. Required.
1 <= length <= 128Tags to apply to the created upload(s).
Display name of the creating user (for attribution on uploads).
Response Body
application/json
application/json
curl -X POST "https://uploads-api.xeonr.io/uplim.api.v1.BucketUploadsService/CreateUploadsFromTemplate" \ -H "Connect-Protocol-Version: 1" \ -H "Content-Type: application/json" \ -d '{}'{
"folder": {
"folderId": "string",
"path": "string",
"parentPath": "string",
"colour": "string",
"hasPublicDirectoryListing": true,
"inheritedHasDirectoryListing": true,
"privateAccess": true,
"inheritedPrivateAccess": true,
"isShareRoot": true,
"scopingIntegrationId": "329db323-3593-4cac-97ed-e5f900a5bd6d",
"scopingIntegration": {
"integrationId": "string",
"name": "string",
"oauthClientId": "string",
"folderBehavior": "INTEGRATION_FOLDER_BEHAVIOR_UNSPECIFIED",
"folderLinkUrl": "string",
"mode": "INTEGRATION_MODE_UNSPECIFIED",
"bucketLauncherEnabled": true
},
"virtualFileEnabled": true,
"virtualFileName": "string",
"virtualFileIntegrationId": "630c2411-65e5-4474-97de-89f429b46622",
"virtualFileIntegration": {
"integrationId": "string",
"name": "string",
"oauthClientId": "string",
"folderBehavior": "INTEGRATION_FOLDER_BEHAVIOR_UNSPECIFIED",
"folderLinkUrl": "string",
"mode": "INTEGRATION_MODE_UNSPECIFIED",
"bucketLauncherEnabled": true
},
"virtualFileRootUploadId": "010b0f59-7efd-40b9-998e-6fb436f154a7",
"externalPath": "string",
"externalParentPath": "string",
"order": 0,
"integrationHidden": true,
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z",
"thumbnailContentTypeUrn": "string",
"thumbnailContentTypeIconName": "string",
"thumbnailContentTypeIconUrl": "string"
},
"uploads": [
{
"uploadId": "string",
"path": "string",
"slug": "string",
"url": "string",
"contentUrl": "string",
"sizeBytes": 0,
"tags": [
"string"
],
"integrationId": "497a18ca-284e-40c0-985d-f72be35d468e",
"integration": {
"integrationId": "string",
"name": "string",
"oauthClientId": "string",
"folderBehavior": "INTEGRATION_FOLDER_BEHAVIOR_UNSPECIFIED",
"folderLinkUrl": "string",
"mode": "INTEGRATION_MODE_UNSPECIFIED",
"bucketLauncherEnabled": true
},
"allowAnyExtension": true,
"defaultSlugExtension": "string",
"generatedDescription": "string",
"metaUploads": [
{
"type": {
"name": "string",
"n": 0,
"filename": "string"
},
"metadataId": "string",
"uploadUrl": "string",
"downloadUrl": "string"
}
],
"private": true,
"aliases": [
{
"aliasId": "string",
"uploadId": "string",
"path": "string",
"slug": "string",
"url": "string",
"hasPassword": true,
"expiresAt": "2023-01-15T01:30:15.01Z",
"maxUses": 0,
"useCount": 0,
"allowedUserIds": [
0
],
"createdAt": "2023-01-15T01:30:15.01Z",
"externalPath": "string"
}
],
"createdAt": "2023-01-15T01:30:15.01Z",
"updatedAt": "2023-01-15T01:30:15.01Z",
"author": {
"userId": 0,
"username": "string"
},
"lastModifiedBy": {
"userId": 0,
"username": "string"
},
"thumbnailGenerationVersion": 0,
"aiDescriptionGenerationVersion": 0,
"aiTagsGenerationVersion": 0,
"virusScanGenerationVersion": 0,
"aiDescriptionInputRef": "string",
"intentMetadata": {
"property1": {},
"property2": {}
},
"externalPath": "string",
"order": 0,
"isVirtualFile": true,
"integrationHidden": true,
"version": 0,
"thumbnailContentTypeUrn": "string",
"thumbnailContentTypeIconName": "string",
"thumbnailContentTypeIconUrl": "string",
"metadataKvs": [
{
"key": "string",
"valueType": "METADATA_VALUE_TYPE_UNSPECIFIED",
"value": {
"arrayValue": {
"values": [
{}
]
}
},
"title": "string",
"iconName": "string",
"hiddenFromUsers": true
}
]
}
]
}{
"code": "not_found",
"message": "string",
"details": [
{
"type": "string",
"value": "string",
"debug": {}
}
]
}