API operation · databases group
DELETE
/databases/users/{name}/grants/{database}
First published 3 Oct 2026
0.1.0Unchanged since publicationRevoke a database user's grant on a database
Who may call it
AdministratorResellerCustomer
Token scope, any of
databasesallAnswers200 OK
Use the exact database name. The database and the database user must belong to the same customer, and the caller must be allowed to act for that customer. MariaDB must be installed and database.enabled must be on.
UrbeStack removes the grant and resets the password and remaining grants on every MariaDB account for the database user to the recorded values, including accounts for additional hosts. The response returns the updated database user in user.
The API returns 400 if name or database falls outside the allowed format of 1 to 64 ASCII letters, digits, or underscores. A database user outside the caller's permitted accounts is reported as not found.
As a command
Run as root on the serverParameters
namepath ·DatabaseNameRequireddatabasepath ·DatabaseNameRequiredExample
See the API overview for how to set $API and $TOKEN.Request
curl -sS -X DELETE "$API/databases/users/alice/grants/alice_shop" \ -H "Authorization: Bearer $TOKEN"
Response ·
200 OK{
"user": {
"created_at": "2026-09-09T10:15:00Z",
"grants": [
{
"database": "alice_shop",
"level": "full",
"privileges": "text"
}
],
"id": 1,
"name": "alice",
"other_hosts": [
"text"
],
"updated_at": "text",
"user": "alice",
"user_id": 2
}
}Errors
8 errors, each a status and a sentence400--name, --database and --level are required400<db.name> is <db.user>'s and <name> is <user>'s: a user is granted only databases of the same customer400A <what> name is 1 to 64 letters, digits or underscores400A custom grant needs a privilege list of names separated by commas: SELECT, INSERT, ...400The level is full, read-only or custom401Authentication required404No such database user: 404No such database: No error of this operation matches.
Generated from release 0.2.35 (current) · the API’s own descriptionThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/api/delete-databases-users-name-grants-database/