AI ready
Open in Claude (opens in a new tab)View as Markdown

Long-running actions

Restarts, reinstalls, plan changes and new servers answer an action at once; how to follow one to its final state, and how to read a password once.

Updated 5 November 20262 min read

On this page
  1. An action's states
  2. Follow an action
  3. One-time secrets

Some work takes longer than a request should wait: a restart, a reinstall, a plan change, a termination, a new server. These answer at once with an action, and the work carries on in the background. You follow the action until it reaches a final state.

Service actions answer 202 with the action. A new order answers 201, with one provision action for each server it creates.

An action's states

queuedrecorded, not sentrunningsent, waiting to see itsucceededconfirmedfailedsee failure.codeunknownnot confirmedwindowpassedrefused beforeit runsFinal: these three never change
An action starts queued, runs, and ends in one of three final states. It can also fail while still queued, when it is refused before it is sent. Unknown means the result was not confirmed in time: check the service itself. Final states never change. Derived from the contract's Action status and the API design.
StatusMeaningFinal
queuedRecorded, not sent yet. A new Dedicated server or proxy waits here for our team, which can take hours. A paid plan change waits here until it is applied.no
runningSent; waiting for the server to show the result.no
succeededConfirmed by the server's state.yes
failedRefused or failed. failure.code says why.yes
unknownThe result was not confirmed within the action's window. Check the service.yes

The windows, after which a running action becomes unknown:

ActionWindow
Boot, shut down, restart, power off2 minutes
Reset the root password2 minutes
Terminate10 minutes (the server is then deleted at the service's deletesAt)
Reinstall30 minutes
Provision a VPS2 hours
Provision a Dedicated server or a proxynone: it waits for our team
Plan changenone while queued; it runs once it is applied

A VPS gets the memory and disk of a new plan at its next power cycle.

failure.code is one of platform_refused, platform_unavailable, provisioning_failed, order_rejected, order_cancelled or service_locked.

Follow an action

Read it back by its id, at most once every 2 seconds, until its status is final:

GET/actions/{actionId}Reference

Get an actionLanguage
curl https://api.clouduxe.com/v1/actions/f5c8b2a1-6e3d-4c9f-b1a7-3d2e9c0f4b6a \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY"
200 example
{
  "object": "action",
  "id": "f5c8b2a1-6e3d-4c9f-b1a7-3d2e9c0f4b6a",
  "type": "restart",
  "status": "succeeded",
  "serviceId": "c3a1f6d2-8b4e-4a9c-b7d5-2e1f0a3c6b8d",
  "orderId": null,
  "invoiceId": null,
  "failure": null,
  "secretAvailable": false,
  "secretExpiresAt": null,
  "createdAt": "2026-12-04T09:20:11Z",
  "startedAt": "2026-12-04T09:20:11Z",
  "completedAt": "2026-12-04T09:20:39Z",
  "livemode": true
}

Other responses

400Bad requestversion_invalid
{
  "error": {
    "type": "invalid_request_error",
    "code": "version_invalid",
    "message": "Clouduxe-Version does not name an API version.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#version_invalid"
  }
}
401Unauthorizedtoken_missing, token_invalid, token_expired, token_revoked
{
  "error": {
    "type": "authentication_error",
    "code": "token_missing",
    "message": "No API token was sent. Send it as Authorization: Bearer <token>.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#token_missing"
  }
}

Also answered with this status: token_invalid, token_expired, token_revoked.

403Forbiddenip_not_allowed, api_access_disabled, scope_missing
{
  "error": {
    "type": "permission_error",
    "code": "ip_not_allowed",
    "message": "This request came from an address outside the token's IP allowlist.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#ip_not_allowed"
  }
}

Also answered with this status: api_access_disabled, scope_missing.

404Not foundnot_found
{
  "error": {
    "type": "not_found_error",
    "code": "not_found",
    "message": "No such object, or it is not visible to this token.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#not_found"
  }
}
429Too many requestsrate_limited
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limited",
    "message": "Too many requests.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#rate_limited"
  }
}
500Server errorinternal_error
{
  "error": {
    "type": "api_error",
    "code": "internal_error",
    "message": "An unexpected error occurred. It has been logged with this request id.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#internal_error"
  }
}
503Unavailableunavailable
{
  "error": {
    "type": "api_error",
    "code": "unavailable",
    "message": "The API is briefly unavailable.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#unavailable"
  }
}

Or list a service's actions:

GET/services/{serviceId}/actionsReference

List a service's actionsLanguage
curl https://api.clouduxe.com/v1/services/c3a1f6d2-8b4e-4a9c-b7d5-2e1f0a3c6b8d/actions \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY"

Instead of polling, you can listen for the action.completed webhook, which carries the action in its final state; see Webhooks. The SDKs also have waitForAction, which polls every 2 seconds and returns the final state.

One-time secrets

Some actions set a server password:

  • provisioning a VPS without SSH keys, or with a Windows image;
  • reinstalling without SSH keys, or with Windows;
  • resetting the root password with delivery: "api".

No write ever answers that password. When the action succeeds, it carries secretAvailable: true, and you read the password from the action:

GET/actions/{actionId}/secretReference

Retrieve an action's secretLanguage
curl https://api.clouduxe.com/v1/actions/f5c8b2a1-6e3d-4c9f-b1a7-3d2e9c0f4b6a/secret \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY"
200 example
{
  "object": "action_secret",
  "actionId": "f5c8b2a1-6e3d-4c9f-b1a7-3d2e9c0f4b6a",
  "kind": "server_password",
  "username": "root",
  "password": "hV4qW9zL2mRt8KxP",
  "readsLeft": 4,
  "expiresAt": "2026-12-04T10:20:39Z"
}

Other responses

400Bad requestversion_invalid
{
  "error": {
    "type": "invalid_request_error",
    "code": "version_invalid",
    "message": "Clouduxe-Version does not name an API version.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#version_invalid"
  }
}
401Unauthorizedtoken_missing, token_invalid, token_expired, token_revoked
{
  "error": {
    "type": "authentication_error",
    "code": "token_missing",
    "message": "No API token was sent. Send it as Authorization: Bearer <token>.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#token_missing"
  }
}

Also answered with this status: token_invalid, token_expired, token_revoked.

403Forbiddenforbidden, ip_not_allowed, api_access_disabled, scope_missing
{
  "error": {
    "type": "permission_error",
    "code": "forbidden",
    "message": "Your role on this service does not allow this action.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#forbidden"
  }
}

Also answered with this status: ip_not_allowed, api_access_disabled, scope_missing.

404Not foundnot_found
{
  "error": {
    "type": "not_found_error",
    "code": "not_found",
    "message": "No such object, or it is not visible to this token.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#not_found"
  }
}
410Gonesecret_unavailable
{
  "error": {
    "type": "conflict_error",
    "code": "secret_unavailable",
    "message": "This action's secret was deleted, has expired, was read 5 times, or never existed.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#secret_unavailable"
  }
}
429Too many requestsrate_limited
{
  "error": {
    "type": "rate_limit_error",
    "code": "rate_limited",
    "message": "Too many requests.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#rate_limited"
  }
}
500Server errorinternal_error
{
  "error": {
    "type": "api_error",
    "code": "internal_error",
    "message": "An unexpected error occurred. It has been logged with this request id.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#internal_error"
  }
}
503Unavailableunavailable
{
  "error": {
    "type": "api_error",
    "code": "unavailable",
    "message": "The API is briefly unavailable.",
    "param": null,
    "requestId": "8f14e45f-ceea-467a-9f2b-1c3d5e7a9b0c",
    "docUrl": "https://docs.clouduxe.com/api/errors#unavailable"
  }
}
  • Only an owner's token can read it.
  • You can read it up to 5 times, so a retry after a lost answer still works, until it expires 60 minutes after the action succeeded. Every read is audited. After that it answers 410 secret_unavailable, which is final.
  • As soon as you have stored it, delete it, so it can never be read again:

DEL/actions/{actionId}/secretReference

Delete an action's secretLanguage
curl -X DELETE https://api.clouduxe.com/v1/actions/f5c8b2a1-6e3d-4c9f-b1a7-3d2e9c0f4b6a/secret \
  -H "Authorization: Bearer $CLOUDUXE_API_KEY" \
  -H "Idempotency-Key: 6f1c2e9a-4b7d-4e3a-9c8f-1a2b3c4d5e6f"

Need a server, or a hand with one?

Pick a plan to deploy a server, or open a ticket in the panel. Support runs 24/7/365.