Xeonr Developer Docs
UplApiUploads

Create uploads from a new-file template

POST
/uplim.api.v1.BucketUploadsService/CreateUploadsFromTemplate

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:create
AuthorizationBearer <token>

OAuth 2.0 authorization

In: header

Scope: upl:uploads:create

Header Parameters

Connect-Protocol-Version*number

Define the version of the Connect protocol

Value in1
Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

bucketRef?|

Reference to a bucket by ID or hostname

parentPath?string

Folder path the template should be materialized into (the parent directory for UPLOAD; the parent of the created folder for FOLDER / VIRTUAL_FILE).

Length1 <= length <= 256
templateId?string

IntegrationNewFile.id

Formatuuid
name?string

User-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.

Length1 <= length <= 128
tags?tags

Tags to apply to the created upload(s).

uploadedBy?string

Display name of the creating user (for attribution on uploads).

[key: string]?never

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": {}
    }
  ]
}