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

# Policies auflisten

> Ruft Policies für das Unternehmen des authentifizierten Benutzers ab. Die neuesten Ergebnisse werden zuerst ausgegeben.



## OpenAPI

````yaml /de/api-reference/openapi.json get /policies
openapi: 3.0.0
info:
  title: Corgea API
  version: 1.0.0
  description: >-
    API für die Interaktion mit den Scan- und
    Schwachstellenmanagement-Funktionen von Corgea
servers:
  - url: https://www.corgea.app/api/v1
    description: Produktionsserver
security:
  - CorgeaToken: []
  - BearerAuth: []
paths:
  /policies:
    get:
      tags:
        - Policies
      summary: Policies auflisten
      description: >-
        Ruft Policies für das Unternehmen des authentifizierten Benutzers ab.
        Die neuesten Ergebnisse werden zuerst ausgegeben.
      operationId: listPolicies
      parameters:
        - name: project_id
          in: query
          required: false
          schema:
            type: integer
          description: >-
            Auf Policies filtern, die für ein Projekt gelten. Unternehmensweite
            Policies werden eingeschlossen.
        - name: policy_type
          in: query
          required: false
          schema:
            type: string
          description: Nach einem oder mehreren kommagetrennten Policy-Typen filtern.
          example: false_positive,fix
        - name: active
          in: query
          required: false
          schema:
            type: boolean
          description: Nach Aktivstatus filtern
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
          description: Seitennummer für die Paginierung
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            default: 20
            maximum: 30
          description: Anzahl der Ergebnisse pro Seite
      responses:
        '200':
          description: Policies erfolgreich abgerufen
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyListResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    PolicyListResponse:
      type: object
      properties:
        policies:
          type: array
          items:
            $ref: '#/components/schemas/Policy'
        pagination:
          type: object
          properties:
            total_count:
              type: integer
            total_pages:
              type: integer
            current_page:
              type: integer
            page_size:
              type: integer
    Policy:
      type: object
      properties:
        id:
          type: integer
        policy_type:
          type: string
          enum:
            - BLAST
            - scan
            - false_positive
            - fix
        description:
          type: string
        cwes:
          type: array
          nullable: true
          items:
            type: string
        excludes:
          type: array
          nullable: true
          items:
            type: string
        projects:
          type: array
          nullable: true
          items:
            type: string
          description: >-
            Projektnamen, die den Geltungsbereich der Policy festlegen. Leer
            oder null bedeutet unternehmensweit.
        company:
          type: integer
        active:
          type: boolean
        approved:
          type: boolean
        approved_by:
          type: integer
          nullable: true
        created_at:
          type: string
          format: date-time
        glob_pattern:
          type: string
          nullable: true
        source_type:
          type: string
          example: Web
        repo_policy_file:
          type: integer
          nullable: true
        name:
          type: string
        guidance_text:
          type: string
          nullable: true
        version:
          type: integer
        archived:
          type: boolean
        parent_policy:
          type: integer
          nullable: true
        instruction_type:
          type: string
          enum:
            - overwrite
            - append
        read_only:
          type: boolean
        created_by_corgea:
          type: boolean
  responses:
    BadRequest:
      description: Ungültiger Request
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Invalid JSON body
    Unauthorized:
      description: Ungültiges oder fehlendes Token
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Missing or invalid authorization header
    Forbidden:
      description: Zugriff verweigert oder Feature nicht verfügbar
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Permission denied
    NotFound:
      description: Ressource nicht gefunden
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
                example: Policy not found
  securitySchemes:
    CorgeaToken:
      type: apiKey
      in: header
      name: CORGEA-TOKEN
      description: API-Key für die Authentifizierung
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2-Access-Token (JWT) im Authorization-Header

````