Skip to content

Assets

Asset endpoints manage the asset tree and upload or download asset files.

Uploading a file and creating an asset record are separate operations:

  1. Upload the binary with /asset/upload.
  2. Use the returned filename in POST /asset or PATCH /asset/{assetID}.

Endpoints

Get assets # GET/api/v1/{hash}/asset

Request

http
GET /api/v1/{hash}/asset
bash
curl --request GET \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/asset"

Response

Returns 200 OK with a compact representation of the complete asset tree:

json
[
  {
    "id": "root_asset",
    "name": "Root",
    "type": "folder",
    "parentId": null,
    "children": ["image_1", "audio_folder"]
  },
  {
    "id": "image_1",
    "name": "Castle.png",
    "type": "image",
    "parentId": "root_asset",
    "children": []
  },
  {
    "id": "audio_folder",
    "name": "Audio",
    "type": "folder",
    "parentId": "root_asset",
    "children": []
  }
]

Every entry contains id, name, type, parentId, and children. Folder entries, including the internal root, use type: "folder". File assets use their stored asset type. File asset names include the stored file extension when one is available.

Get asset # GET/api/v1/{hash}/asset/{assetID}

Request

http
GET /api/v1/{hash}/asset/{assetID}
bash
curl --request GET \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/asset/{assetID}"

Response

Returns 200 OK.

File-bearing assets include type and file:

json
{
  "id": "a01",
  "name": "asset 1",
  "type": "image",
  "file": "asset_1.jpg"
}

Folders include children and do not include file-bearing properties.

Upload file # POST/api/v1/{hash}/asset/upload

Request

http
POST /api/v1/{hash}/asset/upload
Content-Type: multipart/form-data
bash
curl --request POST \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --form "type=image" \
  --form "file=@path/to/file.png" \
  "https://arcweave.com/api/v1/PROJECT_HASH/asset/upload"

Form fields:

PropertyRequiredTypeDescription
fileYesFileBinary upload.
typeYesStringimage, audio, or video.

Supported formats and limits

The uploaded file must match the selected type:

typeAccepted formats
imageJPEG (.jpeg, .jpg), PNG, GIF, WebP
audioMPEG/MP3, Ogg, WAV, WebM
videoMP4, WebM, Ogg

Arcweave checks the file's content to determine its MIME type. Renaming a file's extension does not make an unsupported format valid.

  • Images have separate width and height limits, each defaulting to 8192 pixels. These limits are configurable on the server; a validation error reports the applicable limit.
  • The workspace plan sets the maximum size of one file and the total asset size per project. Standard Team limits are 400 MB per file and 10 GB per project; see asset upload limits.
  • The total-size check includes the project's existing assets plus the incoming file. Uploading the binary does not create an asset record; complete the second step with Create asset or folder.

Unsupported file content, exceeded image dimensions, and exceeded plan limits return 400 Bad Request with details in errors.file. Request-size limits on the server can reject an oversized upload before API validation runs.

Response

Returns 200 OK with metadata for the stored file:

json
{
  "filename": "b7f4a0c1.png",
  "name": "castle",
  "size": "12.06 KB"
}

Create asset or folder # POST/api/v1/{hash}/asset

Request

http
POST /api/v1/{hash}/asset
bash
curl --request POST \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/asset"

Create a file-bearing asset from an uploaded file:

json
{
  "name": "Castle",
  "type": "image",
  "file": "b7f4a0c1.png",
  "parentId": "folder_1",
  "index": 0
}

Create a folder by omitting type and file:

json
{
  "name": "Locations"
}
PropertyRequiredTypeDescription
nameYesStringAsset or folder name.
typeNoStringimage, audio, or video. Omit to create a folder.
fileNoStringStored filename returned by the upload endpoint.
sizeNoStringDisplay size, such as the size returned by the upload endpoint.
volumeNoNumberInitial volume metadata, normally used by audio assets.
parentIdNoString or nullTarget folder. Defaults to the root asset container.
indexNoNon-negative integer or "-"Position in the target folder. Defaults to "-", which appends the item.

When file, size, or volume is supplied, type is required. If the stored file exists, Arcweave calculates its actual size and uses that value. A file-bearing asset may be created without file and populated later with the update endpoint.

The target parent must exist and be a folder. Template asset trees are read-only.

Response

Returns 201 Created with the generated resource ID and project version data:

json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"],
  "id": "65139ea3-331f-4b25-88b4-ea7a65ff106c"
}

Update asset # PATCH/api/v1/{hash}/asset/{assetID}

Request

http
PATCH /api/v1/{hash}/asset/{assetID}
bash
curl --request PATCH \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/asset/{assetID}"
json
{
  "name": "Updated Castle",
  "file": "updated_file.png"
}

Request fields:

PropertyRequiredTypeDescription
nameNoStringUpdated name. If omitted, the current value is retained.
typeNoStringimage, audio, or video. If omitted, the current value is retained.
fileNoStringUpdated stored filename. If omitted, the current value is retained.
sizeNoStringUpdated display size. Arcweave uses the actual size for a stored file.
volumeNoNumberUpdated volume metadata.
  • Folders may be renamed but cannot receive file-asset properties.
  • Template assets cannot be modified.
  • The internal root_asset container cannot be modified.

Response

Returns 200 OK with project version data:

json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}

Move or reorder asset # PATCH/api/v1/{hash}/asset/{assetID}/index

Request

http
PATCH /api/v1/{hash}/asset/{assetID}/index
bash
curl --request PATCH \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data @payload.json \
  "https://arcweave.com/api/v1/PROJECT_HASH/asset/{assetID}/index"
json
{
  "parentId": "folder_1",
  "index": 0
}

Request fields:

PropertyRequiredTypeDescription
parentIdNoString or nullTarget folder. Omit to keep the current parent; use null for the root.
indexYesNon-negative integerNew position within the target folder.
  • index is required.
  • Omit parentId to reorder within the current folder.
  • Use "parentId": null to move to the root asset container.
  • The target must be a folder.
  • An asset folder cannot be moved into itself or one of its descendants.
  • The root and template asset trees cannot be moved.

Response

Returns 200 OK with project version data:

json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}

Delete asset # DELETE/api/v1/{hash}/asset/{assetID}

Request

http
DELETE /api/v1/{hash}/asset/{assetID}
bash
curl --request DELETE \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/asset/{assetID}"

Deleting a folder deletes its subtree. The root and template asset trees cannot be deleted.

Response

Returns 200 OK with project version data:

json
{
  "version": 12,
  "newVersion": 13,
  "versionTime": ["1720788000", "123456"]
}

Download asset file # GET/api/v1/{hash}/asset/{assetID}/file

Request

http
GET /api/v1/{hash}/asset/{assetID}/file
bash
curl --request GET \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Accept: application/json" \
  "https://arcweave.com/api/v1/PROJECT_HASH/asset/{assetID}/file"

Response

Returns 200 OK with the binary asset file. The Content-Type matches the stored asset type.

The response is the stored binary. Folders are not downloadable. Both project-uploaded and referenced template asset files can be returned.

Common errors

StatusMeaning
400Invalid metadata/upload, folder file mutation, root/template mutation, non-folder parent, recursive move, or plan limit exceeded.
403Project permission denied.
404Project, asset, parent, or stored file not found.
409Asset or parent changed before the command was applied.