---
title: "Update a server"
method: PATCH
path: "/servers/{id}"
tags: ["servers"]
---

# Update a server

`PATCH /servers/{id}`

Update one or more attributes of a server object

## Path parameters

- `id` string, required

## Request body

- ServerPatch — Specifies attributes of a server to update
  - `state` 'leaving' | 'failed' — The state to update the server to. Only servers that are currently in the 'active' state can be updated. Updating a server to the 'leaving' state causes it to leave the cluster as though it were being scaled in. Updating the server to the 'failed' state causes a replacement server to be created for it and the server to be destroyed once a replacement becomes active. If updating a server to 'leaving' would make the cluster smaller than its 'minimum_size' attribute, the operation will fail. Once a 'failed' server is successfully replaced, the server will be destroyed or detached based on the clusters 'failed_server_disposition' attribute.

## Response `200`

The call was successful.

- ClusterServer
  - `public_address` string, required — The public address of the server
  - `active_since` string — An iso8601 formatted timestamp
  - `created` string — An iso8601 formatted timestamp
  - `href` string, required — The endpoint for the server resource
  - `is_failed` boolean — This will be true for a server that has been unreachable for longer than the server failure timeout for its cluster. Once a server has failed, it is not recoverable and will be replaced or destroyed
  - `name` string, required — The name of the server
  - `networks` ServerNetwork[], required
    - `name` string, required — The name of the network.
    - `external_ipv4_address` string, ipv4, required — The external ipv4 address of the cluster server.
    - `ipv4_address` string, ipv4, required — The ipv4 address of the cluster server.
  - `private_address` string — The private address of the server
  - `replacement_for` string — A reference to a server being replaced by this one
  - `server_blueprint` Blueprint — The endpoint resource reference to the blueprint of the servers.
    - `files` MetadataFileEntry[] — A set of files to be made available on servers created with this blueprint.
      - `file` string — A reference to a Webscale file.
      - `path` string — The absolute path where the file is made available on a server made with this blueprint.
    - `identity` IdentityConfiguration — Configuration of the identity assigned to cluster servers.
      - `name` string, required — Name of the identity.
      - `client_id` string, required — Client ID for the identity to be assigned.
      - `principal_id` string, required — Principal ID for the identity to be assigned.
    - `image` string — Resource href that includes the Webscale provider identifier.
    - `instance_template` string — The endpoint resource identifier for the instance template.
    - `instance_type` string — Resource href that includes the Webscale provider identifier.
    - `metadata` MetadataEntry[] — A set of key/value pairs that will be provided to servers created with this blueprint. Server blueprint metadata overrides the cluster metadata on a key-by-key basis.
      - `key` string — A key name.
      - `value` string — A value associated with the given key.
    - `networks` ProviderResourceHref[] — List of network or subnet endpoint resource references to associate the server with. Network availability may be limited to specific zones depending on the cloud provider.
    - `network_tags` string[] — List of network tags to associate with the server. Only applicable for Google provider.
    - `placement` union
      - string — Resource href that includes the Webscale provider identifier.
      - string — The endpoint resource identifier for the server group, must be a URL encoded string. Only valid for CenturyLink provider.
    - `provider` Provider
      - `created` string — An iso8601 formatted timestamp
      - `href` string — Resource identifier for the provider, must be a URL encoded string.
      - `name` string
      - `type` 'aliyun' | 'aws' | 'centurylink' | 'cloudsigma' | 'google' — Type of the cloud provider.
      - `links` ProviderAttributes — Provider attributes that represent cloud provider attributes and may be queried via the API.
    - `security_groups` SecurityGroupHref[] — List of security group endpoint resource references to associate with the server. Only applicable for AWS provider.
    - `storage_account` string — Resource href that includes the Webscale provider identifier.
    - `zone` string — Resource href that includes the Webscale provider identifier.
  - `state` 'creating' | 'joining' | 'active' | 'verifying' | 'leaving' | 'failed' | 'destroying', required — The current state of the server. The state 'creating' indicates that the virtual machine instance is getting created in the cloud but it is not ready to accept connections. The state 'verifying' indicates that the server was created successfully and it is being verified to check if the web service is responding on that server. The state 'joining' indicates that the server verification was successful and the system is being reconfigured so that the server will begin receiving traffic. The state 'active' indicates that the server is either serving the traffic or ready to accept connections. The state 'failed' indicates that the server has been unreachable for longer than the server failure timeout for its cluster and it is not recoverable and will be replaced or destroyed. The state 'leaving' indicates that the server is about to leave the cluster and the system is being reconfigured so that the server will stop receiving the traffic. The state 'destroying' indicates that the server has stopped receiving the traffic and the instance is getting deleted from the cloud
  - `unreachable_since` string — An iso8601 formatted timestamp

---

[API](https://skmtc.dev/webscale/apis/webscale-apis.md) · [All operations](https://skmtc.dev/webscale/apis/webscale-apis/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/webscale/webscale-apis/revisions/c98d872b50cb/schema)
