Topolo Docs Topolo Platform
Open workspace

Create space upload session

Reserve asset metadata and obtain the authenticated PUT URL for a supported capture file.

Outcome

Reserve asset metadata and obtain the authenticated PUT URL for a supported capture file.

Before you start

  • Verify the authenticated identity, exact environment and pinned approved organization context before preparing an action.
  • The published application permission is workspace:write. Discover a granted Spaces workspace and bind that exact resource. Supplied identifiers do not grant access.
  • Authorize the documented storage, publication, invitation, notification, metering, privacy or archival effects before CLI --confirm or MCP confirm:true.

Discover the target

topolo whoami --json
topolo actions get app_topolo_spaces.assets.upload.create --detail --json
topolo resources topolo-spaces --json
topolo workspaces list topolo-spaces --json
  • Select the exact granted workspace id as SPACES_WORKSPACE_ID. Fixture ids authorize no live operation.
  • Discover the exact spaceId from spaces.list or a retained creation response in this workspace.

Request

POST /api/spaces/{spaceId}/uploads

Save action input as payload.json. Inspect the plan for the exact path, query and body. Set SPACES_WORKSPACE_ID from granted resource discovery.

Inspect and test this action in the signed action console, then perform the verification below.

Input fields

FieldRequiredTypeConstraints
spaceIdRequiredstringExact space id discovered from spaces.list or a creation response in this granted workspace.; {"minLength":1}
fileNameRequiredstringActual filename ending case-insensitively in .ply, .sog or .zip; acceptance does not validate contents.; {}
mimeTypeRequiredstringDeclared nonempty content type; handler trims it and uses application/octet-stream when blank after trimming.; {"minLength":1}
byteSizeRequirednumberPositive declared size up to 104857600. Use the exact integer byte count; handler rounds fractional input and the subsequent PUT must match it.; {"maximum":104857600}

View the complete input schema in the action console. The same schema is available through CLI and MCP action discovery.

Effects

  • Accepts case-insensitive .ply, .sog or .zip filenames with declared positive byteSize up to 104857600 bytes. The input schema allows a fractional number; the handler rounds it, so use the exact whole byte count.
  • Creates a raw_import/uploading asset and marks the space uploading. The response is upload.assetId/uploadUrl/method/objectKey, not an asset envelope or completed upload.
  • Perform a separate authenticated PUT to the returned URL in the same workspace, with exactly the declared byte count and no more than 100 MiB. Object write, uploaded status and event recording are separate effects. Filename or MIME acceptance does not validate capture contents.

Interpret the response

Use response path $.upload.assetId for asset. An empty list does not discover a target.

Save upload.assetId and PUT the actual file bytes using the returned method and URL with the same authenticated resource context. Read spaces.get and confirm the asset status uploaded and stored byte_size before requesting assets.process. After uncertainty, read state before reserving another session.

The success schema was checked against captured handler responses. Delegated Auth identity and canonical widget context fields can vary; exact Spaces envelopes and all thirteen SQL export table sets are source-reviewed against the migrated local schema. Error responses can be plain text; the original refusal body is retained. Error examples retain their actual refusal shapes.

View the complete success schema in the action console. The worked examples below retain complete raw captured Worker responses. CLI responses have a transport envelope and can be bounded unless --detail is requested; action discovery supplies the exact schema.

Worked examples

Real isolated local D1/R2 and source handlers with synthetic Auth/workspace discovery, queue transport, notification delivery and metering. Arbitrary fixture SOG bytes demonstrate handler state only, not valid Gaussian data, renderer quality, deployed processing or live effects. Annotation rows are seeded directly into isolated fixture storage because no annotation mutation is published. Refused examples demonstrate boundaries and must not be executed as successful workflows.

Successful request

Actual local Worker response; all four migrated D1 databases and R2 are real. Auth identity/workspace discovery, queue transport, notification delivery and metering are simulated or disabled. Captured scenario: minimal.

Input · payload.json:

{
  "spaceId": "space_9338e6fc-cc93-421e-a783-6c8062088e0c",
  "fileName": "minimal.sog",
  "mimeType": "application/octet-stream",
  "byteSize": 62
}

CLI:

topolo actions validate app_topolo_spaces.assets.upload.create --data @payload.json --json
topolo actions plan app_topolo_spaces.assets.upload.create --resource-type workspace --resource-id "$SPACES_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_spaces.assets.upload.create --resource-type workspace --resource-id "$SPACES_WORKSPACE_ID" --data @payload.json --confirm --detail --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_spaces.assets.upload.create",
    "input": {
      "spaceId": "space_9338e6fc-cc93-421e-a783-6c8062088e0c",
      "fileName": "minimal.sog",
      "mimeType": "application/octet-stream",
      "byteSize": 62
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "upload": {
    "assetId": "asset_6ad10ea2-d688-4a40-827d-baf67943669f",
    "uploadUrl": "/api/spaces/space_9338e6fc-cc93-421e-a783-6c8062088e0c/assets/asset_6ad10ea2-d688-4a40-827d-baf67943669f/content",
    "method": "PUT",
    "objectKey": "org/org_spaces_fixture/spaces/space_9338e6fc-cc93-421e-a783-6c8062088e0c/raw/asset_6ad10ea2-d688-4a40-827d-baf67943669f-minimal.sog"
  }
}

HTTP 201. Save upload.assetId and PUT the actual file bytes using the returned method and URL with the same authenticated resource context. Read spaces.get and confirm the asset status uploaded and stored byte_size before requesting assets.process. After uncertainty, read state before reserving another session.

Another supported request

Actual local Worker response; all four migrated D1 databases and R2 are real. Auth identity/workspace discovery, queue transport, notification delivery and metering are simulated or disabled. Captured scenario: workflow.

Input · payload.json:

{
  "spaceId": "space_bfe6af37-3588-406b-b103-7675eb527e82",
  "fileName": "workflow.sog",
  "mimeType": "application/octet-stream",
  "byteSize": 62
}

CLI:

topolo actions validate app_topolo_spaces.assets.upload.create --data @payload.json --json
topolo actions plan app_topolo_spaces.assets.upload.create --resource-type workspace --resource-id "$SPACES_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_spaces.assets.upload.create --resource-type workspace --resource-id "$SPACES_WORKSPACE_ID" --data @payload.json --confirm --detail --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_spaces.assets.upload.create",
    "input": {
      "spaceId": "space_bfe6af37-3588-406b-b103-7675eb527e82",
      "fileName": "workflow.sog",
      "mimeType": "application/octet-stream",
      "byteSize": 62
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "upload": {
    "assetId": "asset_3916ba10-a557-4b8f-84a5-8e1c732c2e9a",
    "uploadUrl": "/api/spaces/space_bfe6af37-3588-406b-b103-7675eb527e82/assets/asset_3916ba10-a557-4b8f-84a5-8e1c732c2e9a/content",
    "method": "PUT",
    "objectKey": "org/org_spaces_fixture/spaces/space_bfe6af37-3588-406b-b103-7675eb527e82/raw/asset_3916ba10-a557-4b8f-84a5-8e1c732c2e9a-workflow.sog"
  }
}

HTTP 201. Save upload.assetId and PUT the actual file bytes using the returned method and URL with the same authenticated resource context. Read spaces.get and confirm the asset status uploaded and stored byte_size before requesting assets.process. After uncertainty, read state before reserving another session.

Another supported request

Actual local Worker response; all four migrated D1 databases and R2 are real. Auth identity/workspace discovery, queue transport, notification delivery and metering are simulated or disabled. Captured scenario: privacy.

Input · payload.json:

{
  "spaceId": "space_858bda7b-397a-4784-979e-609961a9a16e",
  "fileName": "privacy.sog",
  "mimeType": "application/octet-stream",
  "byteSize": 62
}

CLI:

topolo actions validate app_topolo_spaces.assets.upload.create --data @payload.json --json
topolo actions plan app_topolo_spaces.assets.upload.create --resource-type workspace --resource-id "$SPACES_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_spaces.assets.upload.create --resource-type workspace --resource-id "$SPACES_WORKSPACE_ID" --data @payload.json --confirm --detail --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_spaces.assets.upload.create",
    "input": {
      "spaceId": "space_858bda7b-397a-4784-979e-609961a9a16e",
      "fileName": "privacy.sog",
      "mimeType": "application/octet-stream",
      "byteSize": 62
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "upload": {
    "assetId": "asset_97f79623-4436-421f-b9d8-24bae3fcd815",
    "uploadUrl": "/api/spaces/space_858bda7b-397a-4784-979e-609961a9a16e/assets/asset_97f79623-4436-421f-b9d8-24bae3fcd815/content",
    "method": "PUT",
    "objectKey": "org/org_spaces_fixture/spaces/space_858bda7b-397a-4784-979e-609961a9a16e/raw/asset_97f79623-4436-421f-b9d8-24bae3fcd815-privacy.sog"
  }
}

HTTP 201. Save upload.assetId and PUT the actual file bytes using the returned method and URL with the same authenticated resource context. Read spaces.get and confirm the asset status uploaded and stored byte_size before requesting assets.process. After uncertainty, read state before reserving another session.

Another supported request

Actual local Worker response; all four migrated D1 databases and R2 are real. Auth identity/workspace discovery, queue transport, notification delivery and metering are simulated or disabled. Captured scenario: privacy.

Input · payload.json:

{
  "spaceId": "space_ec15138f-dd1a-4a27-8374-a275d902cda8",
  "fileName": "capture.PLY",
  "mimeType": "application/octet-stream",
  "byteSize": 62
}

CLI:

topolo actions validate app_topolo_spaces.assets.upload.create --data @payload.json --json
topolo actions plan app_topolo_spaces.assets.upload.create --resource-type workspace --resource-id "$SPACES_WORKSPACE_ID" --data @payload.json --json
topolo actions call app_topolo_spaces.assets.upload.create --resource-type workspace --resource-id "$SPACES_WORKSPACE_ID" --data @payload.json --confirm --detail --json

MCP tool and arguments:

{
  "tool": "topolo_call_action",
  "arguments": {
    "actionId": "app_topolo_spaces.assets.upload.create",
    "input": {
      "spaceId": "space_ec15138f-dd1a-4a27-8374-a275d902cda8",
      "fileName": "capture.PLY",
      "mimeType": "application/octet-stream",
      "byteSize": 62
    },
    "resourceType": "workspace",
    "resourceId": "<identifier returned by granted resource discovery>",
    "confirm": true
  }
}

Captured local response · HTTP 201:

{
  "upload": {
    "assetId": "asset_afe60d9d-8181-4ddb-aa1c-ca34b7c2a2fb",
    "uploadUrl": "/api/spaces/space_ec15138f-dd1a-4a27-8374-a275d902cda8/assets/asset_afe60d9d-8181-4ddb-aa1c-ca34b7c2a2fb/content",
    "method": "PUT",
    "objectKey": "org/org_spaces_fixture/spaces/space_ec15138f-dd1a-4a27-8374-a275d902cda8/raw/asset_afe60d9d-8181-4ddb-aa1c-ca34b7c2a2fb-capture.PLY"
  }
}

HTTP 201. Save upload.assetId and PUT the actual file bytes using the returned method and URL with the same authenticated resource context. Read spaces.get and confirm the asset status uploaded and stored byte_size before requesting assets.process. After uncertainty, read state before reserving another session.

Upload the actual file

The action call above reserves a session only. The supported CLI upload helper combines reservation with the declared authenticated PUT, deriving filename and exact byte size from your actual file. Save only the discovered spaceId in upload-target.json; bind the granted workspace separately. Confirm the storage effect before running:

{
  "spaceId": "<space id returned by granted discovery>"
}
topolo actions upload app_topolo_spaces.assets.upload.create --file /absolute/path/capture.sog --content-type application/octet-stream --resource-type workspace --resource-id "$SPACES_WORKSPACE_ID" --data @upload-target.json --confirm --json

For MCP, use topolo_upload_action only after inspecting its tool schema and this action's published upload contract. After upload, inspect spaces.get for uploaded status before processing. A successful helper response does not validate Gaussian contents or imply processing completed.

Verify the result

  • Save upload.assetId and PUT the actual file bytes using the returned method and URL with the same authenticated resource context.
  • Read spaces.get and confirm the asset status uploaded and stored byte_size before requesting assets.process. After uncertainty, read state before reserving another session.

Errors and recovery

  • organization_context_required (HTTP 403): Stop and authenticate into the approved owning organization. Preserve the actual denial; a resource id does not grant organization access.
  • workspace_required (HTTP 400): Discover the exact granted canonical workspace through resource/workspace discovery; bootstrap does not return a workspace record.
  • space_not_found (HTTP 404): Rediscover the exact space id in this granted workspace through spaces.list or a saved creation response; deletion or another workspace can make it unavailable.

A plain-text server refusal is surfaced by CLI/MCP as http_error with its HTTP status and requestId; its text is not a structured service error.code. Auth, action-input validation and platform resource resolution can refuse a request before its handler. Retain the exact error, request id and context; requesting another context is not a legitimate way to bypass a refusal.

Recovery boundary

No individual asset deletion or session cancellation action is published. Do not create another reservation after uncertainty until you inspect spaces.get; deleting the entire space removes metadata while retaining bytes.

  • Get space: Read one space with its stored asset, annotation, public-link and processing-job records.
  • Process space asset: Queue a processing job for an uploaded asset in the same space and inspect its later state.

Evidence

Real isolated local D1/R2 and source handlers with synthetic Auth/workspace discovery, queue transport, notification delivery and metering. Arbitrary fixture SOG bytes demonstrate handler state only, not valid Gaussian data, renderer quality, deployed processing or live effects. Annotation rows are seeded directly into isolated fixture storage because no annotation mutation is published. Capture digests and test scenarios are retained in the source fixture records.