/packages/{name}
0.1.0Unchanged since publicationDelete a hosting package
usersallTo delete a package with assigned customers, use move_to to reassign them to another package with the same owner, or set no_package to true to remove their package assignments and all package limits. A nonempty move_to takes precedence over no_package. UrbeStack refuses to delete a package in use without either option.
Each move uses the standard checks for changing a customer's package and applies the new disk quota and bandwidth restrictions immediately. If a move fails, UrbeStack stops, names the customer in the error, and retains the package. Customers already moved keep their new assignments.
Administrators can delete any package. Resellers can delete only their own packages. Returns 400 for an invalid package name in name or move_to, 403 if a reseller requests an administrator-owned package, and 404 if the package is missing or belongs to another reseller and the caller is a reseller.
As a command
Run as root on the serverParameters
namepath ·PackageNameRequiredmove_toquery ·PackageNameno_packagequery ·booleanExample
See the API overview for how to set $API and $TOKEN.curl -sS -X DELETE "$API/packages/alice?move_to=text&no_package=1" \ -H "Authorization: Bearer $TOKEN"
200 OK{
"deleted": true,
"moved": 1,
"moved_to": "text",
"name": "alice"
}Errors
32 errors, each a status and a sentence400--move-to and --no-package exclude each other400--name is required400<name> has an owner: move them to the administrator before changing their role400<name> is an administrator: administrators have no home, so nothing to back up400<name> is an administrator: administrators have no system account, so no shell400Cannot demote or suspend the last active administrator400Invalid boolean400Invalid email address400Invalid id400Invalid package name: letters, digits, spaces, dots, underscores and dashes, up to 64, starting with a letter or digit400Invalid password hash400Invalid password: 8 to 128 printable characters400Invalid role: admin, user or reseller400Invalid status400Invalid system password hash400Invalid username: 2 to 32 lowercase letters, digits or underscores, starting with a letter400Only a customer has an owner: an administrator or a reseller is the administrator's own400Package '<name>' cannot be moved onto itself400The second factor can only be turned off here; a user enrols from their own page400Username '<value>' is reserved401Authentication required403The package <p.name> is the administrator's: a reseller changes their own404Package '<move_to>' not found404Package '<name>' not found404User '<name>' not found409<name> is on the package <p.name> of the reseller <p.owner>: change the package before the move409<name> owns <owned> 409<who> and its bandwidth for the month is used up: 409<who> and its disk is used up: 409Package '<name>' is the package of 409The package <p.name> allows <limit> 409The package <target.name> is urbestack.com/docs/api/delete-packages-name/