Endpoint Service

Update an endpoint

PATCH
/projects/{projectId}/endpoints/{id}

Updates mutable endpoint fields such as its endpoint string, visibility, or deployment traffic split. Use updateMask to select fields explicitly and etag in the request body for optimistic concurrency.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

projectId*string

Project identifier.

id*string

Endpoint identifier.

Query Parameters

updateMask?string

Fields to update. If not set, the fields populated are updated.

Request Body

application/json

Mutable endpoint fields for update requests.

name?string

Updated endpoint string.

etag?string

Current endpoint version. The update is rejected if this value no longer matches.

trafficSplit?array<>

Replacement live traffic split. Use an empty list to stop routing live traffic.

visibility?string

Who can discover the endpoint. VISIBILITY_PRIVATE restricts it to the project; VISIBILITY_INTERNAL shares it with the organization.

Default"VISIBILITY_PRIVATE"

Value in

  • "VISIBILITY_PRIVATE"
  • "VISIBILITY_INTERNAL"

Response Body

application/json

application/json

curl -X PATCH "https://example.com/projects/string/endpoints/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "string",  "projectId": "string",  "name": "string",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z",  "etag": "string",  "trafficSplit": [    {      "deploymentId": "string",      "weight": 0    }  ],  "visibility": "VISIBILITY_PRIVATE",  "endpointType": "ENDPOINT_TYPE_DEDICATED",  "deployments": [    {      "id": "string",      "modelId": "string",      "hardware": "string",      "trafficMode": "TRAFFIC_MODE_LIVE",      "state": "DEPLOYMENT_STATE_PROVISIONING",      "name": "string",      "createdAt": "2019-08-24T14:15:22Z",      "autoscaling": {        "minReplicas": 0,        "maxReplicas": 0,        "scaleDownWindow": "string",        "scaleUpWindow": "string",        "scaleToZeroWindow": "string",        "scalingMetrics": [          {            "name": "active_sessions",            "type": "METRIC_TARGET_TYPE_VALUE",            "target": 0,            "percentile": "string"          }        ],        "scaleUp": {          "policies": [            {              "type": "SCALING_POLICY_TYPE_PODS",              "value": 1,              "periodSeconds": 1            }          ],          "selectPolicy": "SCALING_POLICY_SELECT_MAX"        },        "scaleDown": {          "policies": [            {              "type": "SCALING_POLICY_TYPE_PODS",              "value": 1,              "periodSeconds": 1            }          ],          "selectPolicy": "SCALING_POLICY_SELECT_MAX"        }      },      "desiredReplicas": 0,      "readyReplicas": 0,      "model": "string",      "estimatedEffectiveTrafficShare": 0.1    }  ],  "activeRolloutId": "string"}