---
title: "Trigger a Retention Execution"
method: POST
path: "/retentions/{id}/executions"
tags: ["Retention"]
---

# Trigger a Retention Execution

`POST /retentions/{id}/executions`

Trigger a Retention Execution, if dry_run is True, nothing would be deleted actually.

## Path parameters

- `id` integer, required

## Headers

- `X-Request-Id` string

## Request body

- object
  - `dry_run` boolean

## Response `200`

Trigger a Retention job successfully.

## Other responses

- `201` — Created
- `401` — Unauthorized
- `403` — Forbidden
- `500` — Internal server error

---

[API](https://skmtc.dev/goharbor/apis/harbor-api.md) · [All operations](https://skmtc.dev/goharbor/apis/harbor-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/goharbor/harbor-api/revisions/62d78801f8df/schema)
