nodes

Assemble an upload's parts into one file (path in body)

Assemble the parts write_file_part sent into one file: the node concatenates part-0 to part-(part_count-1) in order, checks the total against max_chunked_write_bytes, hashes the result against the sha256 you declare (pass it when you can; a mismatch refuses and keeps the parts), then renames it into place atomically and removes the part directory. Returns {written, path, bytes_written, sha256, sha256_verified, parts, upload_id}; parents are created and an existing file is replaced, like write_file. A refusal says exactly what is wrong: the parts that are missing or at or past part_count, with every part's size on the node, so you re-send only those (same upload_id and part_index) and commit again - nothing is assembled until the set is complete. Committing again after success answers with the same receipt when the file in place hashes to the declared sha256, so a lost answer costs one more call, never a re-upload. To abandon an upload: run_command "rm -rf ~/.givemeanode/uploads/<upload_id>"; part directories untouched for 7 days are removed by the next commit on that node. Calling this on a stopped node wakes it, exactly like write_file, and NOTHING IS ASSEMBLED on the queued/waking answers (written:false); the parts on the disk are intact, so commit again once the node is running. Opens a billed session on the node's mission like any other exec. executable:true sets mode 0755.

post/preview/nodes/{name}/files/commit

Request

  • Base URL: https://autoresearch.sfcompute.com
  • URL: https://autoresearch.sfcompute.com/preview/nodes/{name}/files/commit
  • Auth: HTTP bearer

Path parameters

namestring required

Node name (from list_nodes).

Query parameters

workspacestring

Act in this workspace (its slug). Omitted: the token's bound workspace, then the organization's default. Never ambient - there is no switch-workspace mutation on this door.

Request body

executableboolean nullable

true = mode 0755 (an entry script); default 0644.

part_countinteger required

How many parts the file was split into: parts 0 to part_count-1 must all be on the node, and no higher index may be.

pathstring required

Destination path: absolute, or relative to the home directory (/home/dev). Parent directories are created; an existing file is replaced atomically.

sha256string nullable

Lowercase hex sha256 of the WHOLE file. Recommended: when present the node hashes the assembled file and refuses on a mismatch, and a second commit after success answers with the same receipt. When absent the file is checked by size only and the receipt carries the node's own digest for you to compare.

upload_idstring required

The upload_id the parts were sent under.

Response

The capability's JSON result.

objectstring

The resource type, when the result is one resource.

Changes

No recorded changes to this operation across all 1 revision of this API.