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

# Export a policy as YAML file



## OpenAPI

````yaml get /organization/{organizationId}/policies/{policyId}/yaml
openapi: 3.0.0
info:
  title: Cybedefend API
  description: >-
    CybeDefend is an advanced API for application security analysis. Key
    features include OAuth 2.0 authentication, user/organization/project
    management, and REBAC-based permissions. It excels in static, dynamic, and
    IaC security analyses (SAST, DAST, IaC, etc.).
  version: '1.0'
  contact: {}
servers:
  - url: https://api-eu.cybedefend.com
    description: EU
  - url: https://api-us.cybedefend.com
    description: US
security: []
tags: []
paths:
  /organization/{organizationId}/policies/{policyId}/yaml:
    get:
      tags:
        - Policy
      summary: Export a policy as YAML file
      operationId: PolicyController_exportPolicyYaml
      parameters:
        - name: organizationId
          required: true
          in: path
          schema:
            format: uuid
            type: string
        - name: policyId
          required: true
          in: path
          schema:
            format: uuid
            type: string
      responses:
        '200':
          description: Policy YAML content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExportPolicyYamlResponseDto'
      security:
        - bearer: []
components:
  schemas:
    ExportPolicyYamlResponseDto:
      type: object
      properties:
        yamlContent:
          type: string
          description: YAML content of the policy
          example: |-
            # Security Policy: Production SAST Rules
            version: "1.0"
            rules:
              - id: block-critical
                type: severity
                operator: equals
                value: critical
                action: block
      required:
        - yamlContent
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: JWT access token.

````