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

# Get a discovery run

> Get one discovery result with its process candidates and evidence limits.



## OpenAPI

````yaml /openapi/v1.yaml get /discovery-runs/{runId}
openapi: 3.1.0
info:
  title: OrgX REST API v1
  version: '1'
  description: >-
    Build accountable work into your product with OrgX REST API v1.


    Create work with one field, attach evidence when it is complete, and keep
    the receipt. Every authenticated request is scoped to the workspace resolved
    from your credential.


    Start with `POST /work`. Human guide:
    https://docs.useorgx.com/docs/api/quickstart
  contact:
    name: OrgX Support
    url: https://useorgx.com/support
    email: support@useorgx.com
  license:
    name: Proprietary
    url: https://useorgx.com/terms
servers:
  - url: https://useorgx.com/api/v1
    description: Production
security: []
tags:
  - name: Work
    description: Create accountable work and complete it with evidence
  - name: Initiatives
    description: Organize related work around an outcome
  - name: Operating processes
    description: Evidence-backed company workflow/process lifecycle
  - name: Operating map
    description: Derived, rebuildable Operating Map projection over the process ledger
  - name: Discovery runs
    description: Wizard and deep-search workflow discovery over connected company sources
  - name: Handoffs
    description: Ledger-backed stage handoffs between operating-process stages
  - name: Events
    description: Replayable, workspace-scoped accepted ledger events
  - name: Projections
    description: Workspace-scoped, rebuildable read projections over OrgX sources
  - name: Episodes
    description: Mission-compatible Episode read adapters
  - name: Receipt validation
    description: Account-free Agent Work Receipt schema discovery and conformance
  - name: Receipt import
    description: Authenticated, workspace-scoped import into the hosted receipt ledger
  - name: Workload diagnosis
    description: >-
      Account-free evaluation of time, agents, systems, authority, and
      accountability boundaries
  - name: Content Studio
    description: >-
      Estimate, showcase, checkout, and payment event operations for Content
      Studio
  - name: Decisions
    description: Raise decisions for human ruling and read their state
  - name: Artifacts
    description: Register produced work against the entity it belongs to
  - name: Launches
    description: Preview and run an initiative launch through its spend gates
  - name: Runs
    description: Control agent runs with pause, resume, cancel, and rollback
  - name: Lifecycle
    description: Pause, resume, retry, or cancel work hierarchy nodes and runs
  - name: Deduplication
    description: Claim durable event fingerprints so duplicate triggers fire once
  - name: Credential
    description: >-
      Resolve the calling credential, the workspaces it reaches, and what it may
      do
  - name: API discovery
    description: Account-free error codes, request schemas, and closed vocabularies for v1
externalDocs:
  description: Human-readable OrgX REST API v1 reference
  url: https://docs.useorgx.com/docs/api/public-api
paths:
  /discovery-runs/{runId}:
    get:
      tags:
        - Discovery runs
      summary: Get a discovery run
      description: >-
        Get one discovery result with its process candidates and evidence
        limits.
      operationId: getDiscoveryRun
      parameters:
        - $ref: '#/components/parameters/DiscoveryRunId'
        - $ref: '#/components/parameters/WorkspaceIdQuery'
      responses:
        '200':
          description: Discovery result
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscoveryResponse'
              example:
                data:
                  run:
                    schemaVersion: 1.0.0
                    id: a5614527-0ce6-43be-8d1d-d012b7394867
                    workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                    mode: bounded_sync
                    status: queued
                    initiatedBy:
                      type: human
                      id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                    query: launch readiness
                    sourceKinds:
                      - work
                    sourceCursors: {}
                    observationCount: 0
                    candidateProcessCardCount: 0
                    citationCount: 0
                    costMicros: '120000'
                    confidence: 0
                    startedAt: '2026-08-18T18:30:00.000Z'
                    completedAt: '2026-08-18T18:30:00.000Z'
                    sourceHealth:
                      - sourceId: 92340ce0-9843-48dc-8014-d7c21c191b23
                        sourceKind: work
                        status: connected
                        cursor: evt_01J5Y8R4K2
                        lastSuccessfulSyncAt: '2026-08-18T18:30:00.000Z'
                        recordsObserved: 0
                        errorCode: null
                        limitations:
                          - No limitations reported.
                    limitations:
                      - No limitations reported.
                  observations:
                    - schemaVersion: 1.0.0
                      id: a5614527-0ce6-43be-8d1d-d012b7394867
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                      sourceKind: work
                      sourceCursor: evt_01J5Y8R4K2
                      observedAt: '2026-08-18T18:30:00.000Z'
                      capturedAt: '2026-08-18T18:30:00.000Z'
                      kind: work
                      facts: {}
                      evidenceRefs:
                        - {}
                      claimStatus: observed
                      confidence: 0
                      freshnessWatermark: '2026-08-18T18:30:00.000Z'
                      transformationVersion: work-v1
                  processCards:
                    - processCandidateRef:
                        id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                        workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                      displayName: Review the launch plan
                      observedCount: 0
                      confidence: 0
                      automationReadiness: 0
                  confirmedProcessRefs:
                    - id: 2d4b7f66-3a2a-4e9d-9ad1-3b2d1b2e4101
                      workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
                meta:
                  apiVersion: '1'
                  workspaceId: 09707fa5-aaae-4493-8a23-827111000f89
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - bearerAuth: []
        - cookieAuth: []
components:
  parameters:
    DiscoveryRunId:
      name: runId
      in: path
      required: true
      schema:
        type: string
        format: uuid
    WorkspaceIdQuery:
      name: workspace_id
      in: query
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    DiscoveryResponse:
      type: object
      additionalProperties: false
      required:
        - data
        - meta
      properties:
        data:
          $ref: '#/components/schemas/DiscoveryResult'
        meta:
          type: object
          required:
            - apiVersion
            - workspaceId
          properties:
            apiVersion:
              type: string
              const: '1'
            duplicate:
              type: boolean
            workspaceId:
              type: string
              format: uuid
    DiscoveryResult:
      type: object
      additionalProperties: false
      required:
        - run
        - observations
        - processCards
        - confirmedProcessRefs
      properties:
        run:
          $ref: '#/components/schemas/DiscoveryRun'
        observations:
          type: array
          items:
            $ref: '#/components/schemas/DiscoveryObservation'
        processCards:
          type: array
          items:
            $ref: '#/components/schemas/DiscoveryProcessCard'
        confirmedProcessRefs:
          type: array
          items:
            $ref: '#/components/schemas/OperatingProcessRef'
    ApiError:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
            requestId:
              type: string
            timestamp:
              type: string
              format: date-time
            docsUrl:
              type: string
              format: uri
            retryAfter:
              type: integer
              description: Seconds until rate limit resets
    DiscoveryRun:
      type: object
      additionalProperties: false
      required:
        - schemaVersion
        - id
        - workspaceId
        - mode
        - status
        - initiatedBy
        - query
        - sourceKinds
        - sourceCursors
        - observationCount
        - candidateProcessCardCount
        - citationCount
        - costMicros
        - confidence
        - startedAt
        - completedAt
        - sourceHealth
        - limitations
      properties:
        schemaVersion:
          type: string
          const: 1.0.0
        id:
          type: string
          format: uuid
        workspaceId:
          type: string
          format: uuid
        mode:
          type: string
          enum:
            - bounded_sync
            - deep_search
            - reconcile
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - partial
            - failed
            - cancelled
        initiatedBy:
          type: object
          additionalProperties: false
          required:
            - type
            - id
          properties:
            type:
              type: string
              enum:
                - human
                - agent
                - service
                - external_agent
                - system
            id:
              type: string
        query:
          type:
            - string
            - 'null'
        sourceKinds:
          type: array
          items:
            type: string
        sourceCursors:
          type: object
          additionalProperties:
            type: string
        observationCount:
          type: integer
          minimum: 0
        candidateProcessCardCount:
          type: integer
          minimum: 0
        citationCount:
          type: integer
          minimum: 0
        costMicros:
          type: string
          pattern: ^(0|[1-9][0-9]*)$
        confidence:
          type:
            - number
            - 'null'
          minimum: 0
          maximum: 1
        startedAt:
          type: string
          format: date-time
        completedAt:
          type:
            - string
            - 'null'
          format: date-time
        sourceHealth:
          type: array
          items:
            $ref: '#/components/schemas/DiscoverySourceHealth'
        limitations:
          type: array
          items:
            type: string
    DiscoveryObservation:
      type: object
      additionalProperties: true
      required:
        - schemaVersion
        - id
        - workspaceId
        - sourceKind
        - sourceCursor
        - observedAt
        - capturedAt
        - kind
        - facts
        - evidenceRefs
        - claimStatus
        - confidence
        - freshnessWatermark
        - transformationVersion
      properties:
        schemaVersion:
          type: string
          const: 1.0.0
        id:
          type: string
          format: uuid
        workspaceId:
          type: string
          format: uuid
        sourceKind:
          type: string
        sourceCursor:
          type: string
        observedAt:
          type: string
          format: date-time
        capturedAt:
          type: string
          format: date-time
        kind:
          type: string
        facts:
          type: object
        evidenceRefs:
          type: array
          items:
            type: object
        claimStatus:
          type: string
          enum:
            - observed
            - declared
            - disputed
            - reconciled
        confidence:
          type: number
          minimum: 0
          maximum: 1
        freshnessWatermark:
          type: string
          format: date-time
        transformationVersion:
          type: string
    DiscoveryProcessCard:
      type: object
      additionalProperties: true
      required:
        - processCandidateRef
        - displayName
        - observedCount
        - confidence
        - automationReadiness
      properties:
        processCandidateRef:
          $ref: '#/components/schemas/OperatingProcessRef'
        displayName:
          type: string
        observedCount:
          type: integer
          minimum: 0
        confidence:
          type: number
          minimum: 0
          maximum: 1
        automationReadiness:
          type: number
          minimum: 0
          maximum: 1
    OperatingProcessRef:
      type: object
      additionalProperties: false
      required:
        - id
        - workspaceId
      properties:
        id:
          type: string
        workspaceId:
          type: string
          format: uuid
    DiscoverySourceHealth:
      type: object
      additionalProperties: false
      required:
        - sourceId
        - sourceKind
        - status
        - cursor
        - lastSuccessfulSyncAt
        - recordsObserved
        - errorCode
        - limitations
      properties:
        sourceId:
          type: string
          format: uuid
        sourceKind:
          type: string
        status:
          type: string
          enum:
            - connected
            - syncing
            - stale
            - degraded
            - disconnected
            - permission_required
        cursor:
          type:
            - string
            - 'null'
        lastSuccessfulSyncAt:
          type:
            - string
            - 'null'
          format: date-time
        recordsObserved:
          type: integer
          minimum: 0
        errorCode:
          type:
            - string
            - 'null'
        limitations:
          type: array
          items:
            type: string
  responses:
    BadRequest:
      description: Request validation failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    NotFound:
      description: Resource is unavailable to the caller
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
    ServiceUnavailable:
      description: Ledger or workspace authorization is unavailable
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'OrgX API key, sent as `Authorization: Bearer oxk_...`'
    cookieAuth:
      type: apiKey
      in: cookie
      name: __session
      description: Session cookie from web authentication

````