OpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-063044104.9 KB

9112415ceeca

general

Get subscription and policy form data

Returns the data needed to populate subscription and policy creation forms, including available groups, MaaSModelRef resources, existing policies, and existing subscriptions. K8s calls: GET /k8s/v1/groups, GET /k8s/v1/maasmodelref, GET /k8s/v1/maasauthpolicy, GET /k8s/v1/maassubscription

get/api/v1/subscription-policy-form-data

Response

Form data for creating a new policy

groupsstring[] required

Available Kubernetes groups

Example response

{
  "groups": [
    "system:authenticated",
    "premium-users",
    "enterprise-users"
  ],
  "modelRefs": [
    {
      "name": "llama-2-7b-chat",
      "namespace": "maas-models",
      "displayName": "Granite 3 8B Instruct",
      "description": "IBM Granite 3 8B instruction-tuned language model.",
      "modelRef": {
        "kind": "LLMInferenceService",
        "name": "llama-2-7b-chat"
      },
      "phase": "Ready",
      "reason": "Reconciled",
      "status": "True",
      "conditionType": "Ready",
      "lastTransitionTime": "2026-01-01T00:00:00Z",
      "endpoint": "https://llama-2-7b-chat.example.com",
      "modelCapabilities": [
        "text-generation",
        "vision"
      ]
    }
  ],
  "policies": [
    {
      "name": "premium-team-sub-policy",
      "namespace": "maas-system",
      "displayName": "Premium Team Policy",
      "description": "High-priority access policy for the premium team.",
      "phase": "Active",
      "statusMessage": "successfully reconciled",
      "reason": "Reconciled",
      "status": "True",
      "conditionType": "Ready",
      "lastTransitionTime": "2026-01-01T00:00:00Z",
      "creationTimestamp": "2025-03-01T10:00:00Z",
      "modelRefs": [
        {
          "name": "llama-2-7b-chat",
          "namespace": "maas-models"
        }
      ],
      "subjects": {
        "groups": [
          {
            "name": "premium-users"
          }
        ]
      },
      "meteringMetadata": {
        "organizationId": "org-123",
        "costCenter": "engineering"
      }
    }
  ],
  "subscriptions": [
    {
      "name": "premium-team-sub",
      "displayName": "Premium Team Subscription",
      "description": "This subscription is for the premium team",
      "namespace": "maas-system",
      "phase": "Active",
      "statusMessage": "successfully reconciled",
      "reason": "Reconciled",
      "status": "True",
      "conditionType": "Ready",
      "lastTransitionTime": "2026-01-01T00:00:00Z",
      "priority": 10,
      "owner": {
        "groups": [
          {
            "name": "premium-users"
          }
        ]
      },
      "modelRefs": [
        {
          "name": "llama-2-7b-chat",
          "namespace": "maas-models",
          "tokenRateLimits": [
            {
              "limit": 100000,
              "window": "24h"
            }
          ],
          "billingRate": {
            "perToken": "0.0001"
          }
        }
      ],
      "tokenMetadata": {
        "organizationId": "org-123",
        "costCenter": "engineering"
      }
    }
  ]
}