Disaster recoveryHold
Return quarantined data into its object
POST
header
AuthorizationBearer <token>A credential of funcd's config, sent as Authorization: Bearer followed by its token.
application/json- body
kind*stringThe object's kind: KVStore, Bucket, or Function for a Function's local volume.
name*stringThe object's name; for a volume, its Function's.
Match
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$Length
1 <= length <= 63namespace*stringThe object's namespace.
Match
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$Length
1 <= length <= 63since?stringThe 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$Format
date-timevolume?stringWith kind Function, the name of the local volume.
Match
^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$Length
1 <= length <= 63No Content
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
| Status | Problem type | When | What to do |
|---|---|---|---|
| 204 | No Content | ||
| 400 | urn:funcd:problem:invalid | The 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. |
| 400 | urn:funcd:problem:invalid | The kind is Function and the body names no volume, or it names a volume with another kind. | Name the volume with kind Function only. |
| 400 | about:blank | The body is missing or is not JSON. | Send a JSON body. |
| 401 | urn:funcd:problem:unauthorized | The 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. |
| 403 | urn:funcd:problem:forbidden | The credential's role does not allow it to return quarantined data: only an admin's does. | Use an admin's credential. |
| 404 | urn:funcd:problem:not-found | The 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. |
| 409 | urn:funcd:problem:conflict | The 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. |
| 409 | urn:funcd:problem:conflict | The 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. |
| 413 | urn:funcd:problem:payload-too-large | The body is larger than 1 MiB. | Send a smaller body. |
| 415 | about:blank | The Content-Type of the body is not JSON. | Send the body as application/json. |
| 422 | about:blank | The query holds a parameter that the operation does not take. | Send only the parameters that the operation lists. |
| 422 | about:blank | The 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. |
| 503 | urn:funcd:problem:unavailable | This 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. |