> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tracecat.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Case Duration Definition

> Retrieve a single case duration definition.



## OpenAPI

````yaml https://platform.tracecat.com/api/openapi.json get /workspaces/{workspace_id}/case-durations/{duration_id}
openapi: 3.1.0
info:
  title: Tracecat API
  summary: Tracecat API
  description: The open source AI automation platform for security teams and agents.
  termsOfService: >-
    https://docs.google.com/document/d/e/2PACX-1vQvDe3SoVAPoQc51MgfGCP71IqFYX_rMVEde8zC4qmBCec5f8PLKQRdxa6tsUABT8gWAR9J-EVs2CrQ/pub
  contact:
    name: Tracecat Founders
    email: founders@tracecat.com
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1'
servers:
  - url: /api
security: []
tags:
  - name: public
    description: Public facing endpoints
  - name: workflows
    description: Workflow management
  - name: actions
    description: Action management
  - name: triggers
    description: Workflow triggers
  - name: secrets
    description: Secret management
  - name: variables
    description: Workspace variable management
paths:
  /workspaces/{workspace_id}/case-durations/{duration_id}:
    get:
      tags:
        - case-durations
        - case-durations
      summary: Get Case Duration Definition
      description: Retrieve a single case duration definition.
      operationId: case-durations-get_case_duration_definition
      parameters:
        - name: duration_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Duration Id
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CaseDurationDefinitionRead'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyCookie: []
        - ServiceAccountApiKeyBearer: []
components:
  schemas:
    CaseDurationDefinitionRead:
      properties:
        name:
          type: string
          maxLength: 255
          title: Name
          description: Human readable name for the metric.
        description:
          anyOf:
            - type: string
              maxLength: 1024
            - type: 'null'
          title: Description
          description: Optional description providing more context.
        start_anchor:
          $ref: '#/components/schemas/CaseDurationEventAnchor'
          description: Event configuration that marks the start of the duration.
        end_anchor:
          $ref: '#/components/schemas/CaseDurationEventAnchor'
          description: Event configuration that marks the end of the duration.
        id:
          type: string
          format: uuid
          title: Id
      type: object
      required:
        - name
        - start_anchor
        - end_anchor
        - id
      title: CaseDurationDefinitionRead
      description: Read model for case duration definitions.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    CaseDurationEventAnchor:
      properties:
        event_type:
          $ref: '#/components/schemas/CaseEventType'
          description: Case event type that should be matched for this anchor.
        filters:
          $ref: '#/components/schemas/CaseDurationEventFilters'
          description: Optional product-level filters for matching event payload values.
        selection:
          $ref: '#/components/schemas/CaseDurationAnchorSelection'
          description: >-
            Whether to use the first or last matching event for this anchor.
            Defaults to the first match.
          default: first
      additionalProperties: false
      type: object
      required:
        - event_type
      title: CaseDurationEventAnchor
      description: Selection criteria describing an event boundary for a duration.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    CaseEventType:
      type: string
      enum:
        - 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
      title: CaseEventType
      description: Case activity type values.
    CaseDurationEventFilters:
      properties:
        new_values:
          items:
            type: string
          type: array
          title: New Values
          description: New priority, severity, or status values to match.
        tag_refs:
          items:
            type: string
          type: array
          title: Tag Refs
          description: Case tag refs to match for tag add/remove events.
        field_ids:
          items:
            type: string
          type: array
          title: Field Ids
          description: Case custom field IDs to match for field change events.
        dropdown_definition_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Dropdown Definition Id
          description: Dropdown definition ID to match for dropdown value change events.
        dropdown_option_ids:
          items:
            type: string
          type: array
          title: Dropdown Option Ids
          description: Dropdown option IDs to match for dropdown value change events.
      additionalProperties: false
      type: object
      title: CaseDurationEventFilters
      description: Product-level filters for narrowing case duration event anchors.
    CaseDurationAnchorSelection:
      type: string
      enum:
        - first
        - last
      title: CaseDurationAnchorSelection
      description: Strategies for choosing which matching event should anchor a duration.
  securitySchemes:
    APIKeyCookie:
      type: apiKey
      in: cookie
      name: fastapiusersauth
    ServiceAccountApiKeyBearer:
      type: http
      description: Tracecat service account API key.
      scheme: bearer

````