# Create
Create a staging area.
# HTTP Request:
POST https://api.serveravatar.com/organizations/{organization}/servers/{server}/applications/{application}/staging-area
# Custom Parameters:
Parameter | Required | Type | Description |
---|---|---|---|
staging_area_name | Yes | Alpha Dash | The name of the staging area. Must be a valid alpha dash string (letters, numbers, hyphens, and underscores). |
migration_server_id | Yes | Numeric | The unique identifier for the migration server you are using. |
database_id | Yes | Numeric | The unique identifier for the database being used in the migration. |
temp_domain | Yes | Boolean | Set to true if you want to use a ServerAvatar temporary domain. Set to false if you want to use a custom domain. |
temp_sub_domain_name | No | String | Required if temp_domain is true . The name of the temporary subdomain to be used with the ServerAvatar domain. |
hostname | No | String | Required if temp_domain is false . The custom hostname to be used if not using a ServerAvatar domain. |
wordpressUrlType | No | Boolean | If true , WordPress URLs will use HTTPS. If false , URLs will use HTTP. |
# Curl Request example:
curl --request POST \
--url "https://api.serveravatar.com/organizations/5/servers/15/applications/88/staging-area" \
--header 'content-type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: <YOUR API TOKEN>' \
--data '{
"staging_area_name": "stagingareatest",
"migration_server_id": 554,
"database_id": 430,
"temp_domain": 0,
"temp_sub_domain_name": null,
"hostname": "siteexample.tk"
}'
# Response:
- 200 (Ok)
{
"message":"Staging site process started."
}
# Organization Not Found
- 404 (Not Found)
{
"message": "Organization not found!"
}
# Server Not Found
- 404 (Not Found)
{
"message": "Server not found!"
}
# Migration Server Not Found
- 404 (Not Found)
{
"message": "Migration server not found!"
}
# Another Process Running
- 500 (Internal Server Error)
{
"message": "Please wait another process already running!"
}
# Application Not Found
- 404 (Not Found)
{
"message":"Application not found!"
}
# Duplicate Application Name
- 500 (Internal Server Error)
{
"message": "Duplicate application name found for this new server."
}
# Duplicate Domain Name
- 500 (Internal Server Error)
{
"message": "Duplicate domain name found for this new server."
}
# Database Not Found
- 404 (Not Found)
{
"message":"Database not found!"
}
# Database Already Exist
- 404 (Not Found)
{
"message":"Database already exist!"
}
# Database User Already Exist
- 404 (Not Found)
{
"message":"Database user already exist!"
}
# Disk Space Error
- 500 (Internal Server Error)
{
"message": "Staging area is failed because you do not have enough disk space available on your server!"
}
# Disk Space Error
- 500 (Internal Server Error)
{
"message": "Staging area is failed because you do not have enough disk space available on your new server!"
}
# Application User Error
- 500 (Internal Server Error)
{
"message": "Something went really wrong while creating application user!"
}
# Application Error
- 500 (Internal Server Error)
{
"message": "Something went really wrong while creating application on openlitespeed!"
}
# Application Error
- 500 (Internal Server Error)
{
"message": "Something went really wrong while creating application!"
}
# Database Error
- 500 (Internal Server Error)
{
"message": "Something went really wrong while creating database!"
}
# Database User Error
- 500 (Internal Server Error)
{
"message": "Something went really wrong while creating database user!"
}
# Server Error
- 500 (Internal Server Error)
{
"message": "Something went really wrong!"
}