Skip to Content
Xeonr Developer Docs
API SpecificationUpdater

Start an artifact upload

POST
/xeonr.updater.v1.UpdaterService/UploadArtifact

Requests an upload slot from upl for one file of a draft release and returns its upload_request_id with either multipart parts (each with its own presigned URL, uploadable in parallel) or a single upload_url. PUT the bytes, then call ConfirmArtifact; nothing is recorded on the release until then.

platform must be an electron id (darwin, win32, win32-squirrel, linux, universal) or a binary <goos>-<goarch> id such as linux-amd64, else INVALID_ARGUMENT; one release holds one family only, so mixing them is FAILED_PRECONDITION, as is uploading to a published release. An unknown release is NOT_FOUND. 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
platform?string
Length1 <= length
filename?string
Length1 <= length
filesizeBytes?|
Formatint64
Range0 < value
sha512?string
Length1 <= length
sha1?string

optional, needed for nupkg

sha256?string

Optional hex SHA-256 of the file. When set on a binary artifact, ConfirmArtifact refuses stored bytes that do not match it.

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/UploadArtifact" \  -H "Connect-Protocol-Version: 1" \  -H "Content-Type: application/json" \  -d '{}'
{
  "uploadUrl": "https://s3.upl.im/pixel/uploads/b4e8c2a6?X-Amz-Signature=EXAMPLE",
  "uploadRequestId": "b4e8c2a6-1f3d-4a7e-9c5b-0d2f6e8a1b39",
  "parts": [
    "map[partNumber:1 sizeBytes:52428800 uploadUrl:https://s3.upl.im/pixel/uploads/b4e8c2a6?partNumber=1&uploadId=2~Xk9mQ&X-Amz-Signature=EXAMPLE]",
    "map[partNumber:2 sizeBytes:46137344 uploadUrl:https://s3.upl.im/pixel/uploads/b4e8c2a6?partNumber=2&uploadId=2~Xk9mQ&X-Amz-Signature=EXAMPLE]"
  ]
}