Skip to Content
Xeonr Developer Docs
API SpecificationUpdater

Confirm an artifact upload

POST
/xeonr.updater.v1.UpdaterService/ConfirmArtifact

Completes an upload started with UploadArtifact: stores the file under the release's platform directory and records its checksums in the release manifest. The stored file is private unless the release is on a public target. For a binary <goos>-<goarch> artifact the service reads the stored bytes back and computes their SHA-256 and SHA-512 itself; if a sent sha512 or sha256 does not match, the upload is removed and the call fails. The returned artifact carries the size and checksums as recorded.

A published release is FAILED_PRECONDITION; an unknown release is NOT_FOUND. Pass part_etags for a multipart upload. The caller needs write access to the app's bucket: a signed-in person's token carrying upl:uploads:manage, or a team API key. A read-only token (the download page's client_credentials token, or one without that scope) gets PERMISSION_DENIED.

An updater-cli team API key (carrying updater:apps:read and updater:releases:edit) may call this for an app its team owns (and, for a bound key, one of its apps); a key for another team's app gets NOT_FOUND.

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

bucketId?string
Length1 <= length
releaseId?string
Length1 <= length
uploadRequestId?string
Length1 <= length
platform?string
Length1 <= length
filename?string
Length1 <= length
sha512?string
Length1 <= length
sha1?string

optional

partEtags?array<>

ETags for multipart upload parts. Required when upload was multipart.

sha256?string

Optional hex SHA-256 of the file, checked against the stored bytes of a binary artifact like sha512 is. The confirmed Artifact carries the SHA-256 the service computed either way.

Match^[0-9a-fA-F]{64}$
[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://updater.xeonr.io/xeonr.updater.v1.UpdaterService/ConfirmArtifact" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "artifact": "map[filename:Pixel-1.4.2-mac.zip platform:darwin sha512:5478894ffb88e2be006df4391f3fb17575b870ff9bc7e8c649ef0d7e9cc5a91adc948a12a4d5819bf9298f57441e2b647680c9bb0ca0a09444b3511c82107c42 size:98566144]"
}