LCM Import (v2)

The LCM Import (v2) REST API initiates import of a Migration snapshot so that the contents of the application snapshot are imported into the application. You can complete these tasks for imported users: set a specific password for all users in the snapshot, set a unique temporary password for each user in the snapshot, and force password reset at first login.

The presence of status -1 in the response indicates that the import is in progress. You should use the job status URI to determine whether the import is complete.

If the Job completes with status 1, the task details will be mentioned in the items from which the source, destination, and URL to fetch the first set of errors is available. All issues for a particular task can be fetched in the manner of pagination. Acceptable values for msgtype are: error/warn/info; limit represents the number of issues requested per request, and offset marks the beginning number to fetch the issues.

This API is version v2.

Required Roles

Service Administrator

Power User assigned to the Migration Administrator Profitability and Cost Management application role

Identity Domain Administrator role is required to import user and predefined roles.

Table 9-10 LCM Import

Task Request REST Resource
LCM Import POST

/interop/rest/v2/snapshots/import

Import Status GET /interop/rest/v2/status/migration/22
Details GET /interop/rest/v2/status/migration/22/0/details?limit=25&offset=0&msgtype=info

REST Resource

POST /interop/rest/v2/snapshots/import

Support Media Types: application/json

Note:

Before using the REST resources, you must understand how to access the REST resources and other important concepts. See Implementation Best Practices for EPM Cloud REST APIs. Using this REST API requires prerequisites. See Prerequisites.

The following table summarizes the request parameters.

Table 9-11 Parameters

Name Description Type Required Default
snapshotName Application snapshot that is to be imported Payload Yes None
importUsers Whether to import users; true imports users and their predefined role assignments. The import fails if the user issuing the request does not have the Identity Domain Administrator role. Payload No false
userPassword The default password for the imported users. Payload No A unique temporary password is assigned to each user
resetPassword Whether to force reset password for the imported users on first login, true or false Payload No true

Example URL and Payload

https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/snapshots/import
{
    "snapshotName": "Artifact Snapshot",
    "parameters": {
        "importUsers": true,
        "userPassword": "epm_cloud",
        "resetPassword": false
    }
}

Response

Supported Media Types: application/json

Table 9-12 Parameters

Parameters Description
details In case of errors, details are published with the error string
status See Migration Status Codes
links Detailed information about the link
href Links to API call
action The HTTP call type
rel Can be self and/or Job Status. If set to Job Status, you can use the href to get the status of the import operation
data Parameters as key value pairs passed in the request
items Details about the resource
source From where the navigation is being performed
destination To where the navigation is being performed
name Name of the task, usually "Task Information"
links Details of the first URL to be requested to get the job details; rel is "Job Details"

Example of Response Body

Response 1 example when import is in progress:

{
    "details": null,
    "status": -1,
    "links": [
        {
            "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/snapshots/import",
            "action": "POST",
            "rel": "self",
            "data": null
        },
        {
            "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/status/migration/24",
            "action": "POST",
            "rel": "Job Status",
            "data": null
        }
    ]
}

Response 2 example when import completes:

{
    "details": null,
    "status": 0,
    "items": [
        {
            "name": "Task Information",
            "source": "/Artifact Snapshot/HSS-Shared Services",
            "destination": "Shared Services",
            "links": [
                {
                    "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/status/migration/24/0/details?limit=25&offset=0&msgtype=warning",
                    "action": "GET",
                    "rel": "Job Details",
                    "data": null
                }
            ]
        },
        {
            "name": "Task Information",
            "source": "/Artifact Snapshot/HP-Vision",
            "destination": "Vision",
            "links": [
                {
                    "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/status/migration/24/1/details?limit=25&offset=0&msgtype=warning",
                    "action": "GET",
                    "rel": "Job Details",
                    "data": null
                }
            ]
        },
        {
            "name": "Task Information",
            "source": "/Artifact Snapshot/DOCREP-Document Repository",
            "destination": "Document Repository",
            "links": [
                {
                    "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/status/migration/24/2/details?limit=25&offset=0&msgtype=warning",
                    "action": "GET",
                    "rel": "Job Details",
                    "data": null
                }
            ]
        },
        {
            "name": "Task Information",
            "source": "/Artifact Snapshot/CALC-Calculation Manager",
            "destination": "Calculation Manager",
            "links": [
                {
                    "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/status/migration/24/3/details?limit=25&offset=0&msgtype=warning",
                    "action": "GET",
                    "rel": "Job Details",
                    "data": null
                }
            ]
        },
        {
            "name": "Task Information",
            "source": "/Artifact Snapshot/FDMEE-FDM Enterprise Edition",
            "destination": "FDM Enterprise Edition",
            "links": [
                {
                    "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/status/migration/24/4/details?limit=25&offset=0&msgtype=warning",
                    "action": "GET",
                    "rel": "Job Details",
                    "data": null
                }
            ]
        }
    ],
    "links": [
        {
            "href": "https://<SERVICE_NAME>-<TENANT_NAME>.<SERVICE_TYPE>.<dcX>.oraclecloud.com/interop/rest/v2/status/migration/24",
            "action": "GET",
            "rel": "self",
            "data": null
        }
    ]
}

Sample cURL Command Basic Auth

curl -X POST -s -u '<USERNAME>:<PASSWORD>' -H 
'Content-Type: application/json' -d '{"snapshotName":"<SNAPSHOT-NAME>","parameters":
{"importUsers":<TRUE/FALSE>,"userPassword":"<PASSWORD>","resetPassword":<TRUE/FALSE>}}' 
'https://<EPM-CLOUD-BASE-URL>/interop/rest/v2/snapshots/import'

Sample cURL Command OAuth 2.0

curl -X POST --header "Authorization: Bearer <OAUTH_ACCESS_TOKEN>" -H 
'Content-Type: application/json' -d '{"snapshotName":"<SNAPSHOT-NAME>","parameters":
{"importUsers":<TRUE/FALSE>,"userPassword":"<PASSWORD>","resetPassword":<TRUE/FALSE>}}' 
'https://<EPM-CLOUD-BASE-URL>/interop/rest/v2/snapshots/import'