Skip to content

Get policy details

GET /api/v1/view-policy/{name}

GET /maas/api/v1/view-policy/{name}

Returns detailed information about a specific policy, including the MaaSAuthPolicy resource and related MaaSModelRef summaries. K8s calls: GET /k8s/v1/maasauthpolicy/:name, GET /k8s/v1/maasmodelref

Authorization

Parameters

Name In Type Required Description
name path string Yes

Name of the MaaSAuthPolicy resource

Responses

Status Description Response body
200 OK

Policy details with related model refs

PolicyInfoResponse

application/json

400 Bad Request

Bad Request. Missing policy name.

ErrorResponse

application/json

401 Unauthorized

Unauthorized

None
404 Not Found

Policy not found

None
500 Internal Server Error

Internal Server Error

ErrorResponse

application/json

Example request

curl -X GET "/maas/api/v1/view-policy/{name}" \
  -H "Authorization: Bearer $TOKEN"

Example response

200 OK, application/json

{
  "policy": {
    "name": "premium-team-policy",
    "namespace": "maas-system",
    "phase": "Active",
    "modelRefs": [
      {
        "name": "llama-2-7b-chat",
        "namespace": "maas-models"
      }
    ],
    "subjects": {
      "groups": [
        {
          "name": "premium-users"
        }
      ]
    }
  },
  "modelRefs": [
    {
      "name": "llama-2-7b-chat",
      "namespace": "maas-models",
      "modelRef": {
        "kind": "LLMInferenceService",
        "name": "llama-2-7b-chat"
      },
      "phase": "Ready",
      "endpoint": "https://llama-2-7b-chat.example.com"
    }
  ]
}