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

# Run the controlled Den egress diagnostic

> Runs fixed HTTP, redirect, OAuth-shaped, and MCP probes from the Den process to the operator-configured public Diagnostics origin.



## OpenAPI

````yaml /openapi.json post /v1/diagnostics/egress
openapi: 3.1.0
info:
  title: Den API
  description: >-
    OpenAPI spec for the Den control plane API.


    Authentication:

    - Use `Authorization: Bearer <session-token>` for user-authenticated routes
    that require a Den session.

    - Use `x-api-key: <den-api-key>` for API-key-authenticated routes that
    accept organization API keys.

    - Public routes like health and documentation do not require authentication.


    Swagger tip: use the security schemes in the Authorize dialog to set either
    `bearerAuth` or `denApiKey` before trying protected endpoints.
  version: dev
servers: []
security: []
tags:
  - name: System
    description: Service health and operational routes.
  - name: Organizations
    description: Top-level organization creation and context routes.
  - name: Invitations
    description: Invitation preview, acceptance, creation, and cancellation routes.
  - name: API Keys
    description: Organization API key management routes.
  - name: SCIM
    description: Organization SCIM connector management routes.
  - name: SSO
    description: Organization single sign-on connector management routes.
  - name: Members
    description: Organization member management routes.
  - name: Roles
    description: Organization custom role management routes.
  - name: Teams
    description: Organization team management routes.
  - name: Templates
    description: Organization shared template routes.
  - name: LLM Providers
    description: Organization LLM provider catalog, configuration, and access routes.
  - name: Skills
    description: Organization skill authoring and sharing routes.
  - name: Skill Hubs
    description: Organization skill hub management and access routes.
  - name: Workers
    description: Worker lifecycle, billing, and runtime routes.
  - name: Worker Runtime
    description: Worker runtime inspection and upgrade routes.
  - name: Worker Activity
    description: Worker heartbeat and activity reporting routes.
  - name: Telemetry
    description: Telemetry event ingestion and adoption analytics.
  - name: Admin
    description: Administrative reporting routes.
  - name: Users
    description: Current user and membership routes.
  - name: Bootstrap
    description: Agent-first provisional workspace setup routes.
paths:
  /v1/diagnostics/egress:
    post:
      tags:
        - Diagnostics
      summary: Run the controlled Den egress diagnostic
      description: >-
        Runs fixed HTTP, redirect, OAuth-shaped, and MCP probes from the Den
        process to the operator-configured public Diagnostics origin.
      operationId: postV1DiagnosticsEgress
      responses:
        '200':
          description: >-
            The completed diagnostic run, including a failed result when a layer
            did not pass.
          content:
            application/json:
              schema:
                type: object
                properties:
                  runId:
                    type: string
                    format: uuid
                    pattern: >-
                      ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                  targetOrigin:
                    type: string
                    format: uri
                  supportUrl:
                    type: string
                    format: uri
                  startedAt:
                    type: string
                  completedAt:
                    type: string
                  overallStatus:
                    type: string
                    enum:
                      - passed
                      - failed
                  highestPassingStep:
                    anyOf:
                      - type: string
                        enum:
                          - reachability
                          - http-methods
                          - redirect
                          - oauth-discovery
                          - oauth-token
                          - mcp-handshake
                      - type: 'null'
                  failedStep:
                    anyOf:
                      - type: string
                        enum:
                          - reachability
                          - http-methods
                          - redirect
                          - oauth-discovery
                          - oauth-token
                          - mcp-handshake
                      - type: 'null'
                  steps:
                    minItems: 6
                    maxItems: 6
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          enum:
                            - reachability
                            - http-methods
                            - redirect
                            - oauth-discovery
                            - oauth-token
                            - mcp-handshake
                        label:
                          type: string
                          minLength: 1
                          maxLength: 120
                        category:
                          type: string
                          enum:
                            - connectivity
                            - http
                            - oauth
                            - mcp
                        status:
                          type: string
                          enum:
                            - passed
                            - failed
                            - skipped
                        startedAt:
                          type: string
                        completedAt:
                          type: string
                        durationMs:
                          type: integer
                          minimum: 0
                          maximum: 9007199254740991
                        httpStatuses:
                          maxItems: 16
                          type: array
                          items:
                            type: integer
                            minimum: 100
                            maximum: 599
                        diagnosticIds:
                          maxItems: 16
                          type: array
                          items:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        code:
                          anyOf:
                            - type: string
                              minLength: 1
                              maxLength: 120
                            - type: 'null'
                        message:
                          type: string
                          minLength: 1
                          maxLength: 500
                        owner:
                          type: string
                          enum:
                            - den-operator
                            - network-administrator
                            - openwork-support
                        action:
                          type: string
                          minLength: 1
                          maxLength: 500
                      required:
                        - id
                        - label
                        - category
                        - status
                        - startedAt
                        - completedAt
                        - durationMs
                        - httpStatuses
                        - diagnosticIds
                        - code
                        - message
                        - owner
                        - action
                required:
                  - runId
                  - targetOrigin
                  - supportUrl
                  - startedAt
                  - completedAt
                  - overallStatus
                  - highestPassingStep
                  - failedStep
                  - steps
        '401':
          description: The caller must be signed in.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: Only workspace owners and admins can run egress diagnostics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
        '503':
          description: The Den operator has not configured the Diagnostics target.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    const: egress_diagnostics_not_configured
                  missingConfiguration:
                    maxItems: 2
                    type: array
                    items:
                      type: string
                      enum:
                        - DEN_DIAGNOSTICS_ORIGIN
                        - DEN_DIAGNOSTICS_BEARER_TOKEN
                required:
                  - error
                  - missingConfiguration
components:
  schemas:
    UnauthorizedError:
      type: object
      properties:
        error:
          type: string
          const: unauthorized
      required:
        - error
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          enum:
            - forbidden
            - reauth
        reason:
          type: string
        message:
          type: string
      required:
        - error

````