# Return quarantined data into its object

URL: /docs/api/disaster-recovery/hold/return-quarantined

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

## Authentication

One of:

- `bearer`: A credential of funcd's config, sent as Authorization: Bearer followed by its token.
- `apiKey`: A credential of funcd's config, sent in the X-Api-Key header.

## Body

`QuarantineReturn` as `application/json`, required.

```json
{
  "additionalProperties": false,
  "properties": {
    "kind": {
      "description": "The object's kind: KVStore, Bucket, or Function for a Function's local volume.",
      "type": "string"
    },
    "name": {
      "description": "The object's name; for a volume, its Function's.",
      "maxLength": 63,
      "minLength": 1,
      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
      "type": "string"
    },
    "namespace": {
      "description": "The object's namespace.",
      "maxLength": 63,
      "minLength": 1,
      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
      "type": "string"
    },
    "since": {
      "description": "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.",
      "format": "date-time",
      "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{3}Z$",
      "patternDescription": "an RFC3339 UTC timestamp with exactly 3 fractional digits (2026-10-07T20:03:35.965Z)",
      "type": "string"
    },
    "volume": {
      "description": "With kind Function, the name of the local volume.",
      "maxLength": 63,
      "minLength": 1,
      "pattern": "^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$",
      "type": "string"
    }
  },
  "required": [
    "kind",
    "namespace",
    "name"
  ],
  "type": "object"
}
```

## 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. |