Endpoint

/v1/frozen/bridges/{filesystem_uuid}/deletes/

GET

Lists the bridge's deletes, oldest first, each in the form getting one delete returns, or only those in `state` when it's given. A delete stays listed until it is removed. Results come in pages of up to 100 deletes. A page can hold fewer deletes than its limit, or none, and still not be the last, so keep requesting the next page until a response has no next page. Returns HTTP 404 if no Frozen bridge has this UUID.

Parameters

Name Description Required
filesystem_uuid The Frozen bridge's filesystem UUID, as `GET /v1/frozen/bridges/` reports it. Yes
state Only list deletes in this state.: * `CANCELED` - The delete was canceled. What it already deleted stays deleted, and it deletes nothing more., * `FAILED` - The delete stopped before it finished; `failure_message` says what to do., * `FINISHED` - Everything its paths covered is deleted, the paths themselves included., * `IN_PROGRESS` - The delete is removing what its paths cover. No
after Return entries after the given key (keys are returned in the paging object) No
limit Return no more than this many entries; the system may choose a smaller limit. No

Response

Codes

Code Description
200 Return value on success

Schema

{
  "description": "api_frozen_deletes",
  "type": "object",
  "properties": {
    "entries": {
      "type": "array",
      "items": {
        "description": "The deletes, oldest first.",
        "type": "object",
        "properties": {
          "id": {
            "description": "The delete's ID. Deletes take their IDs from the same sequence as the bridge's freeze and thaw jobs, so the deletes' IDs have gaps.",
            "type": "string"
          },
          "subtree": {
            "description": "The directory, with everything under it, or the one file the delete covers, as a path relative to the bridge, such as `/projects/2019`. Absent when the delete has `files`.",
            "type": "string"
          },
          "files": {
            "type": "array",
            "items": {
              "description": "The paths the delete covers, relative to the bridge, in the order given. A directory covers everything under it. Absent when the delete has a `subtree`.",
              "type": "string"
            }
          },
          "state": {
            "type": "string",
            "enum": [
              "IN_PROGRESS",
              "FINISHED",
              "CANCELED",
              "FAILED"
            ],
            "description": "The delete's state.:\n * `CANCELED` - The delete was canceled. What it already deleted stays deleted, and it deletes nothing more.,\n * `FAILED` - The delete stopped before it finished; `failure_message` says what to do.,\n * `FINISHED` - Everything its paths covered is deleted, the paths themselves included.,\n * `IN_PROGRESS` - The delete is removing what its paths cover."
          },
          "failure_message": {
            "description": "For a failed delete, where it stopped and what to do next.",
            "type": "string"
          },
          "start_time": {
            "description": "When the delete started, in RFC 3339 format.",
            "type": "string"
          },
          "end_time": {
            "description": "When the delete finished, was canceled or failed, in RFC 3339 format. Absent while it is in progress.",
            "type": "string"
          },
          "files_deleted": {
            "description": "Files the delete has deleted, not counting directories or symbolic links.",
            "type": "string"
          },
          "bytes_deleted": {
            "description": "Total size in bytes of the deleted files, each as large as it was when deleted.",
            "type": "string"
          }
        }
      }
    }
  }
}

POST

Starts a delete of one directory or file (`subtree`) or a list of up to 256 (`files`), other than the bridge's root, and returns the delete's ID and a URI to check its progress. Paths are relative to the bridge: on a bridge at `/archive`, the cluster path `/archive/projects/2019` is `/projects/2019`. A refusal gives paths as cluster paths, as qq takes them, except a path that doesn't start with `/` or contains `..`, which it gives as sent. Needs PRIVILEGE_PORTAL_SPOKE_WRITE as well. Returns HTTP 400 for a body it can't accept, with a message that says why; HTTP 409 while a freeze or thaw is working on files under its paths, giving that job's ID; and HTTP 404 if no Frozen bridge has this UUID.

Parameters

Name Description Required
filesystem_uuid The Frozen bridge's filesystem UUID, as `GET /v1/frozen/bridges/` reports it. Yes

Request

Schema

{
  "description": "api_frozen_delete_request",
  "type": "object",
  "properties": {
    "subtree": {
      "description": "One directory, with everything under it, or one file, as a path relative to the bridge, such as `/projects/2019`. Not `/`, the whole bridge. Give either `subtree` or `files`.",
      "type": "string"
    },
    "files": {
      "type": "array",
      "items": {
        "description": "1 to 256 paths relative to the bridge, deleted in the order given. A directory covers everything under it. Give either `subtree` or `files`.",
        "type": "string"
      }
    }
  }
}

Response

Codes

Code Description
202 Return value on success