> ## Documentation Index
> Fetch the complete documentation index at: https://ravion-b90c0359-devin-1788408180-cross-module-output-refs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get ModuleInstance by id

> Retrieve a single deployed module instance by ID. Returns its full configuration and current state. GET /module-instances/{id} in the Ravion API reference.



## OpenAPI

````yaml https://api.ravion.com/openapi.yaml get /module-instances/{id}
openapi: 3.0.0
info:
  title: Ravion
  version: 0.0.0
servers:
  - url: https://api.ravion.com
security:
  - BearerAuth: []
tags:
  - name: Projects
  - name: Environments
  - name: FeatureFlags
  - name: Pipelines
  - name: PipelineRuns
  - name: TerraformResources
  - name: TerraformExecutionSummaries
  - name: PipelineStepExecutions
  - name: AwsCloudWatch
  - name: PipelineVersions
  - name: Organizations
  - name: Stacks
  - name: StackWorkspaces
  - name: Auth
  - name: OAuth
  - name: User
  - name: Health
  - name: Memberships
  - name: ServiceAccounts
  - name: AwsDefaultNetworks
  - name: AwsAccounts
  - name: ApiKeys
  - name: AwsAmp
  - name: EksPrometheus
  - name: EksLoki
  - name: ExecutionEnvironments
  - name: ModuleDefinitions
  - name: ModuleCategories
  - name: ModuleVersions
  - name: ModuleInstances
  - name: DefaultValueDefinitions
  - name: DefaultValues
  - name: CodeSources
  - name: Github
  - name: Gitlab
  - name: Git
  - name: Values
  - name: Deployments
  - name: DeploymentResources
  - name: InfrastructureEvents
  - name: WebSocket
  - name: Domains
  - name: AcmCertificates
  - name: Describe
  - name: Reports
  - name: BillingPlans
  - name: BillingAccounts
  - name: BillingCycles
  - name: BillingUsageSummaries
  - name: BillingAddOns
  - name: BillingInvoices
paths:
  /module-instances/{id}:
    get:
      tags:
        - ModuleInstances
      summary: Get ModuleInstance by id
      description: >-
        Retrieve a single deployed module instance by ID. Returns its full
        configuration and current state.
      operationId: GetModuleInstance
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    $ref: '#/components/schemas/ModuleInstance'
                required:
                  - data
                type: object
          description: The request has succeeded.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: The request is invalid or malformed.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: You are not authenticated
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: You do not have permission to access this resource.
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: The server cannot find the requested resource.
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: Server error
components:
  schemas:
    ModuleInstance:
      additionalProperties: false
      properties:
        createdAt:
          allOf:
            - $ref: '#/components/schemas/UtcDateTime'
          readOnly: true
        description:
          description: Optional description of the module instance.
          maxLength: 1000
          type: string
        environmentId:
          description: Environment ID where this instance is deployed
          minLength: 1
          type: string
        error:
          allOf:
            - $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: >-
            Structured error from the last failed delete; set only when status
            is ERROR_DELETING (read-only).
          readOnly: true
        givenId:
          allOf:
            - $ref: '#/components/schemas/GivenId'
          description: User-provided unique identifier. Must be unique within environment.
          maxLength: 255
          minLength: 1
        id:
          readOnly: true
          type: string
        input:
          additionalProperties:
            nullable: true
          description: Configuration input object for the module instance
          type: object
        moduleDefinitionId:
          description: Module definition ID
          minLength: 1
          type: string
        moduleVersionId:
          description: Module version ID for the current configuration
          minLength: 1
          type: string
        name:
          description: User-provided instance name.
          maxLength: 255
          minLength: 1
          type: string
        organizationId:
          readOnly: true
          type: string
        projectId:
          description: Project ID this instance belongs to.
          readOnly: true
          type: string
        stackId:
          description: Stack ID for the associated Terraform/OpenTofu stack
          readOnly: true
          type: string
        status:
          allOf:
            - $ref: '#/components/schemas/ModuleInstance.Status'
          description: Lifecycle status (read-only).
          readOnly: true
        type:
          description: >-
            Module type identifier, copied from the module definition at
            creation time.
          readOnly: true
          type: string
        ui:
          allOf:
            - $ref: '#/components/schemas/ModuleInstance.ResolvedModuleUI'
          description: >-
            Module UI configuration with template expressions resolved.
            Populated

            server-side at write time (create/patch + after every stack apply

            alongside `Stack.output`). Every field is optional and nullable
            because

            a freshly-created module instance has no stack output yet — fields
            that

            reference `<< stack.output.* >>` stay null until the first apply.
          readOnly: true
        updatedAt:
          allOf:
            - $ref: '#/components/schemas/UtcDateTime'
          readOnly: true
      required:
        - id
        - createdAt
        - updatedAt
        - organizationId
        - name
        - givenId
        - type
        - moduleDefinitionId
        - moduleVersionId
        - environmentId
        - projectId
        - status
        - input
      type: object
    Errors.UserFacingErrorData:
      additionalProperties: false
      description: |-
        User-facing error presentation data.
        This is what the API returns to the frontend after formatting ErrorData
        using CEL templates from the error registry.

        Used for both:
        - Error fields on domain models (e.g., PipelineRun.error)
        - API error response bodies (HTTP 4xx/5xx responses)
      properties:
        action:
          allOf:
            - $ref: '#/components/schemas/Errors.Action'
          description: Optional action to help resolve the error
        code:
          description: Full error code, e.g., "Ravion:Pipeline:NOT_FOUND"
          type: string
        description:
          description: Additional description with more details
          type: string
        details:
          description: Structured details rendered as user-facing sections.
          items:
            $ref: '#/components/schemas/Errors.UserFacingErrorDetailSection'
          type: array
        isInternal:
          description: >-
            Indicates whether this error is internal (only set when
            ShowInternal=true).

            This allows SUPERADMINs to identify internal errors while viewing
            full details.
          type: boolean
        message:
          description: Main error message (required)
          type: string
        metadata:
          additionalProperties: {}
          description: >-
            Error params/metadata. Stripped for internal errors unless
            superadmin.
          type: object
        requestId:
          description: Request ID for correlating errors with server logs.
          type: string
      required:
        - code
        - message
      type: object
    UtcDateTime:
      description: UTC RFC3339 timestamp with a required Z suffix
      format: date-time
      pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,9})?Z$
      type: string
      x-go-type: apitypes.UTCDateTime
      x-go-type-import:
        name: apitypes
        path: ravion/api-go/pkg/apitypes
    GivenId:
      description: User-provided identifier pattern used by all givenId fields
      maxLength: 60
      pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]*$
      type: string
    ModuleInstance.Status:
      description: >-
        Module instance lifecycle status. DELETING while a delete workflow runs,
        ERROR_DELETING if it fails.
      enum:
        - ACTIVE
        - DELETING
        - ERROR_DELETING
        - DELETED
      type: string
    ModuleInstance.ResolvedModuleUI:
      additionalProperties: false
      description: |-
        Resolved module UI configuration. Mirrors `Module.ModuleUI` but with all
        fields optional and nullable: the resolver writes this column at create
        time (before stack apply) and after every successful stack apply, and
        any field that depends on stack output stays null between create and the
        first apply.
      properties:
        links:
          items:
            $ref: '#/components/schemas/ModuleInstance.ResolvedUILink'
          nullable: true
          type: array
        logs:
          items:
            $ref: '#/components/schemas/ModuleInstance.ResolvedUILog'
          nullable: true
          type: array
        metrics:
          items:
            $ref: '#/components/schemas/ModuleInstance.ResolvedUIMetric'
          nullable: true
          type: array
      type: object
    Errors.Action:
      additionalProperties: false
      description: Action to help user resolve the error
      properties:
        label:
          description: Button/link label text
          type: string
        url:
          description: URL to navigate to for resolution
          type: string
      required:
        - label
        - url
      type: object
    Errors.UserFacingErrorDetailSection:
      additionalProperties: false
      description: Structured user-facing error detail section.
      properties:
        items:
          description: List of detail values for this section.
          items:
            type: string
          type: array
        object:
          additionalProperties: {}
          description: Structured detail payload for object rendering.
          type: object
        render:
          description: Rendering hint for clients. Valid values are list or object.
          type: string
        title:
          description: Detail section title shown in the UI.
          type: string
      required:
        - title
        - render
      type: object
    ModuleInstance.ResolvedUILink:
      additionalProperties: false
      description: |-
        Resolved UI link. All fields optional and nullable because the resolver
        leaves stack-output-dependent fields unresolved until a successful stack
        apply re-resolves them.
      properties:
        href:
          nullable: true
          type: string
        name:
          nullable: true
          type: string
      type: object
    ModuleInstance.ResolvedUILog:
      additionalProperties: false
      description: >-
        Resolved UI log. All fields optional and nullable so a log source can be

        displayed only after its source has concrete stack outputs.
        Discriminated

        on `source.type`: `cloudwatch` for ECS and EC2, `eks_loki` for EKS.
      properties:
        enabled:
          nullable: true
          type: boolean
        id:
          nullable: true
          type: string
        name:
          nullable: true
          type: string
        source:
          allOf:
            - $ref: '#/components/schemas/ModuleInstance.ResolvedLogSource'
          nullable: true
      type: object
    ModuleInstance.ResolvedUIMetric:
      additionalProperties: false
      description: |-
        Resolved UI metric. All fields optional and nullable so a metric can be
        displayed even when its source still points at unresolved stack outputs.
      properties:
        enabled:
          nullable: true
          type: boolean
        id:
          nullable: true
          type: string
        name:
          nullable: true
          type: string
        source:
          allOf:
            - $ref: '#/components/schemas/ModuleInstance.ResolvedMetricSource'
          nullable: true
        type:
          allOf:
            - $ref: '#/components/schemas/Module.MetricType'
          nullable: true
      type: object
    ModuleInstance.ResolvedLogSource:
      oneOf:
        - $ref: '#/components/schemas/ModuleInstance.ResolvedCloudWatchLogSource'
        - $ref: '#/components/schemas/ModuleInstance.ResolvedEksLokiLogSource'
        - $ref: '#/components/schemas/ModuleInstance.ResolvedExternalLogSource'
    ModuleInstance.ResolvedMetricSource:
      oneOf:
        - $ref: '#/components/schemas/ModuleInstance.ResolvedCloudWatchMetricSource'
        - $ref: '#/components/schemas/ModuleInstance.ResolvedAmpMetricSource'
        - $ref: >-
            #/components/schemas/ModuleInstance.ResolvedEksPrometheusMetricSource
        - $ref: '#/components/schemas/ModuleInstance.ResolvedLinkMetricSource'
    Module.MetricType:
      description: Allowed metric chart types.
      enum:
        - line
        - bar
        - link
      type: string
    ModuleInstance.ResolvedCloudWatchLogSource:
      additionalProperties: false
      description: |-
        Resolved CloudWatch log source. All fields optional and nullable —
        stack-output-dependent fields stay null until a successful stack apply
        triggers re-resolution.
      properties:
        aws_account_id:
          nullable: true
          type: string
        filter_pattern:
          nullable: true
          type: string
        log_group:
          nullable: true
          type: string
        log_stream_prefix:
          nullable: true
          type: string
        region:
          nullable: true
          type: string
        type:
          enum:
            - cloudwatch
          nullable: true
          type: string
      type: object
    ModuleInstance.ResolvedEksLokiLogSource:
      additionalProperties: false
      description: >-
        Resolved Loki log source — the EKS path. All fields optional and
        nullable

        for the same reason the CloudWatch mirror's are: a module whose
        observability

        addons stack has not applied yet resolves `cluster_arn` to null, and the
        UI

        must be able to say "not ready" rather than fail to parse.
      properties:
        auth_secret:
          nullable: true
          type: string
        cluster_arn:
          nullable: true
          type: string
        endpoint:
          nullable: true
          type: string
        selector:
          nullable: true
          type: string
        type:
          enum:
            - eks_loki
          nullable: true
          type: string
      type: object
    ModuleInstance.ResolvedExternalLogSource:
      additionalProperties: false
      description: >-
        Resolved external log destination — a vendor Ravion ships to but cannot

        query. Optional and nullable like its siblings: the href is built from
        the

        add-ons stack's outputs, so it is null until that stack has applied, and

        the tab must render "not ready" rather than a dead link.
      properties:
        href:
          nullable: true
          type: string
        provider:
          nullable: true
          type: string
        type:
          enum:
            - external
          nullable: true
          type: string
      type: object
    ModuleInstance.ResolvedCloudWatchMetricSource:
      additionalProperties: false
      description: |-
        Resolved CloudWatch metric source. All fields optional and nullable —
        stack-output-dependent fields stay null until a successful stack apply
        triggers re-resolution.
      properties:
        aws_account_id:
          nullable: true
          type: string
        dimensions:
          additionalProperties:
            nullable: true
            type: string
          nullable: true
          type: object
        name:
          nullable: true
          type: string
        namespace:
          nullable: true
          type: string
        region:
          nullable: true
          type: string
        statistic:
          nullable: true
          type: string
        type:
          enum:
            - cloudwatch
          nullable: true
          type: string
      type: object
    ModuleInstance.ResolvedAmpMetricSource:
      additionalProperties: false
      description: >-
        Resolved Amazon Managed Prometheus metric source. All fields optional
        and

        nullable — stack-output-dependent fields stay null until a successful

        stack apply triggers re-resolution.
      properties:
        aws_account_id:
          nullable: true
          type: string
        legend_format:
          nullable: true
          type: string
        query:
          nullable: true
          type: string
        region:
          nullable: true
          type: string
        type:
          enum:
            - amp
          nullable: true
          type: string
        unit:
          nullable: true
          type: string
        workspace_id:
          nullable: true
          type: string
      type: object
    ModuleInstance.ResolvedEksPrometheusMetricSource:
      additionalProperties: false
      description: |-
        Resolved Prometheus metric source reached through the EKS cluster's
        Operator agent. All fields optional and nullable for the same reason.
      properties:
        auth_secret:
          nullable: true
          type: string
        cluster_arn:
          nullable: true
          type: string
        endpoint:
          nullable: true
          type: string
        legend_format:
          nullable: true
          type: string
        query:
          nullable: true
          type: string
        type:
          enum:
            - eks_prometheus
          nullable: true
          type: string
        unit:
          nullable: true
          type: string
      type: object
    ModuleInstance.ResolvedLinkMetricSource:
      additionalProperties: false
      description: |-
        Resolved vendor deep link for a `type: link` metric entry. Optional and
        nullable: the href is built from the add-ons stack's outputs.
      properties:
        href:
          nullable: true
          type: string
        provider:
          nullable: true
          type: string
        type:
          enum:
            - link
          nullable: true
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      scheme: Bearer
      type: http

````