post:
  x-eov-operation-id: generateAudit
  x-eov-operation-handler: v1/handlers/audit/audit.handler
  tags:
    - Audit
  summary: Generate an audit
  description: Generate a security audit for your n8n instance.
  requestBody:
    required: false
    content:
      application/json:
        schema:
          type: object
          properties:
            additionalOptions:
              type: object
              properties:
                daysAbandonedWorkflow:
                  type: integer
                  description: Days for a workflow to be considered abandoned if not executed
                categories:
                  type: array
                  items:
                    type: string
                    enum: ['credentials', 'database', 'nodes', 'filesystem', 'instance']
  responses:
    '200':
      description: Operation successful.
      content:
        application/json:
          schema:
            $ref: '../schemas/audit.yml'
    '401':
      $ref: '../../../../shared/spec/responses/unauthorized.yml'
    '500':
      description: Internal server error.
