---
title: "Get Case Duration Definition"
method: GET
path: "/workspaces/{workspace_id}/case-durations/{duration_id}"
tags: ["case-durations"]
---

# Get Case Duration Definition

`GET /workspaces/{workspace_id}/case-durations/{duration_id}`

## Request

- Base URL: `https://platform.tracecat.com/api`
- URL: `https://platform.tracecat.com/api/workspaces/{workspace_id}/case-durations/{duration_id}`
- Auth: one of:
  - API key in cookie `fastapiusersauth`
  - HTTP bearer

Retrieve a single case duration definition.

## Path parameters

- `duration_id` string, uuid, required
- `workspace_id` string, uuid, required

## Response `200`

Successful Response

- CaseDurationDefinitionRead: Read model for case duration definitions.
  - `name` string, required: Human readable name for the metric.
  - `description` string, nullable: Optional description providing more context.
  - `start_anchor` CaseDurationEventAnchor, required: Selection criteria describing an event boundary for a duration.
    - `event_type` 'case_created' | 'case_updated' | 'case_closed' | 'case_reopened' | 'case_viewed' | 'priority_changed' | 'severity_changed' | 'status_changed' | 'fields_changed' | 'assignee_changed' | 'attachment_created' | 'attachment_deleted' | 'tag_added' | 'tag_removed' | 'payload_changed' | 'task_created' | 'task_deleted' | 'task_status_changed' | 'task_priority_changed' | 'task_workflow_changed' | 'task_assignee_changed' | 'dropdown_value_changed' | 'table_row_linked' | 'table_row_unlinked' | 'comment_created' | 'comment_updated' | 'comment_deleted' | 'comment_reply_created' | 'comment_reply_updated' | 'comment_reply_deleted' | 'parent_changed' | 'sub_cases_added' | 'sub_cases_removed', required: Case activity type values.
    - `filters` CaseDurationEventFilters: Product-level filters for narrowing case duration event anchors.
      - `new_values` string[]: New priority, severity, or status values to match.
      - `tag_refs` string[]: Case tag refs to match for tag add/remove events.
      - `field_ids` string[]: Case custom field IDs to match for field change events.
      - `dropdown_definition_id` string, nullable: Dropdown definition ID to match for dropdown value change events.
      - `dropdown_option_ids` string[]: Dropdown option IDs to match for dropdown value change events.
    - `selection` 'first' | 'last': Strategies for choosing which matching event should anchor a duration.
  - `end_anchor` CaseDurationEventAnchor, required: Selection criteria describing an event boundary for a duration.
    - `event_type` 'case_created' | 'case_updated' | 'case_closed' | 'case_reopened' | 'case_viewed' | 'priority_changed' | 'severity_changed' | 'status_changed' | 'fields_changed' | 'assignee_changed' | 'attachment_created' | 'attachment_deleted' | 'tag_added' | 'tag_removed' | 'payload_changed' | 'task_created' | 'task_deleted' | 'task_status_changed' | 'task_priority_changed' | 'task_workflow_changed' | 'task_assignee_changed' | 'dropdown_value_changed' | 'table_row_linked' | 'table_row_unlinked' | 'comment_created' | 'comment_updated' | 'comment_deleted' | 'comment_reply_created' | 'comment_reply_updated' | 'comment_reply_deleted' | 'parent_changed' | 'sub_cases_added' | 'sub_cases_removed', required: Case activity type values.
    - `filters` CaseDurationEventFilters: Product-level filters for narrowing case duration event anchors.
      - `new_values` string[]: New priority, severity, or status values to match.
      - `tag_refs` string[]: Case tag refs to match for tag add/remove events.
      - `field_ids` string[]: Case custom field IDs to match for field change events.
      - `dropdown_definition_id` string, nullable: Dropdown definition ID to match for dropdown value change events.
      - `dropdown_option_ids` string[]: Dropdown option IDs to match for dropdown value change events.
    - `selection` 'first' | 'last': Strategies for choosing which matching event should anchor a duration.
  - `id` string, uuid, required

## Other responses

- `422`: Validation Error

---

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