Create an ExternalModel¶
POST /api/v1/externalmodel
Creates a new ExternalModel and its companion MaaSModelRef.
Authorization¶
Request body¶
Required.
Content type: application/json
Schema: CreateExternalModelRequest
Example:
{
"name": "string",
"namespace": "string",
"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 |
|---|---|---|
201 Created | ExternalModel created | None |
Example request¶
curl -X POST "/maas/api/v1/externalmodel" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"namespace": "string",
"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"
}
}
]
}'