---
title: "Preview resource deletion"
method: POST
path: "/v1/commands/preview_resource_deletion"
tags: ["Projects and access"]
---

# Preview resource deletion

`POST /v1/commands/preview_resource_deletion`

## Request

- Base URL: `https://app.agentlinkops.com`
- URL: `https://app.agentlinkops.com/v1/commands/preview_resource_deletion`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Shared command transport. All logical arguments in JSON; no query or Idempotency-Key header. See canonical operation reference.

## Headers

- `X-Workspace-ID` string

## Request body

- PreviewResourceDeletionInput
  - `resourceType` 'watch' | 'target' | 'project', required: resource type; see schema.
  - `resourceId` string, required: resource ID from create/list.

## Response `200`

Command result, including queued admission.

- PreviewResourceDeletionOutput
  - `resource_type` 'watch' | 'target' | 'project', required
  - `resource_id` string, required
  - `project_id` string, required: Project that owns this record.
  - `counts` object, required
    - `watches` number
    - `targets` number
    - `jobs` number
    - `target_jobs` number
    - `observations` number
    - `target_observations` number
    - `events` number
    - `target_events` number
  - `blockers` object[], required
    - `code` string, required
    - `message` string, required
  - `eligible` boolean, required
  - `confirmation` string, required
  - `state` string, required: Saved lifecycle or evidence state, as enumerated for this record.
  - `receipt` object, nullable, required
    - `id` string, required: Resource identifier returned by the operation.
    - `workspace_id` string, required: Workspace that owns this record.
    - `project_id` string, required: Project that owns this record.
    - `resource_type` 'watch' | 'target' | 'project', required
    - `resource_id` string, required
    - `requested_at` string, required
    - `requested_by` string, required
    - `state` 'pending' | 'completed', required: Saved lifecycle or evidence state, as enumerated for this record.
    - `replayed` boolean: True when the response reuses an earlier request with the same idempotency value.
  - `scope` string, required

## Other responses

- `429`: Request-rate or usage refusal. Inspect error.code and recovery details before retrying.
- `default`: Error envelope. Non-configuration 5xx messages are masked and details omitted; allowlisted configuration errors retain static operator recovery.

---

[API](https://skmtc.dev/agentlinkops/apis/agentlinkops-http-api.md) · [All operations](https://skmtc.dev/agentlinkops/apis/agentlinkops-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentlinkops/apis/agentlinkops-http-api/revisions/2a712a1dcfa7?raw)
