Import

Use this resource with the export resource to migrate objects from one organization to another.

Importing objects includes a series of requests and responses. To import objects, you perform the following tasks:

  1. Log in to the target organization.
  2. Send an import POST request to upload the ZIP file.
    Informatica Intelligent Cloud Services returns the job ID for the import job.
    See Uploading an import package.
  3. Send an import POST request to import objects. The request includes the import job ID, a list of objects to import, and parameters to resolve any conflict resolution that might occur. An example of a conflict resolution might be if you try to import an asset that has the same name as another asset in the import location.
    You can specify a runtime environment that exists in the target organization to use instead of a source runtime environment. To find a list of the runtime environments in the target organization, you can use the lookup resource.
    Informatica Intelligent Cloud Services returns the status of the import such as In Progress or Success, or returns an error message. The response also includes the source organization ID for the organization that created the export package.
    See Starting an import job.
  4. Send an import GET request to get the status of the import job. You can also request status at the object level.
    Informatica Intelligent Cloud Services returns the status of the import job and if requested, status of each object in the package.
    See Getting the import job status.

Uploading an import package

Use a POST request to upload an import package.

POST request

To upload the import package, use the following URI:

/public/core/v3/import/package

For Content-Type, use

multipart/form-data

In the request body, include a part with the name of package. For its content, use the export ZIP file that you want to import.
By default, Informatica Intelligent Cloud Services uses checksum validation to verify that no changes were made to the contents of the export ZIP file after it was created. If you want to upload an import package that contains a modified export ZIP file, include the relaxChecksum parameter and set the value to True.
The following image shows an example of the request body in Postman:

POST response

If successful, returns the following information for the import job:

Field

Type

Description

jobId

String

ID of the import job.

jobStatus

Collection

Status of the package upload.

state

String

Returned in the status object.
Status of the import job, such as In Progress, Success, or Failed.

message

String

Returned in the status object.
Import job status message.

checksumValid

Boolean

Indicates whether the import package has valid checksum.

POST request example

You might receive a response similar to the following example:

{
  "jobId": "2oZb7vFI2QQg4ncd4AyCGn",
  "jobStatus": {
    "state": "NOT_STARTED",
    "message": null
  }
  "checksumValid": true
}

Starting an import job

Use a POST request to specify and start an import job.

POST request

You can import objects such as assets, connections, Secure Agent configurations, and schedules. To specify the import objects and start the import job, use the following URI:

/public/core/v3/import/<id>

The is the import job ID received in the POST response for the import package upload.
To get the object IDs that you want to include in the request, you can use the lookup resource. For more information, see the lookup resource.
Include the following fields in the request:

Filed

Type

Description

name

String

Name of the import job.
Default name is job-

importSpecification

Complex type

Used to specify import specifications. By default, the import includes all objects in the import package with default conflict resolution settings

defaultConflictResolution

String

Include in the importSpecification object.
Whether to overwrite existing assets with the assets in the import file. Includes the following options:
OVERWRITE. Overwrite the existing asset with the asset in the import file.
REUSE. Do not import the asset.
The import includes connections and runtime environments associated with the assets if they do not exist in the target organization.

includeObjects

Collection

Include in the importSpecification object.
Objects to include in the import.
By default, the import includes all objects in the import package.
If the specified object is a project, the import includes all assets that belong to the project and all dependent objects that are not already present in the target organization.
If the specified object is an asset, the import creates the asset's containers (project, folder) if they do not already exist.
Informatica recommends that you include no more than 1000 objects in an import job.

objectSpecification

Collection

Include in the importSpecification object.
Specifies the object properties. If properties are not specified for a particular object, the import uses the default conflict resolution settings

sourceObjectGuid

String

Include in the objectSpecification object.
The object ID in the export package file.
Required if objectSpecification is present.

conflictResolution

String

Include in the objectSpecification object.
Whether to overwrite existing assets with the assets in the import file. Includes the following options:
OVERWRITE. Overwrite the existing asset with the asset in the import file.
REUSE. Do not import the asset.
The import includes connections and runtime environments associated with the assets if they do not exist in the target organization.

targetObjectId

String

Include in the objectSpecification object.
Used for Container to Container mapping, as well as some asset to asset mappings.
Use to specify a connection or runtime environment that exists in the target organization. To find the ID of a connection or runtime environment, you can use the lookup resource.

POST request example

You might use a request similar to the following example:

POST <baseApiUrl>/public/core/v3/import/2oZb7vFI2QQg4ncd4AyCGn HTTP/1.0
Content-Type: application/json
Accept: application/json
INFA-SESSION-ID: <sessionId>

{
    "name" : "testImportName",
    "importSpecification" : {
        "defaultConflictResolution" : "REUSE",
        "includeObjects" : ["iIVBNZSpUKFg4N6g2PKUox","ejZY66c19YUccBdbGwKG4P"],
        "objectSpecification" : [{
            "sourceObjectId" : "iIVBNZSpUKFg4N6g2PKUox",
            "conflictResolution" : "OVERWRITE"
        },
        {
            "sourceObjectId" : "5FA0DnMzeuDbYZnn3hdto9",
            "targetObjectId" : "5KgUiEkW95NkjLRRefWKiG"
        }]
    }
}

POST Response

If successful, returns the following information for the import job:

Field

Type

Description

jobId

String

ID of the import job.

createTime

String

Time the import job was created.

updateTime

String

last time the import job was updated.

name

String

Name of the import job.

startTime

String

Start time of the import job.

endTime

String

End time of the import job.

status

Collection

Status of the package upload.

state

String

Returned in the status object.
Import state of the individual object, such as IN PROGRESS, SUCCESS, or FAILED.

message

String

Returned in the status object.
Import job status message

objects

Collection

Objects included in the import job.

sourceOrgId

String

Organization ID of the organization that created the export package that was imported

POST Response Examples

If successful, you might receive a response similar to the following example:

{
  "id": "2oZb7vFI2QQg4ncd4AyCGn",
  "createTime": "2017-10-26T08:40:09.000Z",
  "updateTime": "2017-10-26T08:55:53.238Z",
  "name": "testImportName",
  "startTime": "2017-10-26T08:55:53.232Z",
  "endTime": "2017-10-26T08:53:03.000Z",
  "status": {
    "state": "IN_PROGRESS",
    "message": "In Progress."
  },
  "objects": null,
  "sourceOrgId": "0VOx1gScNH7dlDyA4tD8yX"
}

If you receive an error, you might see a response similar to the following example:

{
  "error": {
    "code": "MigrationSvc_040",
    "message": "User does not have required permissions.",
    "requestId": "2ataXVlgw3ydI1Yb2MA4sq"
  }
}

Getting the export job status

Use a GET request to get the status of an export job or download an export job log.

GET request

To obtain status of the import job, use one of the following URIs, where is the import job ID:
To receive status of the import job, use the following URI:

/public/core/v3/export/<id>

To receive status for each object in the export job, use the following URI:

/public/core/v3/export/<id>?expand=objects

Continue polling the request until the state is SUCCESSFUL.
To download the export job log, use the following URI

/public/core/v3/export/<id>/log

GET response

A request for an export job log returns the log in a text file.
A request for status returns the following export status information

Filed

Type

Description

id

String

ID of the export job.

createTime

String

Time the export job was created.

updateTime

String

Last time the export job was updated.

name

String

Name of the export job.

startTime

String

Start time of the export job.

endTime

String

End time of the export job.

status

Status of the export job.

state

String

Returned in the status object.
State of the export job, such as In Progress, Success, or Failed

sourceOrgId

String

ID of the organization that created the export package that was imported.

id

String

Returned in the objects object.
Global ID of the export object requested.

name

String

Returned in the objects object.
Name of the object to export.

path

String

Returned in the objects object.
Complete path of the object to export.

type

String

Returned in the targetObject object.
Type of target objec

description

String

Returned in the objects object.
Description of the object to export.

status

Returned in the objects object.
Export status of the individual object.

state

String

Returned in the status object.
Export state of the individual object, such as IN PROGRESS, SUCCESS, or FAILED.

message

String

Returned in the status object.
Export status message for the individual objec

GET response example

If your request for an export job's status is successful, you might receive a response similar to the following example:

{
  "id": "2oZb7vFI2QQg4ncd4AyCGn",
  "createTime": "2017-10-26T08:40:09.000Z",
  "updateTime": "2017-10-26T08:55:56.000Z",
  "name": "ImportName",
  "startTime": "2017-10-26T08:55:53.000Z",
  "endTime": "2017-10-26T08:55:56.000Z",
  "status": {
    "state": "SUCCESSFUL",
    "message": "Import completed successfully."
  },
  "objects": null,
  "sourceOrgId": "0VOx1gScNH7dlDyA4tD8yX"

If your request included import status for individual objects, a successful response might be similar to the following example:

{
  "id": "2oZb7vFI2QQg4ncd4AyCGn",
  "createTime": "2017-10-26T08:40:09.000Z",
  "updateTime": "2017-10-26T08:55:56.000Z",
  "name": "ImportName",
  "startTime": "2017-10-26T08:55:53.000Z",
  "endTime": "2017-10-26T08:55:56.000Z",
  "status": {
    "state": "SUCCESSFUL",
    "message": "Import completed successfully."
  },
  "objects": [
    {
      "sourceObject": {
        "id": "ejZY66c19YUccBdbGwKG4P",
        "name": "M1",
        "path": "/Default",
        "type": "MAPPING",
        "description": "ab"
      },
      "targetObject": {
        "id": null,
        "name": "M1",
        "path": "/default1",
        "type": "MAPPING",
        "description": null,
        "status": null
      },
      "status": {
        "state": "SUCCESSFUL",
        "message": "Reuse existing."
      }
    },
    {
      "sourceObject": {
        "id": "iIVBNZSpUKFg4N6g2PKUox",
        "name": "abc_map",
        "path": "/Default",
        "type": "MAPPING",
        "description": ""
      },
      "targetObject": {
        "id": null,
        "name": "abc_map",
        "path": "/default1",
        "type": "MAPPING",
        "description": null,
        "status": null
      },
      "status": {
        "state": "SUCCESSFUL",
        "message": "Overwrite existing."
      }
    }
  ],
  "sourceOrgId": "0VOx1gScNH7dlDyA4tD8yX"
}

If you requested an import job log, the contents of the text file might be similar to the following example:

> OIE_002 INFO 2019-02-07T01:02:24.986Z Starting import operation.
Execution Client: API
Job Name: ImportExportMapping2-1541009746833
Organization: infa.doc
RequestId: 68srkYNhdSkdKCKfLBGxyd
User: janer2
> OIE_006 INFO 2019-02-07T01:02:25.416Z Successfully imported object [/Explore/ImportExport] of type [Project] id [3z0FL8tjqEbizNwVBV9LWR] to [/Explore/ImportExport]
> OIE_006 INFO 2019-02-07T01:02:25.931Z Successfully imported object [/SYS/CustFF] of type [SAAS_CONNECTION] id [76c7oud5pBzlyAC3tdfVK2] to [/SYS/CustFF]
> OIE_006 INFO 2019-02-07T01:02:26.598Z Successfully imported object [/Explore/ImportExport/ImportExportMapping2] of type [MAPPING] id [09wsnChCzUYl9OWCy6PKIe] to [/Explore/ImportExport/ImportExportMapping2]
> OIE_003 INFO 2019-02-07T01:02:26.598Z Finished import operation.
Job Name: ImportExportMapping2-1541009746833
Start Time: 2019-02-07T01:02:24.915Z
End Time: 2019-02-07T01:02:26.598Z
Started by: janer2
Start Method: API
Source Organization: infadoc2
Status: SUCCESSFUL