Update Model API
Updates a Model API.
curl --request PUT \
--url https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId} \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"description": "<string>",
"environmentId": "<string>",
"name": "<string>",
"replicas": 123,
"hardwareTierId": "<string>",
"resourceQuotaId": "<string>"
}
'import requests
url = "https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}"
payload = {
"description": "<string>",
"environmentId": "<string>",
"name": "<string>",
"replicas": 123,
"hardwareTierId": "<string>",
"resourceQuotaId": "<string>"
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
environmentId: '<string>',
name: '<string>',
replicas: 123,
hardwareTierId: '<string>',
resourceQuotaId: '<string>'
})
};
fetch('https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'environmentId' => '<string>',
'name' => '<string>',
'replicas' => 123,
'hardwareTierId' => '<string>',
'resourceQuotaId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"name\": \"<string>\",\n \"replicas\": 123,\n \"hardwareTierId\": \"<string>\",\n \"resourceQuotaId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"name\": \"<string>\",\n \"replicas\": 123,\n \"hardwareTierId\": \"<string>\",\n \"resourceQuotaId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"name\": \"<string>\",\n \"replicas\": 123,\n \"hardwareTierId\": \"<string>\",\n \"resourceQuotaId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"access": {
"accessTokens": [
{
"created": 123,
"createdBy": "<string>",
"id": "<string>",
"lastGenerated": 123,
"lastGeneratedBy": "<string>",
"name": "<string>"
}
],
"isPublic": true
},
"collaborators": [
{
"collaborator": "<string>",
"role": "<string>"
}
],
"description": "<string>",
"environmentId": "<string>",
"healthCheck": {
"failureThreshold": 123,
"initialDelaySeconds": 123,
"periodSeconds": 123,
"timeoutSeconds": 123
},
"id": "<string>",
"isArchived": true,
"isAsync": true,
"metadata": {
"created": 123,
"createdBy": "<string>",
"lastModified": 123
},
"name": "<string>",
"replicas": 123,
"routingMode": "<string>",
"strictNodeAntiAffinity": true,
"volumes": [
{
"mountPath": "<string>",
"name": "<string>",
"readOnly": true,
"volumeType": "<string>"
}
],
"activeVersion": {
"dataPlaneId": "<string>",
"id": "<string>",
"deployment": {
"isPending": true,
"status": "<string>"
},
"number": 123
},
"bundleId": "<string>",
"hardwareTierId": "<string>",
"overrideRequestTimeoutSecs": 123,
"resourceQuotaId": "<string>"
}Authorizations
Path Parameters
The id of the Model API to update.
Body
The new description for the Model API.
The id of the new environment to deploy the Model API with.
The new name for the Model API.
The new number of replicas of the Model API.
The id of the new hardware tier to deploy the Model API with.
The id of the new resource quota to deploy the Model API with.
Response
The updated Model API.
Show child attributes
Show child attributes
The collaborators of the Model API.
Show child attributes
Show child attributes
The description of the Model API.
The id of the environment the Model API is deployed to.
Show child attributes
Show child attributes
The id of the Model API.
Whether the Model API is archived.
Whether the Model API is async.
Show child attributes
Show child attributes
The name of the Model API.
The number of replicas of the Model API.
The routing mode of the Model API.
Whether the Model API has strict node anti affinity.
The volumes of the Model API.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The ID of the bundle governing the model API to create.
^[0-9a-f]{24}$The id of the hardware tier the Model API is deployed with.
The request timeout configuration of the Model API.
The id of the resource quota the Model API is deployed with.
Was this page helpful?
curl --request PUT \
--url https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId} \
--header 'Content-Type: application/json' \
--header 'X-Domino-Api-Key: <api-key>' \
--data '
{
"description": "<string>",
"environmentId": "<string>",
"name": "<string>",
"replicas": 123,
"hardwareTierId": "<string>",
"resourceQuotaId": "<string>"
}
'import requests
url = "https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}"
payload = {
"description": "<string>",
"environmentId": "<string>",
"name": "<string>",
"replicas": 123,
"hardwareTierId": "<string>",
"resourceQuotaId": "<string>"
}
headers = {
"X-Domino-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Domino-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
environmentId: '<string>',
name: '<string>',
replicas: 123,
hardwareTierId: '<string>',
resourceQuotaId: '<string>'
})
};
fetch('https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'environmentId' => '<string>',
'name' => '<string>',
'replicas' => 123,
'hardwareTierId' => '<string>',
'resourceQuotaId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Domino-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"name\": \"<string>\",\n \"replicas\": 123,\n \"hardwareTierId\": \"<string>\",\n \"resourceQuotaId\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Domino-Api-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}")
.header("X-Domino-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"name\": \"<string>\",\n \"replicas\": 123,\n \"hardwareTierId\": \"<string>\",\n \"resourceQuotaId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://mycluster.domino.tech/api/modelServing/v1/modelApis/{modelApiId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Domino-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"name\": \"<string>\",\n \"replicas\": 123,\n \"hardwareTierId\": \"<string>\",\n \"resourceQuotaId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"access": {
"accessTokens": [
{
"created": 123,
"createdBy": "<string>",
"id": "<string>",
"lastGenerated": 123,
"lastGeneratedBy": "<string>",
"name": "<string>"
}
],
"isPublic": true
},
"collaborators": [
{
"collaborator": "<string>",
"role": "<string>"
}
],
"description": "<string>",
"environmentId": "<string>",
"healthCheck": {
"failureThreshold": 123,
"initialDelaySeconds": 123,
"periodSeconds": 123,
"timeoutSeconds": 123
},
"id": "<string>",
"isArchived": true,
"isAsync": true,
"metadata": {
"created": 123,
"createdBy": "<string>",
"lastModified": 123
},
"name": "<string>",
"replicas": 123,
"routingMode": "<string>",
"strictNodeAntiAffinity": true,
"volumes": [
{
"mountPath": "<string>",
"name": "<string>",
"readOnly": true,
"volumeType": "<string>"
}
],
"activeVersion": {
"dataPlaneId": "<string>",
"id": "<string>",
"deployment": {
"isPending": true,
"status": "<string>"
},
"number": 123
},
"bundleId": "<string>",
"hardwareTierId": "<string>",
"overrideRequestTimeoutSecs": 123,
"resourceQuotaId": "<string>"
}