---
title: "List Policies"
method: GET
path: "/policies/list"
tags: ["Policies"]
---

# List Policies

`GET /policies/list`

List all policies from the database. Optionally filter by version_status.

Query params:
- version_status: Optional. One of "draft", "published", "production".
  If omitted, all versions are returned.

Example Request:
```bash
curl -X GET "http://localhost:4000/policies/list" \
    -H "Authorization: Bearer <your_api_key>"
curl -X GET "http://localhost:4000/policies/list?version_status=production" \
    -H "Authorization: Bearer <your_api_key>"
```

Example Response:
```json
{
    "policies": [
        {
            "policy_id": "123e4567-e89b-12d3-a456-426614174000",
            "policy_name": "global-baseline",
            "version_number": 1,
            "version_status": "production",
            "inherit": null,
            "description": "Base guardrails for all requests",
            "guardrails_add": ["pii_masking"],
            "guardrails_remove": [],
            "condition": null,
            "created_at": "2024-01-01T00:00:00Z",
            "updated_at": "2024-01-01T00:00:00Z"
        }
    ],
    "total_count": 1
}
```

## Query parameters

- `version_status` string, nullable

## Response `200`

Successful Response

- PolicyListDBResponse — Response for listing policies from the database.
  - `policies` PolicyDBResponse[] — List of policies.
    - `policy_id` string, required — Unique ID of the policy.
    - `policy_name` string, required — Name of the policy.
    - `version_number` integer — Version number of this policy.
    - `version_status` string — One of: draft, published, production.
    - `parent_version_id` string, nullable — Policy ID this version was cloned from.
    - `is_latest` boolean — True if this is the latest version by version_number.
    - `published_at` string, date-time, nullable — When this version was published.
    - `production_at` string, date-time, nullable — When this version was promoted to production.
    - `inherit` string, nullable — Parent policy name.
    - `description` string, nullable — Policy description.
    - `guardrails_add` string[] — Guardrails to add.
    - `guardrails_remove` string[] — Guardrails to remove.
    - `condition` object, nullable — Policy condition.
    - `pipeline` object, nullable — Optional guardrail pipeline.
    - `created_at` string, date-time, nullable — When the policy was created.
    - `updated_at` string, date-time, nullable — When the policy was last updated.
    - `created_by` string, nullable — Who created the policy.
    - `updated_by` string, nullable — Who last updated the policy.
  - `total_count` integer — Total number of policies.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/sea-lion/apis/litellm-api.md) · [All operations](https://skmtc.net/sea-lion/apis/litellm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sea-lion/litellm-api/revisions/79928a3d37d3/schema)
