# Add Database
Add Database to Application
# HTTP Request:
POST https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/add-database
# Parameter:
Parameter | Required | Type | Description |
---|---|---|---|
database_server_id | Yes | Numeric | ID of the database server to which the specific database is added for the application. |
database_id | Yes | Numeric | ID of the specific database to be added to the application. |
# Curl Request Example:
curl --request POST \
--url "https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/add-database" \
--header 'content-type: application/json' \
--header 'Authorization: <YOUR API TOKEN>' \
--data '{
"database_server_id": 1,
"database_id": 12
}'
# Response Examples:
# Database Added Successfully
- 200 (Ok)
{
"message": "Database added successfully."
}
# Application Not Found
- 404 (Not Found)
{
"message": "The application is not associated with the specified server."
}
# Server Not Found
- 404 (Not Found)
{
"message": "The selected server is not associated with this organization."
}
# Database Not Found
- 404 (Not Found)
{
"message": "The selected database was not found."
}
# Server Error
- 500 (Internal Server Error)
{
"message": "Something went wrong."
}