v27

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-01304498.9 KB
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",
      "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",
      "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",
      "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"
      }
    }
  ]
}