Skip to Content
Disaster recoveryHold

Return quarantined data into its object

POST
/apis/funcd.io/v1alpha1/quarantine/return

Authorization

headerAuthorizationBearer <token>

A credential of funcd's config, sent as Authorization: Bearer followed by its token.

Request Body

application/json
  1. body
kind*string

The object's kind: KVStore, Bucket, or Function for a Function's local volume.

name*string

The object's name; for a volume, its Function's.

Match^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
Length1 <= length <= 63
namespace*string

The object's namespace.

Match^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
Length1 <= length <= 63
since?string

The entry to return, by its since as funcdctl hold status lists it. Left out, a return that was cut short resumes first, else the object's newest kept entry returns.

Match^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\.[0-9]{3}Z$
Formatdate-time
volume?string

With kind Function, the name of the local volume.

Match^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
Length1 <= length <= 63

Response Body

No Content

Example Request
curl -X POST 'https://example.com/apis/funcd.io/v1alpha1/quarantine/return' \  -H 'Content-Type: application/json' \  -d '{  "kind": "string",  "name": "string",  "namespace": "string"}'
Example Response
Empty

Answers

StatusProblem typeWhenWhat to do
204No Content
400urn:funcd:problem:invalidThe kind is none of KVStore, Bucket and Function.Send KVStore, Bucket, or Function with the volume; a SQL database's directory goes back by hand, with funcd stopped.
400urn:funcd:problem:invalidThe kind is Function and the body names no volume, or it names a volume with another kind.Name the volume with kind Function only.
400about:blankThe body is missing or is not JSON.Send a JSON body.
401urn:funcd:problem:unauthorizedThe request carries no bearer token or API key, or one that funcd does not know.Send a credential of funcd's config as a bearer token in the Authorization header, or in X-Api-Key.
403urn:funcd:problem:forbiddenThe credential's role does not allow it to return quarantined data: only an admin's does.Use an admin's credential.
404urn:funcd:problem:not-foundThe quarantine holds no entry of the object, or none of that since, that is kept or returning; a moving entry, which a failed move leaves, does not return.Read the entries under quarantine in funcdctl hold status; a moving entry returns once a later start of funcd has finished its move.
409urn:funcd:problem:conflictThe KVStore, the Bucket or the Function does not exist, or the Function declares no local volume of that name.Apply the KVStore or the Bucket again, or the Function with the volume in its spec.volumes, then return its data.
409urn:funcd:problem:conflictThe object holds data: an entry returns only into an empty KVStore, Bucket or volume.Delete what the object holds, if it is not needed, then return its data.
413urn:funcd:problem:payload-too-largeThe body is larger than 1 MiB.Send a smaller body.
415about:blankThe Content-Type of the body is not JSON.Send the body as application/json.
422about:blankThe query holds a parameter that the operation does not take.Send only the parameters that the operation lists.
422about:blankThe body breaks the schema: a field that it does not know, of the wrong type or past its limits.Correct the field at the location that the detail gives.
503urn:funcd:problem:unavailableThis funcd server keeps no quarantine of that kind, such as of volumes while volumes are off.Check the kind: funcdctl hold status lists the entries of the quarantine.