---
title: "Fetch a Debug Session"
url: "https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-dev-3/versions/76e259e8-9e78-4c0e-ab4a-3df25bddc4f1/operations/get-debug-session"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-control-planes-configuration-dev-3/versions/76e259e8-9e78-4c0e-ab4a-3df25bddc4f1.md

# Fetch a Debug Session (deprecated)

`GET` `/control-planes/{controlPlaneId}/observability/debug-sessions/{debugSessionId}`

Operation ID: `get-debug-session`

Returns a Debug Session

## Path parameters

- `controlPlaneId` (string, uuid, required) - The UUID of your control plane. This variable is available in the Konnect manager.
- `debugSessionId` (string, uuid, required) - Debug Session identifier

## Responses

- `200` - Debug Session Response
- `401` - Unauthorized
- `403` - Forbidden

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Konnect Control Planes Configuration
  version: 3.14.0
servers:
  - url: https://us.api.konghq.com/v2
    description: United-States Production region
  - url: https://eu.api.konghq.com/v2
    description: Europe Production region
  - url: https://au.api.konghq.com/v2
    description: Australia Production region
  - url: https://me.api.konghq.com/v2
    description: Middle-East Production region
  - url: https://in.api.konghq.com/v2
    description: India Production region
  - url: https://sg.api.konghq.com/v2
    description: Singapore Production region
paths:
  /control-planes/{controlPlaneId}/observability/debug-sessions/{debugSessionId}:
    parameters:
      - $ref: "#/components/parameters/controlPlaneId"
      - $ref: "#/components/parameters/debugSessionId"
    get:
      operationId: get-debug-session
      summary: Fetch a Debug Session
      description: Returns a Debug Session
      responses:
        "200":
          $ref: "#/components/responses/DebugSessionResponse"
        "401":
          $ref: "#/components/responses/DebugSessionUnauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
      deprecated: true
      tags:
        - Debug Sessions
security:
  - konnectAccessToken: []
  - personalAccessToken: []
components:
  parameters:
    controlPlaneId:
      name: controlPlaneId
      in: path
      required: true
      schema:
        type: string
        format: uuid
        example: 9524ec7d-36d9-465d-a8c5-83a3c9390458
      description: The UUID of your control plane. This variable is available in the
        Konnect manager.
    debugSessionId:
      schema:
        type: string
        format: uuid
        example: d32d905a-ed33-46a3-a093-d8f536af9a8a
      name: debugSessionId
      in: path
      required: true
      description: Debug Session identifier
  responses:
    DebugSessionResponse:
      description: Debug Session Response
      content:
        application/json:
          schema:
            allOf:
              - $ref: "#/components/schemas/DebugSession"
              - required:
                  - id
                  - max_samples
                  - duration_secs
                  - created_at
                  - targets
                properties:
                  target_status:
                    description: Feature support and status for each node instance based on its
                      version
                    type: array
                    items:
                      $ref: "#/components/schemas/TargetStatus"
          examples:
            Create Debug Session Response:
              $ref: "#/components/examples/DebugSessionExample"
    DebugSessionUnauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
  schemas:
    DebugSession:
      type: object
      properties:
        id:
          $ref: "#/components/schemas/UUID"
        name:
          description: The optional session name.
          type: string
        max_samples:
          description: The maximum amount of samples to collect per data plane.
          type: integer
          example: 10
          default: 200
          maximum: 200
          minimum: 1
        sampling_rule:
          description: An expression used to filter the requests to sample.
          type: string
          example: http.path == "/my-path"
          nullable: true
        duration_secs:
          description: The duration of the debug session in seconds.
          type: integer
          example: 300
          default: 300
          maximum: 1800
          minimum: 10
        capture_content:
          type: array
          items:
            $ref: "#/components/schemas/CaptureContentType"
        capture_log:
          type: array
          items:
            $ref: "#/components/schemas/CaptureLogType"
        capture_traces:
          description: Determines if Traces should be captured for this session.
          type: boolean
          example: true
          default: true
        capture_profile:
          $ref: "#/components/schemas/CaptureProfileInfo"
        started_at:
          description: An ISO-8601 timestamp representation of start date.
          type: string
          format: date-time
          example: 2024-11-04T20:10:06.927Z
          readOnly: true
        stopped_at:
          description: An ISO-8601 timestamp representation of stop date.
          type: string
          format: date-time
          example: 2022-11-04T20:10:06.927Z
          readOnly: true
        completed_at:
          description: An ISO-8601 timestamp representation of completion date.
          type: string
          format: date-time
          example: 2022-11-04T20:10:06.927Z
          readOnly: true
        timed_out:
          description: Determines whether the target did not respond in time before the
            sampling time elapsed.
          type: boolean
          readOnly: true
        created_at:
          $ref: "#/components/schemas/CreatedAt"
        updated_at:
          $ref: "#/components/schemas/UpdatedAt"
        targets:
          description: The data plane nodes to collect samples from.
          type: array
          items:
            type: string
            format: uuid
            example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
            description: Unique identifier of the data plane node.
          minItems: 1
        payload_sanitization:
          $ref: "#/components/schemas/PayloadSanitizationConfig"
    TargetStatus:
      description: Represents the status of supported features for a node instance
        based on its version
      type: object
      properties:
        target_id:
          description: Unique identifier of the data plane node.
          type: string
          format: uuid
          example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
        version:
          description: Version of the node instance
          type: string
          example: "3.11"
        compatible_features:
          description: List of debugger features that are compatible
          type: array
          items:
            $ref: "#/components/schemas/DebuggerFeatures"
          example:
            - logs
            - traces
          uniqueItems: true
        incompatible_features:
          description: List of debugger features that are incompatible
          type: array
          items:
            $ref: "#/components/schemas/DebuggerFeatures"
          example:
            - logs
          uniqueItems: true
      required:
        - target_id
        - version
        - compatible_features
        - incompatible_features
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    UUID:
      description: Contains a unique identifier used for this resource.
      type: string
      format: uuid
      example: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
      readOnly: true
    CaptureContentType:
      type: string
      enum:
        - headers
        - body
    CaptureLogType:
      type: string
      enum:
        - error
        - access
    CaptureProfileInfo:
      description: CaptureProfile contains the information around the profile that
        needs to be captured. Currently supports CPU profiling, with potential
        for memory profiling in the future.
      type: object
      properties:
        cpu:
          $ref: "#/components/schemas/CPUProfile"
    CreatedAt:
      description: An ISO-8601 timestamp representation of entity creation date.
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      readOnly: true
    UpdatedAt:
      description: An ISO-8601 timestamp representation of entity update date.
      type: string
      format: date-time
      example: 2022-11-04T20:10:06.927Z
      readOnly: true
    PayloadSanitizationConfig:
      description: Configuration for sanitizing sensitive data in captured payloads
      type: object
      properties:
        user_defined_rules:
          $ref: "#/components/schemas/UserDefinedRules"
    DebuggerFeatures:
      type: string
      enum:
        - logs
        - traces
        - payload_sanitization
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
    CPUProfile:
      description: CPUProfile contains parameters for cpu profile collection
      type: object
      properties:
        mode:
          description: The mode of cpu profile
          type: string
          example: time
          enum:
            - time
            - instruction
        sampling_interval:
          description: The interval for sampling. If the mode is 'time', this value is in
            microseconds. If the mode is 'instruction', this value is the step
            count.
          type: integer
          format: int64
          example: 1000
      required:
        - mode
    UserDefinedRules:
      description: User-defined payload sanitization rules
      type: object
      properties:
        headers:
          description: Rules for sanitizing HTTP headers
          type: array
          items:
            $ref: "#/components/schemas/HeaderSanitizationRule"
        body:
          description: Rules for sanitizing request/response body content
          type: array
          items:
            $ref: "#/components/schemas/BodySanitizationRule"
    HeaderSanitizationRule:
      type: object
      properties:
        name:
          description: Optional identifier for this rule
          type: string
          example: api-key
        header_name:
          description: HTTP header name to sanitize (case-insensitive)
          type: string
          example: auth-token
        scope:
          $ref: "#/components/schemas/SanitizationScope"
        action:
          $ref: "#/components/schemas/SanitizationAction"
      required:
        - header_name
        - scope
        - action
    BodySanitizationRule:
      type: object
      properties:
        name:
          description: Optional identifier for this rule
          type: string
          example: user-id
        strategy:
          $ref: "#/components/schemas/BodySanitizationStrategy"
        scope:
          $ref: "#/components/schemas/SanitizationScope"
        action:
          $ref: "#/components/schemas/SanitizationAction"
      required:
        - strategy
        - scope
        - action
    SanitizationScope:
      description: Where the rule applies
      type: array
      items:
        type: string
        enum:
          - request
          - response
      default:
        - request
        - response
    SanitizationAction:
      description: |
        - mask: Replace with "******"
      type: string
      default: mask
      enum:
        - mask
    BodySanitizationStrategy:
      description: Strategy for body content sanitization.
      oneOf:
        - $ref: "#/components/schemas/JsonPathStrategy"
        - $ref: "#/components/schemas/RegexStrategy"
    JsonPathStrategy:
      description: Strategy using JSONPath expression to locate content for sanitization.
      type: object
      properties:
        json_path:
          $ref: "#/components/schemas/JsonPathExpression"
      additionalProperties: false
      required:
        - json_path
    RegexStrategy:
      description: Strategy using regex pattern to locate content for sanitization.
      type: object
      properties:
        regex:
          $ref: "#/components/schemas/RegexPattern"
      additionalProperties: false
      required:
        - regex
    JsonPathExpression:
      description: JSONPath expression to locate the value.
      type: string
      example: $.user.email
    RegexPattern:
      description: Regex to match to locate the value.
      type: string
      format: regex
      example: \d{4}-\d{4}-\d{4}-\d{4}
  examples:
    DebugSessionExample:
      value:
        id: e7a4f6c0-5777-4a37-bcb9-2d37d3b362ee
        name: Debug Session 1
        max_samples: 10
        sampling_rule: http.path == "/my-path"
        duration_secs: 300
        capture_content:
          - headers
          - body
        capture_log:
          - error
          - access
        capture_traces: true
        capture_profile:
          cpu:
            mode: time
            sampling_interval: 1000
        targets:
          - ae853602-23c7-4218-9071-82fdef3a1efe
          - 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
        created_at: 2024-10-01T20:10:00.000Z
        updated_at: 2024-10-01T20:10:00.000Z
        target_status:
          - target_id: 5f9fd312-a987-4628-b4c5-bb4f4fddd5f7
            version: "3.9"
            compatible_features:
              - traces
            incompatible_features:
              - logs
          - target_id: ae853602-23c7-4218-9071-82fdef3a1efe
            version: "3.11"
            compatible_features:
              - traces
              - logs
            incompatible_features: []
        payload_sanitization:
          user_defined_rules:
            headers:
              - header_name: auth-token
                scope:
                  - request
                  - response
                action: mask
            body:
              - strategy:
                  json_path: $.user.email
                scope:
                  - response
                action: mask
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
  securitySchemes:
    konnectAccessToken:
      type: http
      scheme: bearer
      description: The Konnect access token is meant to be used by the Konnect
        dashboard and the decK CLI to authenticate with.
    personalAccessToken:
      type: http
      scheme: bearer
      description: The personal access token is meant to be used as an alternative to
        basic-auth when accessing Konnect via APIs. You can generate a Personal
        Access Token (PAT) from the personal access token page in the Konnect
        dashboard.
```
