Skip to content

List all policies

GET /api/v1/all-policies

GET /maas/api/v1/all-policies

Returns all MaaSAuthPolicy resources across the cluster. K8s calls: GET /k8s/v1/maasauthpolicy

Authorization

Responses

Status Description Response body
200 OK

List of policies

object

application/json

401 Unauthorized

Unauthorized

None
500 Internal Server Error

Internal Server Error

ErrorResponse

application/json

200 OK response body

Property Type Required Description
data array of MaaSAuthPolicy No

Example request

curl -X GET "/maas/api/v1/all-policies" \
  -H "Authorization: Bearer $TOKEN"

Example response

200 OK, application/json

{
  "data": [
    {
      "name": "premium-team-policy",
      "namespace": "maas-system",
      "phase": "Active",
      "modelRefs": [
        {
          "name": "llama-2-7b-chat",
          "namespace": "maas-models"
        }
      ],
      "subjects": {
        "groups": [
          {
            "name": "premium-users"
          }
        ]
      }
    }
  ]
}