Skip to content
sproutboatDocs
Esc
↑↓navigate↵open⌘Jpreview

Upload an assets manifest

The manifest JSON (see AssetManifest), at most 4 MiB, 20,000 files and 512 MiB in total, uploaded after every blob it names. sha256 is the digest of the manifest’s exact bytes; the app then references it as assets_manifest_ref: "assets/<sha256>". If a blob is missing the answer is 409 blobs-missing with up to 100 digests in missing (and the full count in missing_count); only blobs the team uploaded itself count as present. Idempotent.

PUT/v1/assets/manifests/{sha256}
Authorization
AuthorizationBearer token · headerrequired

A team API key, sbk_..., from Settings, API keys.

or
x-api-keyAPI key · headerrequired

The same key, in a header of its own.

Path parameters
sha256Sha256required

Lowercase hex SHA-256 of the exact bytes of the body.

matches ^[0-9a-f]{64}$
Request body
requiredapplication/json
notFoundstringrequired

What a path that is no file answers.

Allowed:nonesingle-page-application404-page
runSproutFirstboolean | string[]required

true, false, or a list of /-anchored globs that go to the app before an asset of the same path.

Show properties
One of:
boolean
boolean
string[]
Array of string
string
filesobjectrequired

Request path (absolute, normalized, for example /index.html) to file.

headersobject[]
max items 2000
Show properties
Array of object
patternstringrequired
setany[][]required
unsetstring[]required
redirectsobject[]
max items 2000
Show properties
Array of object
fromstringrequired
tostringrequired
statusintegerrequired
min 300 · max 399
Responses
200

Stored.

sha256Sha256required
matches ^[0-9a-f]{64}$
refstringrequired
filesintegerrequired
bytesintegerrequired
storedbooleanrequired
400

The request is malformed. path names the field when one is at fault; some refusals (a digest mismatch, a body that is not JSON) carry a message only.

One of:
ErrorInvalid
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:invalid
ErrorPlain
errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
401

No key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.

errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
403

The key lacks a grant (reason: forbidden, need: "<resource>:<action>").

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:forbidden
needstringrequired

The grant, as <resource>:<action>, for example app:write.

409

Blobs the manifest names are not uploaded (reason: blobs-missing, missing, missing_count).

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:blobs-missing
missingSha256[]required

Up to 100 of the missing digests.

max items 100
missing_countintegerrequired

How many are missing in all.

413

The body is over the limit for this route (reason: too-large; some refusals carry a message only).

One of:
ErrorTooLarge
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:too-large
ErrorPlain
errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
429

The key is rate-limited (key-rate-limited) or the team uploads too fast (upload-rate). Honor Retry-After.

One of:
ErrorKeyRateLimited
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:key-rate-limited
retry_after_sintegerrequired

Seconds to wait; also the Retry-After header.

ErrorUploadRate
errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:upload-rate
retry_afterintegerrequired

Seconds to wait; also the Retry-After header.

Request
curl -X PUT 'https://dash.sproutboat.com/v1/assets/manifests/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "notFound": "none",
  "runSproutFirst": true,
  "files": {
    "property1": {
      "hash": "string",
      "size": 0,
      "type": "string",
      "br": {
        "hash": "string",
        "size": 0
      },
      "gz": {
        "hash": "string",
        "size": 0
      }
    },
    "property2": {
      "hash": "string",
      "size": 0,
      "type": "string",
      "br": {
        "hash": "string",
        "size": 0
      },
      "gz": {
        "hash": "string",
        "size": 0
      }
    }
  },
  "headers": [
    {
      "pattern": "string",
      "set": [
        [
          "string",
          "string"
        ]
      ],
      "unset": [
        "string"
      ]
    }
  ],
  "redirects": [
    {
      "from": "string",
      "to": "string",
      "status": 300
    }
  ]
}'
Response
{
  "sha256": "string",
  "ref": "assets/0f3a...e1",
  "files": 0,
  "bytes": 0,
  "stored": true
}