Copy As Export Package API

Abishek, tri

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

  1. Success returns 200 OK
{
    "message": "Successfully copied package"
}
  1. No param returns 400 Bad Request
{
    "message": "Please pass a packageName parameter"
}
  1. Empty package name returns 400 Bad Request
{
    "message": "Please pass a package name"
}
  1. Invalid package name returns 400 Bad Request
{
    "message": "Please pass a valid package name"
}
  1. Anything else returns 500 Internal Server Error