API Explorer 1018 endpoints

Get Retention Runs

GET /obp/v7.0.0/management/banks/BANK_ID/retention-runs

OBPv7.0.0-getRetentionRuns Roles: CanGetRetentionRuns(per bank) Data-RetentionAPI

The retention runs of a space, newest first. Optional query parameters: retention_policy_id, status, limit (1 to 500, default 50) and offset (default 0).

A run has a mode, preview (counts only, nothing changes) or execute, and a status: pending (waiting for approval by a second user), running, done, refused (the props switch its action off, the approver rejected it, or its policy was deleted) or failed (some resources could not be disposed of and were left in place; see message). The counts include what went with a resource: cascaded files, and a chat room's messages. requested_by_user_id is left out when the retention scheduler requested the run.

BANK_ID is the space: a bank's id, or SYS for the system space. The Role is checked at that BANK_ID.

User Authentication is Required. The User must be logged in. The Application must also be authenticated.

URL Parameters:

BANK_ID: gh.29.uk

JSON response body fields (20)
anonymised_count
anonymised_count
archived_count
archived_count
bank_id
gh.29.uk
deleted_count
deleted_count
failed_count
failed_count
held_count
held_count
matched_count
matched_count
message
123456
mode
mode
requested_at
requested_at
retention_run_id
retention_run_id
retention_runs
retention_runs
status
approval_comment
approval_comment
approval_decision
approval_decision
approved_by_user_id
approved_by_user_id
ended_at
ended_at
requested_by_user_id
requested_by_user_id
retention_policy_id
retention_policy_id
started_at
started_at
Example success response
{
  "retention_runs": [
    {
      "retention_run_id": "0b9c8d7e-6f5a-4b3c-2d1e-0f9e8d7c6b5a",
      "retention_policy_id": "6a1f0e2c-3b8d-4c5e-9f7a-1d2e3f4a5b6c",
      "bank_id": "SYS",
      "mode": "execute",
      "status": "done",
      "requested_by_user_id": "9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1",
      "approved_by_user_id": "4f3e2d1c-0b9a-4876-9543-210fedcba987",
      "approval_decision": "approved",
      "approval_comment": "Checked against the preview.",
      "matched_count": 42,
      "archived_count": 43,
      "anonymised_count": 0,
      "deleted_count": 0,
      "held_count": 2,
      "failed_count": 0,
      "requested_at": "2026-01-01T00:00:00Z",
      "started_at": "2026-01-01T00:00:00Z",
      "ended_at": "2026-01-01T00:00:00Z",
      "message": "Done."
    }
  ]
}
Possible errors (5)
  • OBP-30001: Bank not found. Please specify a valid value for BANK_ID.
  • OBP-20001: User not logged in. Authentication is required!
  • OBP-20006: User is missing one or more roles:
  • OBP-30620: Invalid query parameter for data retention.
  • OBP-50000: Unknown Error.
Implemented by OBPv7.0.0 getRetentionRuns