Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
API ReferenceProvidersProvider

Terminate spot workloads on a node

Terminates spot-tier workloads on a node your organization owns, or on reservations it manages there, and returns the VM ids it terminated and left running. A managing org (managingOrgIds) reaches only the released units of the reservations it manages, while each is active and inside its term. Scoped strictly to workloads bought at the spot tier: a spot instance is sold on the explicit contract that the capacity owner can terminate it at any time. Non-spot workloads on the node are never touched. Every termination is audited and the affected VM records capacity reclaim as its reason, so the customer is not told it was a platform fault.

Required permission

Requires the provider.write permission. See Permissions for the roles and API key permissions that include it.

Command line

The orl CLI wraps this endpoint:

orl provider spot-workload reclaim <node-id>
POST
/v1/orgs/{orgId}/provider/nodes/{nodeId}/reclaim-spot

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Path Parameters

orgId*string
nodeId*string

Request Body

application/json
  1. body
unitIds?array<string>

Limit to these units. Omit to target every spot workload on the node.

reason?string

Recorded in the audit trail.

dryRun?boolean

Report what would be terminated, and terminate nothing.

Response Body

OK

application/json
  1. response
terminated*array<string>

VM ids terminated (or, on a dry run, that would be)

skipped?array<string>

VM ids left alone because they are not spot

Example Request
curl -X POST 'https://api.openrelay.inc/v1/orgs/string/provider/nodes/string/reclaim-spot' \  -H 'Content-Type: application/json' \  -d '{}'
Example Response
{  "terminated": [    "string"  ],  "skipped": [    "string"  ]}