PUT
/
v4
/
serving
/
{model_server_id}
/
backend
import SGPClient from 'sgp';

const client = new SGPClient({
  apiKey: process.env['SGP_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const response = await client.modelServers.updateBackend('model_server_id', {
    new_model_deployment_id: 'new_model_deployment_id',
  });

  console.log(response.account_id);
}

main();
{
  "name": "<string>",
  "model_server_id": "<string>",
  "model_deployment_id": "<string>",
  "account_id": "<string>",
  "alias": "<string>",
  "new_model_deployment_id": "<string>",
  "old_model_deployment_id": "<string>"
}

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string

Path Parameters

model_server_id
string
required

Body

application/json
new_model_deployment_id
string
required

Response

200
application/json
Successful Response

Point the model server to a new model deployment.

Args: old_model_deployment_id(str): The ID of the model deployment to use as the new backend.

name
string
required
model_server_id
string
required
account_id
string
required
new_model_deployment_id
string
required
old_model_deployment_id
string
required
model_deployment_id
string
alias
string