v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Postgresql
PostgreSQL Database Management

Update PostgreSQL database name

This function renames a PostgreSQL® database.

Important:

When you disable the PostgreSQL role, the system disables this function.

get/Postgresql/rename_database

Query parameters

newnamestring required
Example:database2

The database's new name.

Note:

If database prefixing is enabled, this parameter must include the database prefix for the account.

oldnamestring required
Example:database

The database's current name.

Note:

If database prefixing is enabled, this parameter must include the database prefix for the account.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "rename_database",
  "module": "Postgresql",
  "result": {
    "status": 1
  }
}