Update PostgreSQL database name

This function renames a PostgreSQL® database.

Important:

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

SecurityBasicAuth
Request
query Parameters
newname
required
string

The database's new name.

Note:

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

Example: newname=database2
oldname
required
string

The database's current name.

Note:

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

Example: oldname=database
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Postgresql/rename_database
Request samples
uapi --output=jsonpretty \
  --user=username \
  Postgresql \
  rename_database \
  oldname='database' \
  newname='database2'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "rename_database",
  • "module": "Postgresql",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}