Skip to main content
PATCH
/
computes
/
{id}
/
upsize
Upsize a compute instance
curl --request PATCH \
  --url https://api.strettch.cloud/api/v1/computes/{id}/upsize \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "newSpecificationId": "1076fa22-b49b-4b8f-827e-20f84262916c"
}
'
{
  "message": "Operation successful",
  "requestId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "success": true,
  "timestamp": "2024-01-15T10:00:00Z",
  "data": {
    "id": "325",
    "hostName": "my-server-01",
    "state": "RUNNING",
    "image": "UBUNTU-24.04",
    "specificationId": "1076fa22-b49b-4b8f-827e-20f84262916c",
    "region": "KGL-1",
    "ipv4": "195.15.0.73",
    "privateIpv4": "10.0.0.5",
    "tags": [
      "production",
      "web"
    ],
    "createdAt": "2024-01-15T10:00:00Z",
    "updatedAt": "2024-01-15T10:05:00Z"
  }
}

Response Error Codes

The following table lists the programmatic error codes that this endpoint may return in the code field of the error response.

Standard Category Codes

CodeHTTP StatusDescription
BAD_REQUEST400The request was invalid or malformed.
UNAUTHORIZED401Authentication failed or was not provided.
FORBIDDEN403You do not have permission to perform this action.
RESOURCE_NOT_FOUND404The compute was not found.
CONFLICT409A conflict occurred with the current state of the server.
UNPROCESSABLE_ENTITY422The request was well-formed but was unable to be followed due to semantic errors.
TOO_MANY_REQUESTS429You have exceeded the rate limit.
INTERNAL_SERVER_ERROR500An unexpected error occurred on our end.

Compute Actionable Codes

CodeHTTP StatusDescription
COMPUTE_RUNNING400This action cannot be performed while the compute instance is running. Please stop the instance and try again.

Billing & Team Actionable Codes

CodeHTTP StatusDescription
INSUFFICIENT_BALANCE403Team’s balance is insufficient to perform this action.
TEAM_SUSPENDED403Team has been suspended due to an outstanding payment.
TEAM_PAST_DUE403Team has an outstanding balance that must be paid.
TEAM_TERMINATED403Team has been terminated and can no longer access resources.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Compute ID

Body

application/json
newSpecificationId
string
required
Example:

"1076fa22-b49b-4b8f-827e-20f84262916c"

Response

Accepted

message
string
Example:

"Operation successful"

requestId
string
Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

success
boolean
Example:

true

timestamp
string
Example:

"2024-01-15T10:00:00Z"

data
object