# Create
Create a server site-migration.
# HTTP Request:
POST https://api.serveravatar.com/organizations/{organization}/servers/{server}/site-migrations
# Custom Parameters:
Parameter | Required | Type | Description |
---|---|---|---|
site_type | Yes | String | The type of site to be migrated. Must be set to migration . |
migration_server_id | Yes | Numeric | The unique identifier for the migration server you are using. |
type | Yes | String | Specifies the type of migration. Choose one of the following: filesystem , database , or application . |
application_id | No | Numeric | Required if type is application or filesystem . The ID of the existing application on the server that is to be migrated. |
systemUser | No | String | Specifies the type of system user: new to create a new system user, or existing to use an existing application user. |
systemUserInfo[username] | No | String | Required if systemUser is new . Specifies the username for the new system user. |
systemUserInfo[password] | No | String | Required if systemUser is new . Specifies the password for the new system user. |
application_name | No | Alpha Dash | Required if type is application or filesystem . The new name for the application being migrated. |
database_id | No | Numeric | Required if type is application or database . The ID of the existing database on the server that is to be migrated. |
database_name | No | String | Required if type is application or database . The new name for the database being migrated. |
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/site-migrations" \
--header 'content-type: application/json' \
--header 'accept: application/json' \
--header 'Authorization: <YOUR API TOKEN>' \
--data '{
"site_type": "migration",
"migration_server_id": 554,
"type": "application",
"application_id": 602,
"systemUser" : "existing",
"application_name": "testApp",
"database_id": 413,
"database_name": "testDatabase"
}'
# Response:
- 200 (Ok)
{
"message": "Site migration 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 site migration 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": "Site migration is failed because you do not have enough disk space available on your server!"
}
# Disk Space Error
- 500 (Internal Server Error)
{
"message": "Site migration 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!"
}