{
  "opencollection": "1.0.0",
  "info": {
    "name": "Gray Swan AI Activity Policies API",
    "version": "0.1.0"
  },
  "items": [
    {
      "info": {
        "name": "Policies",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get Policies",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.grayswan.ai/policies",
            "params": [
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Maximum number of policies to return (omit to return all)"
              },
              {
                "name": "offset",
                "value": "",
                "type": "query",
                "description": "Number of policies to skip"
              }
            ]
          },
          "docs": "Get policies for an organization with pagination.\n\nBy default, returns all policies (no limit). Use limit parameter for pagination.\nResponse includes pagination metadata (total, has_more) to detect truncation.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/get-policies)"
        },
        {
          "info": {
            "name": "Create Policy",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.grayswan.ai/policies",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a new policy.\n\nThe policy will be created under the organization associated with the API key.\nRequires admin role.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/create-policy)"
        },
        {
          "info": {
            "name": "Export Policies",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.grayswan.ai/policies/export"
          },
          "docs": "Export all policies for an organization as JSON.\n\nReturns policies in a format suitable for import.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/export-policies)"
        },
        {
          "info": {
            "name": "Get Policy By Id",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.grayswan.ai/policies/:policy_id",
            "params": [
              {
                "name": "policy_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get a policy by ID.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/get-policy-by-id)\n\nRaises:\n    ResourceNotFoundError: If the policy does not exist."
        },
        {
          "info": {
            "name": "Update Policy",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.grayswan.ai/policies/:policy_id",
            "params": [
              {
                "name": "policy_id",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update an existing policy.\n\nOnly provided fields will be updated. Omit fields to leave them unchanged.\nPreset policies cannot be modified.\nRequires admin role.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/update-policy)\n\nRaises:\n    ResourceNotFoundError: If the policy does not exist.\n    PresetPolicyModificationError: If attempting to modify a preset policy.\n    AdminRequiredError: If user is not an admin."
        },
        {
          "info": {
            "name": "Delete Policy",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.grayswan.ai/policies/:policy_id",
            "params": [
              {
                "name": "policy_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Delete a policy.\n\nPreset policies cannot be deleted.\nRequires admin role.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/delete-policy)\n\nRaises:\n    ResourceNotFoundError: If the policy does not exist.\n    PresetPolicyModificationError: If attempting to delete a preset policy.\n    AdminRequiredError: If user is not an admin."
        },
        {
          "info": {
            "name": "Export Policy By Id",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.grayswan.ai/policies/:policy_id/export",
            "params": [
              {
                "name": "policy_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Export a single policy as JSON.\n\nReturns the policy in a format suitable for import.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/export-policy-by-id)\n\nRaises:\n    ResourceNotFoundError: If the policy does not exist."
        },
        {
          "info": {
            "name": "Get Policy Versions",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.grayswan.ai/policies/:policy_id/versions",
            "params": [
              {
                "name": "policy_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get version history for a policy.\n\nReturns a list of all versions (metadata only) ordered by timestamp descending.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/get-policy-versions)\n\nRaises:\n    ResourceNotFoundError: If the policy does not exist."
        },
        {
          "info": {
            "name": "Get Policy At Version",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.grayswan.ai/policies/:policy_id/versions/:version_id",
            "params": [
              {
                "name": "policy_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "version_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get the reconstructed policy state at a specific version.\n\nThe policy state is reconstructed by applying version diffs in reverse.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/get-policy-at-version)\n\nRaises:\n    ResourceNotFoundError: If the policy or version does not exist."
        },
        {
          "info": {
            "name": "Import Policy",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.grayswan.ai/policies/import",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Import a single policy from JSON.\n\nIDs from the import are ignored; a new ID will be generated.\nRequires admin role.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/import-policy)"
        },
        {
          "info": {
            "name": "Bulk Import Policies",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.grayswan.ai/policies/bulk-import",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Bulk import multiple policies from JSON.\n\nIDs from the import are ignored; new IDs will be generated for each policy.\nReturns a summary of successful and failed imports.\nRequires admin role.\n\nDocs: [Guide](https://docs.grayswan.ai/policy-management/policies) |\n[API Reference](https://docs.grayswan.ai/api-reference/policies/bulk-import-policies)"
        }
      ]
    }
  ],
  "bundled": true
}