Skip to content

Update a MaaSModelRef

PUT /api/v1/maasmodel/{namespace}/{name}

PUT /maas/api/v1/maasmodel/{namespace}/{name}

Updates an existing MaaSModelRef Kubernetes custom resource. K8s calls: PUT /k8s/v1/maasmodelref/:namespace/:name

Authorization

Parameters

Name In Type Required Description
namespace path string Yes

Namespace of the MaaSModelRef

name path string Yes

Name of the MaaSModelRef to update

Request body

Required.

Content type: application/json

Schema: UpdateMaaSModelRefRequest

Example:

{
  "modelRef": {
    "kind": "LLMInferenceService",
    "name": "granite-3-8b-instruct"
  },
  "endpointOverride": "https://custom-endpoint.example.com"
}

Responses

Status Description Response body
200 OK

MaaSModelRef updated successfully

MaaSModelRefSummary

application/json

400 Bad Request

Bad Request. Invalid update specification.

ErrorResponse

application/json

401 Unauthorized

Unauthorized

None
404 Not Found

MaaSModelRef not found

ErrorResponse

application/json

500 Internal Server Error

Internal Server Error

ErrorResponse

application/json

Example request

curl -X PUT "/maas/api/v1/maasmodel/{namespace}/{name}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "modelRef": {
    "kind": "LLMInferenceService",
    "name": "granite-3-8b-instruct"
  },
  "endpointOverride": "https://custom-endpoint.example.com"
}'

Example response

200 OK, application/json

{
  "name": "granite-3-8b-instruct",
  "namespace": "maas-models",
  "modelRef": {
    "kind": "LLMInferenceService",
    "name": "granite-3-8b-instruct"
  },
  "phase": "Ready",
  "endpoint": "https://custom-endpoint.example.com"
}