Replaces a backend's location, credentials and limits.
Credentials left out are kept when the backend stays on the same store (see
[ReplaceBackendRequest::url]). Which backend is the default is left
alone. Files already written stay where they were: moving the location does
not move them, so this is for a store whose contents were copied first.
Asked whether it answers before the response, as when it was added.
Errors
400 when the URL will not open or moved to another store without
credentials, 401 when nothing was signed in, 403
when the caller may not write settings, 404 when no backend has that name.
sessiontessera_session<token>Set by POST /auth/login. A browser sends it automatically; it is HttpOnly, so page scripts cannot read or set it.
name*stringWhich backend
application/json- body
Body of PUT /admin/storage/backends/{name}: everything in
[BackendRequest] but the name, which the path gives.
capacity_bytes?|How much it may hold. Omit or send null for no limit.
int640 <= valuedirect_access?booleanWhether browsers may be redirected to it directly.
options?|Backend-specific options, passed to object_store unchanged. Omit to
keep the stored ones; {} clears them.
read_only?booleanWhether it should stop taking new content.
url*stringWhere it is. Sealed before it is stored.
Without credentials, here or in options, the stored ones are kept,
as long as the backend stays on the same store: same scheme, same
server, same options. Moving to another bucket keeps them; moving to
another endpoint is refused until credentials are sent.
The backend as it now stands
application/json- response
One backend, as the panel draws it.
Four booleans for four unrelated questions: where new uploads go, whether this one still accepts them, whether the process can reach it, and whether browsers may be redirected to it. Merging any pair into an enum would invent a state that does not exist, since a read-only backend can be the default and an unreachable one can be either.
access_key?|The access key ID with all but four characters at each end hidden, or
null when there is none or it is too short to show any of.
capacity_bytes?|How much it may hold, or null for no limit.
Typed in by the operator: object stores have no capacity API, and on a free tier the limit belongs to the account's plan, which no API reports.
int640 <= valueconfig*The options that say where the store is, for the panel to show and edit. Credentials are never among them.
direct_access*booleanWhether browsers are redirected to it directly, to download a file or write an upload's parts, instead of going through this server.
Only S3 and GCS support this. On anything else it may be true and
change nothing.
is_default*booleanWhether new uploads go here.
last_checked_at?|When it was last called, or null before it has been since start-up.
date-timelast_error?|Why the last call failed, or null when it answered.
name*stringWhat file_segments.backend records. Stable, and how everything else
refers to it.
reachable*booleanWhether it answered the last time it was called, or true before it
has been.
false means shares held there fail until the operator fixes the
credentials or the address, or the store comes back. Worth showing
prominently, because nothing else about the row looks wrong.
Learned from the calls uploads and downloads make, so a backend in use is always current; one left idle is asked every fifteen minutes, and one that failed every five, until it answers.
read_only*booleanWhether it still takes new content. Reads are unaffected.
url*stringWhere it is, without credentials: no user, password, query or fragment. A local directory is its path.
used_bytes*integerHow much it is holding.
Not typed in and not asked of the store, but summed from the segments this instance wrote.
int640 <= valuecurl -X PUT 'https://example.com/api/v1/admin/storage/backends/string' \ -H 'Content-Type: application/json' \ -d '{ "url": "string"}'{ "access_key": "string", "capacity_bytes": 0, "config": { "account": "string", "allow_http": true, "endpoint": "string", "region": "string" }, "direct_access": true, "is_default": true, "last_checked_at": "2019-08-24T14:15:22Z", "last_error": "string", "name": "string", "reachable": true, "read_only": true, "url": "string", "used_bytes": 0}