---
title: "Preview a purge"
method: POST
path: "/apiops/projects/{projectName}/lifecycle-purge-previews"
tags: ["LifecyclePurge"]
---

# Preview a purge

`POST /apiops/projects/{projectName}/lifecycle-purge-previews`

## Request

- Base URL: `http://167.86.118.166:32080`
- URL: `http://167.86.118.166:32080/apiops/projects/{projectName}/lifecycle-purge-previews`
- Auth: none declared
- TypeScript: <https://skmtc.dev/apinizer/apis/apinizer-management-apis/docs/apiops/projects/:projectName/lifecycle-purge-previews/post.ts> (a function with typed inputs; its response is checked against the schema)

Builds the manifest and its digest without writing anything to the subject. Refused while a legal hold is active, while another run targets the subject, or when the mode does not apply.

## Path parameters

- `projectName` string, required

## Request body

- ApiOpsLifecyclePurgeRequestDTO
  - `mode` string
  - `subject` ApiOpsLifecycleSubjectDTO
    - `subjectType` 'ORGANIZATION' | 'CONSUMER' | 'APPLICATION' | 'API_CLIENT'
    - `consumerKey` string
    - `apiClientKey` string
    - `applicationKey` string
    - `organizationCode` string
  - `retentionDays` integer
  - `runId` string
  - `digest` string

## Response `200`

OK

- ApiOpsResponseLifecyclePurgeRun
  - `runId` string
  - `mode` string
  - `subjectType` 'ORGANIZATION' | 'CONSUMER' | 'APPLICATION' | 'API_CLIENT'
  - `subjectKey` string
  - `subjectLabel` string
  - `status` string
  - `manifest` ApiOpsResponseLifecyclePurgeManifestItem[]
    - `collection` string
    - `action` string
    - `criteriaSummary` string
    - `expectedCount` integer
    - `note` string
  - `manifestDigest` string
  - `retentionDays` integer
  - `retentionDaysForTrafficLogs` integer
  - `previewedBy` string
  - `previewedAt` string, date-time
  - `approvedBy` string
  - `approvedAt` string, date-time
  - `executedBy` string
  - `createdAt` string, date-time
  - `queuedAt` string, date-time
  - `runningAt` string, date-time
  - `heartbeatAt` string, date-time
  - `pointOfNoReturnAt` string, date-time
  - `cancelRequested` boolean
  - `finishedAt` string, date-time
  - `durationMs` integer
  - `processedCount` integer
  - `anonymizedCount` integer
  - `deletedCount` integer
  - `revokedCount` integer
  - `endedCount` integer
  - `failedCount` integer
  - `issueCount` integer
  - `issuesTruncated` boolean
  - `messageKey` string
  - `messageParams` object

---

[API](https://skmtc.dev/apinizer/apis/apinizer-management-apis.md) - [All operations](https://skmtc.dev/apinizer/apis/apinizer-management-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/apinizer/apis/apinizer-management-apis/revisions/e083046b24cd?raw)
