Skip to content

Update an ExternalModel

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

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

Authorization

Parameters

Name In Type Required Description
namespace path string Yes
name path string Yes

Request body

Required.

Content type: application/json

Schema: UpdateExternalModelRequest

Example:

{
  "displayName": "string",
  "description": "string",
  "modelName": "string",
  "providerRefs": [
    {
      "providerName": "string",
      "weight": 0,
      "apiFormat": "string",
      "path": "string",
      "targetModel": "string",
      "config": {
        "key": "string"
      },
      "authMechanism": "apikey",
      "credentialSecretRef": "string",
      "provider": {
        "displayName": "string",
        "description": "string",
        "endpointUrl": "string",
        "authMechanism": "apikey",
        "credentialSecretRef": "string",
        "provider": "string",
        "config": {
          "key": "string"
        },
        "phase": "string",
        "statusMessage": "string",
        "reason": "Reconciled"
      }
    }
  ]
}

Responses

Status Description Response body
200 OK

ExternalModel updated

None

Example request

curl -X PUT "/maas/api/v1/externalmodel/{namespace}/{name}" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "displayName": "string",
  "description": "string",
  "modelName": "string",
  "providerRefs": [
    {
      "providerName": "string",
      "weight": 0,
      "apiFormat": "string",
      "path": "string",
      "targetModel": "string",
      "config": {
        "key": "string"
      },
      "authMechanism": "apikey",
      "credentialSecretRef": "string",
      "provider": {
        "displayName": "string",
        "description": "string",
        "endpointUrl": "string",
        "authMechanism": "apikey",
        "credentialSecretRef": "string",
        "provider": "string",
        "config": {
          "key": "string"
        },
        "phase": "string",
        "statusMessage": "string",
        "reason": "Reconciled"
      }
    }
  ]
}'