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

# Update project modules config

> Updates project module configuration for explicitly selected environments, or every environment when the selector is omitted. The operation validates and plans module create, update, unchanged, and destroy actions before updating project resources and starting required stack runs.



## OpenAPI

````yaml https://api.ravion.com/openapi.yaml post /projects/{id}/config
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: 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: ExecutionEnvironments
  - name: ModuleDefinitions
  - 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: Describe
paths:
  /projects/{id}/config:
    post:
      tags:
        - Projects
      summary: Update project modules config
      description: >-
        Updates project module configuration for explicitly selected
        environments, or every environment when the selector is omitted. The
        operation validates and plans module create, update, unchanged, and
        destroy actions before updating project resources and starting required
        stack runs.
      operationId: ApplyProjectConfig
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              additionalProperties: false
              properties:
                data:
                  $ref: '#/components/schemas/Project.ApplyProjectConfigRequest'
              required:
                - data
              type: object
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                additionalProperties: false
                properties:
                  data:
                    $ref: '#/components/schemas/Project.ApplyProjectConfigResponse'
                required:
                  - data
                type: object
          description: >-
            The request has been accepted for processing, but processing has not
            yet completed.
        '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.
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: The request conflicts with the current state of the server.
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: Client error
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Errors.UserFacingErrorData'
          description: Server error
components:
  schemas:
    Project.ApplyProjectConfigRequest:
      additionalProperties: false
      description: >-
        Request body for applying project configuration to selected
        environments.
      properties:
        autoapprove:
          description: Pass autoapprove=true to supported stack change pipeline runs.
          type: boolean
        dryRun:
          description: >-
            Validate and return the planned changes without updating metadata or
            starting execution.
          type: boolean
        environmentSelector:
          allOf:
            - $ref: >-
                #/components/schemas/Project.ApplyProjectConfigEnvironmentSelector
          description: >-
            Explicit target selector. Omit to target every environment in the
            project.
        environments:
          description: Environment configuration blocks to apply.
          items:
            $ref: '#/components/schemas/Project.ApplyProjectConfigEnvironment'
          type: array
        format:
          allOf:
            - $ref: '#/components/schemas/Project.ProjectConfigFormat'
          description: Input format for every environment and module block in this request.
        moduleSelector:
          allOf:
            - $ref: '#/components/schemas/Project.ApplyProjectConfigModuleSelector'
          description: >-
            Explicit module instance target selector. Omit to reconcile every
            module in selected environments.
        project:
          allOf:
            - $ref: '#/components/schemas/Project.ApplyProjectConfigProject'
          description: >-
            Project metadata to update before applying selected environment
            configuration.
        runOrdering:
          allOf:
            - $ref: '#/components/schemas/Project.ProjectConfigRunOrdering'
          description: >-
            Controls whether co-applied module stack runs wait for dependency
            stack runs to succeed.
      required:
        - format
        - environments
      type: object
    Project.ApplyProjectConfigResponse:
      additionalProperties: false
      description: Response body returned after a project config apply request is accepted.
      properties:
        environmentActions:
          items:
            $ref: '#/components/schemas/Project.ApplyProjectConfigEnvironmentAction'
          type: array
        moduleActions:
          items:
            $ref: '#/components/schemas/Project.ApplyProjectConfigModuleResult'
          type: array
        runId:
          type: string
        selectedEnvironments:
          items:
            $ref: '#/components/schemas/Project.ApplyProjectConfigEnvironmentResult'
          type: array
        summary:
          $ref: '#/components/schemas/Project.ApplyProjectConfigSummary'
        workflowId:
          type: string
      required:
        - selectedEnvironments
        - environmentActions
        - summary
        - moduleActions
      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
    Project.ApplyProjectConfigEnvironmentSelector:
      additionalProperties: false
      description: Explicit environment target selector for applying project configuration.
      properties:
        givenIds:
          description: Environment given IDs to include in the apply target set.
          items:
            $ref: '#/components/schemas/GivenId'
          type: array
        ids:
          description: Environment IDs to include in the apply target set.
          items:
            type: string
          type: array
      type: object
    Project.ApplyProjectConfigEnvironment:
      additionalProperties: false
      description: Writable environment block accepted by project config apply.
      properties:
        description:
          type: string
        givenId:
          allOf:
            - $ref: '#/components/schemas/GivenId'
          description: User-provided environment identifier.
        id:
          description: Existing environment ID.
          type: string
        moduleInstances:
          items:
            $ref: '#/components/schemas/Project.ApplyProjectConfigModuleInstance'
          type: array
        name:
          type: string
      required:
        - moduleInstances
      type: object
    Project.ProjectConfigFormat:
      description: >-
        Controls how persisted project configuration is projected in the
        response.
      enum:
        - raw
        - pretty
      type: string
    Project.ApplyProjectConfigModuleSelector:
      additionalProperties: false
      description: >-
        Explicit module instance target selector for applying project
        configuration.
      properties:
        givenIds:
          description: >-
            Module instance given IDs to include within each selected
            environment.
          items:
            $ref: '#/components/schemas/GivenId'
          type: array
        ids:
          description: Module instance IDs to include in the apply target set.
          items:
            type: string
          type: array
      type: object
    Project.ApplyProjectConfigProject:
      additionalProperties: false
      description: Writable project metadata accepted by project config apply.
      properties:
        description:
          type: string
        givenId:
          allOf:
            - $ref: '#/components/schemas/GivenId'
          description: >-
            User-provided project identifier. When provided, it must match the
            project in the route.
        id:
          description: >-
            Existing project ID. When provided, it must match the project in the
            route.
          type: string
        name:
          type: string
      type: object
    Project.ProjectConfigRunOrdering:
      description: >-
        Controls ordering between stack runs spawned by one project config
        apply.
      enum:
        - dependency
        - parallel
      type: string
    Project.ApplyProjectConfigEnvironmentAction:
      additionalProperties: false
      description: Environment action produced by config apply planning.
      properties:
        action:
          enum:
            - create
            - update
            - skipped
          type: string
        givenId:
          $ref: '#/components/schemas/GivenId'
        id:
          type: string
        patch:
          description: JSON Patch-style diff for fields changed on this environment.
          items:
            $ref: '#/components/schemas/JsonPatchOperation'
          type: array
      required:
        - id
        - givenId
        - action
      type: object
    Project.ApplyProjectConfigModuleResult:
      additionalProperties: false
      description: Module action produced by config apply planning or execution.
      properties:
        action:
          enum:
            - create
            - update
            - delete
            - destroy-planned
            - skipped
            - error
          type: string
        environmentGivenId:
          $ref: '#/components/schemas/GivenId'
        environmentId:
          type: string
        message:
          description: >-
            Human-readable explanation for skipped or informational module
            actions.
          type: string
        moduleGivenId:
          $ref: '#/components/schemas/GivenId'
        moduleInstanceId:
          type: string
        patch:
          description: JSON Patch-style diff for fields changed on this module instance.
          items:
            $ref: '#/components/schemas/JsonPatchOperation'
          type: array
        runId:
          type: string
        workflowId:
          type: string
      required:
        - environmentId
        - environmentGivenId
        - action
      type: object
    Project.ApplyProjectConfigEnvironmentResult:
      additionalProperties: false
      description: Environment selected for config apply.
      properties:
        action:
          enum:
            - selected
            - skipped
          type: string
        givenId:
          $ref: '#/components/schemas/GivenId'
        id:
          type: string
      required:
        - id
        - givenId
        - action
      type: object
    Project.ApplyProjectConfigSummary:
      additionalProperties: false
      description: Aggregate action counts for a project config apply request.
      properties:
        created:
          format: int32
          type: integer
        deleted:
          format: int32
          type: integer
        destroyPlanned:
          format: int32
          type: integer
        errors:
          format: int32
          type: integer
        skipped:
          format: int32
          type: integer
        unchanged:
          format: int32
          type: integer
        updated:
          format: int32
          type: integer
      required:
        - created
        - deleted
        - updated
        - unchanged
        - destroyPlanned
        - skipped
        - errors
      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
    GivenId:
      description: User-provided identifier pattern used by all givenId fields
      maxLength: 60
      pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]*$
      type: string
    Project.ApplyProjectConfigModuleInstance:
      additionalProperties: false
      description: Writable module instance shape accepted by project config apply.
      properties:
        description:
          type: string
        givenId:
          allOf:
            - $ref: '#/components/schemas/GivenId'
          description: User-provided unique identifier. Must be unique within environment.
        id:
          description: >-
            Existing module instance ID. Non-empty IDs must resolve to an
            existing module.
          type: string
        input:
          additionalProperties:
            nullable: true
          description: Runtime module configuration input.
          type: object
        moduleDefinitionId:
          description: Module definition ID for raw-format applies.
          type: string
        moduleVersionId:
          description: Module version ID for raw-format applies.
          type: string
        name:
          type: string
        type:
          description: Module type identifier for pretty-format applies.
          type: string
        version:
          description: Semantic module version string for pretty-format applies.
          type: string
      type: object
    JsonPatchOperation:
      additionalProperties: false
      description: >-
        JSON Patch-style operation with an optional previous value for response
        diffs.
      properties:
        from:
          description: Source JSON Pointer path for move and copy operations.
          type: string
        fromValue:
          description: Previous value at path, included by diff responses when available.
          nullable: true
        op:
          enum:
            - add
            - remove
            - replace
            - move
            - copy
            - test
          type: string
        path:
          description: JSON Pointer path for the field being patched.
          type: string
        pathLabel:
          description: Human-readable path label for CLI diff rendering.
          type: string
        value:
          description: New value for add, replace, and test operations.
          nullable: true
      required:
        - op
        - path
      type: object
  securitySchemes:
    BearerAuth:
      scheme: Bearer
      type: http

````