palbaseDocs

Palbase Machines · API

DELETE/machines/{name}/test-users/{user}

Delete a test user made with a template

Has the machine's program undo each template the user was written with — POST /_palbase/test-user-templates/<template>/undo, signed as the template's call; a program with no undo for it, or whose serving version has no such template any more (404), leaves it to its user.deleted — then deletes the user — answering, to a request with Prefer: return=representation, what became of each undo: run (ran: true), or why not (note); 204 otherwise. 502 undo_failed when the program did not undo one: the user is kept, for the delete to be asked again. 429 quota_exceeded, the user kept, when the project's machines are not run now. 404 when the user is no test user this machine made with a template: a test user is the machine's that made it, another machine of the project neither writes for it nor deletes it.

Called by your server, with the project's secret key.

Path

namestring · requiredThe machine's name: lowercase letters, digits and dashes, starting with a letter and not ending with a dash, 32 at most.
userstring · requiredThe test user's id, as the users made with a template were answered.

Headers

Preferstring · optionalreturn=representation answers what became of each template's undo (200); without it the answer is 204, as it was before undos were answered.
curl
curl -X DELETE "https://<your-ref>.palbase.studio/machines/<name>/test-users/<user>" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200Deleted, with what became of each undo (Prefer: return=representation)

204Undone and deleted (no Prefer: return=representation)

400Validation failed or a required field is missing

401Missing or invalid API key

403Not the project's secret key

404The project has no machine of this name

429Over the project's request limit, or its machine time for this period is used up

502The machine's program did not undo a template (undo_failed): the user is kept

503Temporarily unavailable; retrying is safe after Retry-After

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

Operation DeleteTemplatedTestUser of machines's contract.