Skip to content

Reset Database User Password

POST
/dbaas/{managed_db_id}/users/{username}/reset-password/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/gpu/dbaas/{managed_db_id}/users/{username}/reset-password/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"password": "<password>"
}'

Sets a new password for a database user. The database must be Running. The response repeats the new password, so do not log it. Needs the Update permission on DBaaS.

managed_db_id
required
integer

Database ID

username
required
string

The user.

project_id
required
integer

Project ID

active_iam
integer

Active IAM ID (To access contact person account) Find your Active IAM ID here

location
required
string
Allowed values: Delhi Chennai

Location

Media typeapplication/json
object
password
required

12 to 64 characters with at least one uppercase letter, one lowercase letter, one digit and one symbol.

string format: password
>= 12 characters <= 64 characters

Example

<password>

Password reset

Media typeapplication/json
object
code
integer
message
string
data

The result, under its own data; its log reads “Password reset successfully.”

object
status
integer
data
object
username
string
password

The new password.

string
errors
object
log
string
success
boolean
errors
object

Example

{
"code": 200,
"message": "Success",
"data": {
"status": 200,
"data": {
"username": "appadmin",
"password": "<password>"
},
"errors": {},
"log": "Password reset successfully.",
"success": true
},
"errors": {}
}

The user is one the platform uses (“‘’ is a protected system role.”) or the password is missing (“This field is required.”) or breaks the rule (“Password must be 12-64 characters and include at least one uppercase letter, one lowercase letter, one digit and one symbol.”). A missing or invalid project ID also gives 400 with errors “Project ID is missing or invalid”.

Media typeapplication/json
object
code
integer
message
string
data
object
errors

Keyed by field.

object

Example

{
"code": 400,
"message": "Bad Request",
"data": {},
"errors": {
"password": "Password must be 12-64 characters and include at least one uppercase letter, one lowercase letter, one digit and one symbol."
}
}

The caller lacks the permission the call needs on the project, or the region is not allowed.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 403,
"message": "Forbidden",
"data": {},
"errors": "You don't have permission to access this service. Please verify your policy or project."
}

No database with that ID in the project and region.

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 404,
"message": "Bad Request",
"data": {},
"errors": "Invalid request! Database Not Found"
}

The database is not Running (“Database NOT in RUNNING state. Please try again later.”), or the password could not be set, for example for a user that does not exist (“Error occurred at backend! Please try after sometime.”).

Media typeapplication/json
object
code
integer
message
string
data
object
errors
string

Example

{
"code": 412,
"message": "Precondition Failed",
"data": {},
"errors": "Database NOT in RUNNING state. Please try again later."
}