Hosting Database User

/hosting-database-user

GET

JSON response

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/hosting-database-user" | python -m json.tool

POST

Create a new database user.

JSON request

hosting_account string The hosting account ID for which to create the object.
username string The username for the database user.
password string The user’s password used for authentication.
is_remote_access_enabled boolean If true, the user can be accessed from hosts other than localhost.
is_enabled boolean If false, the user cannot be used.

JSON response

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "account": "ac-12345",
        "username": "myuser",
        "password": "Welcome123",
        "is_remote_access_enabled": true,
        "is_enabled": true,
    }
' \
"{{api_base_url}}/hosting-database-user" | python -m json.tool

/hosting-database-user/{id}

GET

JSON response

Sample

curl \
--request GET \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/hosting-database-user/{id}" | python -m json.tool

PUT

Update an existing database user.

JSON request

password string The user’s password used for authentication.
is_remote_access_enabled boolean If true the user can be accessed from hosts other than localhost.
is_enabled boolean If false the user cannot be used.

JSON response

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "password": "Welcome123",
        "is_remote_access_enabled": true,
        "is_enabled": true,
    }
' \
"{{api_base_url}}/hosting-database-user/{id}" | python -m json.tool

DELETE

Sample

curl \
--request DELETE \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/hosting-database-user/{id}" | python -m json.tool