palbaseDocs

Palbase ai · API

POST/ai/machines/{machine}/cordon

Cordon a machine

The machine takes no new session; the sessions it holds run on. Delete it once it holds none (its state says used 0). A signed-in user cordons a machine that is theirs; any other — someone else's, or one of the project's own — is not there for them (404).

Called by a signed-in user of your app, with their token and the publishable key; or your server, with the project's secret key.

Path

machinestring · requiredThe machine: its id.
curl
curl -X POST "https://<your-ref>.palbase.studio/ai/machines/<machine>/cordon" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

204Cordoned

401No valid credential

403A publishable key or a user's session: everything here is the project's server's, called with the secret key

404No such response, job or provider in this project

503The model service or the database did not answer; retry shortly

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation CordonMachine of ai's contract.