{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daytona-io/json-schema/daytona-io-audit-scenarios-schema.json",
  "title": "AuditScenarios",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daytona-io-audit-api-openapi.yml#/components/schemas/AuditScenarios",
  "properties": {
    "targets": {
      "description": "Supported audit log scenarios grouped by target type. Derived at runtime from the audited routes and system events, sorted by target type.",
      "items": {
        "$ref": "#/$defs/AuditTargetScenario"
      },
      "type": "array"
    }
  },
  "required": [
    "targets"
  ],
  "type": "object",
  "$defs": {
    "AuditTargetScenario": {
      "properties": {
        "targetType": {
          "description": "Resource type the actions apply to. Scenarios that are not scoped to a specific resource type (e.g. leaving an organization) are grouped under \"other\".",
          "enum": [
            "api_key",
            "organization",
            "organization_invitation",
            "organization_role",
            "organization_user",
            "docker_registry",
            "runner",
            "sandbox",
            "snapshot",
            "user",
            "volume",
            "warm_pool",
            "region",
            "secret",
            "other",
            "identity_provider"
          ],
          "type": "string"
        },
        "actions": {
          "description": "Actions that can be audited against this target type, sorted alphabetically.",
          "items": {
            "enum": [
              "create",
              "read",
              "update",
              "delete",
              "login",
              "register",
              "change_password",
              "set_default",
              "update_access",
              "update_quota",
              "create_region_quota",
              "update_region_quota",
              "delete_region_quota",
              "suspend",
              "unsuspend",
              "accept",
              "decline",
              "link_account",
              "unlink_account",
              "accept_privacy_policies",
              "leave_organization",
              "regenerate_key_pair",
              "update_scheduling",
              "update_draining",
              "start",
              "stop",
              "resize",
              "replace_labels",
              "create_backup",
              "update_public_status",
              "rotate_signing_key",
              "set_auto_stop_interval",
              "set_auto_pause_interval",
              "set_ttl",
              "set_auto_archive_interval",
              "set_auto_delete_interval",
              "archive",
              "snapshot",
              "fork",
              "pause",
              "get_port_preview_url",
              "set_general_status",
              "activate",
              "deactivate",
              "update_network_settings",
              "update_secrets",
              "send_webhook_message",
              "initialize_webhooks",
              "update_sandbox_default_limited_network_egress",
              "update_preview_warning",
              "update_sso_enabled",
              "generate_workos_admin_portal_link",
              "update_scim_enabled",
              "update_otel_config",
              "delete_otel_config",
              "update_default_queue_timeout",
              "create_ssh_access",
              "revoke_ssh_access",
              "recover",
              "regenerate_proxy_api_key",
              "regenerate_ssh_gateway_api_key",
              "regenerate_snapshot_manager_credentials",
              "auto_stop",
              "auto_archive",
              "auto_delete",
              "ttl_expire",
              "queue_timeout_expire",
              "spot_evict"
            ],
            "type": "string"
          },
          "type": "array"
        }
      },
      "required": [
        "actions",
        "targetType"
      ],
      "type": "object"
    }
  }
}