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

# Attach each App's mandatory policies to its governed bundle

> For each App, attaches mandatory policies at their latest version to its governed bundle, creating one if none exists. Per-app outcomes are reported in the 200 body; an unknown App is a per-app 404.



## OpenAPI

````yaml /api-specs/cloud/governance-api.json post /rpc/attach-app-enforced-policies
openapi: 3.0.3
info:
  description: Service responsible for managing Domino Governance feature
  title: Domino Governance API
  contact:
    name: Domino Data Lab
    url: https://tickets.dominodatalab.com/hc/en-us
    email: support@dominodatalab.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://mycluster.domino.tech/api/governance/v1
    description: >-
      Replace 'mycluster.domino.tech' with your Domino cluster hostname. For
      Domino Cloud customers, that is `your-subdomain`.domino.tech (e.g.,
      acme.domino.tech). For self-hosted deployments, it is the hostname you
      reach the Domino UI at.
security: []
paths:
  /rpc/attach-app-enforced-policies:
    post:
      tags:
        - rpc
      summary: Attach each App's mandatory policies to its governed bundle
      description: >-
        For each App, attaches mandatory policies at their latest version to its
        governed bundle, creating one if none exists. Per-app outcomes are
        reported in the 200 body; an unknown App is a per-app 404.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/server.AttachAppEnforcedPoliciesRequest'
        description: App IDs to enforce policies on
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.BulkOperationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.HTTPError'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.HTTPError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/server.HTTPError'
components:
  schemas:
    server.AttachAppEnforcedPoliciesRequest:
      type: object
      required:
        - appIds
      properties:
        appIds:
          type: array
          maxItems: 500
          minItems: 1
          items:
            type: string
    server.BulkOperationResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/server.APIError'
        results:
          type: array
          items:
            $ref: '#/components/schemas/server.OperationResult'
    server.HTTPError:
      type: object
      properties:
        code:
          description: >-
            Code is a stable machine-readable error identifier; absent on most
            errors.
          allOf:
            - $ref: '#/components/schemas/guardrails.ErrorCode'
        message:
          type: string
    server.APIError:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/guardrails.Action'
        code:
          type: string
        details:
          $ref: '#/components/schemas/server.ErrorDetail'
        message:
          type: string
        resource:
          $ref: '#/components/schemas/server.ResourceRequest'
        status:
          type: integer
    server.OperationResult:
      type: object
      properties:
        action:
          $ref: '#/components/schemas/guardrails.Action'
        data: {}
        error:
          $ref: '#/components/schemas/server.APIError'
        resource:
          $ref: '#/components/schemas/server.ResourceRequest'
        status:
          type: integer
    guardrails.ErrorCode:
      type: string
      enum:
        - BUNDLE_REQUIRES_POLICY
      x-enum-varnames:
        - CodeBundleRequiresPolicy
    guardrails.Action:
      type: string
      enum:
        - update
        - deactivate
        - attach enforced policies
      x-enum-varnames:
        - UpdateAction
        - DeactivateAction
        - AttachEnforcedPoliciesAction
    server.ErrorDetail:
      type: object
      properties:
        field:
          type: string
        value:
          type: string
    server.ResourceRequest:
      type: object
      required:
        - ids
        - type
      properties:
        ids:
          $ref: '#/components/schemas/server.ResourceIDsRequest'
        type:
          $ref: '#/components/schemas/guardrails.ResourceType'
    server.ResourceIDsRequest:
      type: object
      properties:
        appID:
          type: string
        bundleID:
          type: string
        policyID:
          type: string
        stageID:
          type: string
    guardrails.ResourceType:
      type: string
      enum:
        - Bundle
        - BundlePolicy
        - BundleStage
      x-enum-varnames:
        - BundleType
        - BundlePolicyType
        - BundleStageType

````

## Related topics

- [Glossary of governance terms](/cloud/platform-capabilities/features/governance/governance-glossary.md)
- [Review and approve bundles](/cloud/platform-capabilities/features/governance/work-with-bundles/review-bundles.md)
- [Define policies](/cloud/platform-capabilities/features/governance/define-governance-policies/index.md)
- [Attachments](/cloud/platform-capabilities/features/governance/work-with-bundles/attachments.md)
