Copy As Export Package API
The copy feature in Object Migration but as an API.
This is a servlet that takes in a parameter which is, obviously, the name of the package that we want to copy. Creates a new package and copies all objects in the original package. Returns JSON responses for all scenarios.
GET <instance>/html/en/default/rest/copyAsExportPackage?packageName=testPackage
- Success returns
200 OK
{
"message": "Successfully copied package"
}
- No param returns
400 Bad Request
{
"message": "Please pass a packageName parameter"
}
- Empty package name returns
400 Bad Request
{
"message": "Please pass a package name"
}
- Invalid package name returns
400 Bad Request
{
"message": "Please pass a valid package name"
}
- Anything else returns
500 Internal Server Error