v27

latestOpenAPI 3.0.3Apache 2.0raw.githubusercontent.com2026-08-01304498.9 KB
subscriptions

Update an existing subscription

Updates an existing MaaSSubscription and its associated MaaSAuthPolicy. K8s calls: PUT /k8s/v1/maassubscription/:name, PUT /k8s/v1/maasauthpolicy/:name

put/api/v1/update-subscription/{name}

Path parameters

namestring required

Name of the MaaSSubscription to update

Request body

displayNamestring

Updated display name for the subscription

descriptionstring

Updated description for the subscription

priorityinteger

Updated subscription priority

Example request

{
  "displayName": "Premium Team Subscription",
  "description": "This subscription is for the premium team",
  "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"
  }
}

Response

Subscription and auth policy updated successfully

Example response

{
  "subscription": {
    "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"
    }
  },
  "authPolicy": {
    "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"
    }
  }
}