LoadState

Use this resource with the fetchState resource to synchronize object states across multiple organizations.

Loading object states includes a series of requests and responses. To load states into an organization, you perform the following tasks:
Send a loadState POST request to upload the ZIP file.
Informatica Intelligent Cloud Services returns the job ID for the loadState job.
See Uploading an object states package.
Send a loadState POST request to load the object states. The request includes the loadState job ID and a list of object IDs associated with the states you want to load.
Informatica Intelligent Cloud Services returns the status of the job 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 object states package.
See Starting a loadState job.
Send a loadState GET request to get the status of the job. You can also request status at the object level.
Informatica Intelligent Cloud Services returns the status of the job and if requested, status of each object in the package.
See Getting the loadState job status.

Uploading an object states package

Use a POST request to upload an object states package.

POST request

To upload the object states package, use the following URI:

/public/core/v3/loadState/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 object states ZIP file that you want to upload.

POST response

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

FieldTypeDescription
jobIdStringID of the loadState job.
jobStatusCollectionStatus of the package upload.
stateStringReturned in the status object.
Status of the loadState job, such as IN PROGRESS, SUCCESS, or FAILED.
messageStringReturned in the status object.
Job status message.
checksumValidBooleanIndicates whether the object states package has valid checksum.

POST response example

You might receive a response similar to the following example:

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

Starting a loadState job

Use a POST request to specify and start a loadState job.

POST request

To specify the objects and start the loadState job, use the following URI:

/public/core/v3/loadState/<id>

The is the loadState job ID received in the POST response for the object states package upload.
Include the following fields in the request:

FieldTypeRequiredDescription
nameStringName of the loadState job.
Default name is job-<currentTimeInMilliseconds
importSpecificationComplex typeUsed to specify the objects to include.
includeObjectsCollectionInclude in the importSpecification object.
Objects to load.
If not specified, the load includes all states in the object states package.
If the specified object is a project, the load includes state of all objects that belong to the project and all dependent objects.
objectSpecificationCollectionInclude in the importSpecification object.
Specifies the object properties.
sourceObjectIdStringYesInclude in the objectSpecification object.
The container ID in the object states package file.
Required if objectSpecification is present
targetObjectIdStringYesInclude in the objectSpecification object.
Used for Container to Container mapping.
Required if objectSpecification is present

POST request example

You might use a request similar to the following example:

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

{
    "name" : "stateImportJob",
    "importSpecification" : {
        "includeObjects" : ["iIVBNZSpUKFg4N6g2PKUox","ejZY66c19YUccBdbGwKG4P"],
        "objectSpecification" : [{
            "sourceObjectId" : "iIVBNZSpUKFg4N6g2PKUox"
        },
        {
            "sourceObjectId" : "5FA0DnMzeuDbYZnn3hdto9",
            "targetObjectId" : "5KgUiEkW95NkjLRRefWKiG"
        }]
    }
}

POST Response

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

FieldTypeDescription
IdID of the loadState job.
createTimeTime the loadState job was created.
updateTimeLast time the loadState job was updated.
nameName of the loadState job.
startTimeStart time of the loadState job.
endTimeEnd time of the loadState job.
statusStatus of the package upload.
stateReturned in the status object.
Load state for each individual object, such as IN PROGRESS, SUCCESS, FAILED, or SKIPPED.
messageReturned in the status object.
Job status message.
objectsObjects included in the loadState job and object level status.
sourceOrgIdOrganization ID of the organization that created the object states package.
checksumValidIndicates whether the import package has valid checksum.

POST Response Examples

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

{
    "id": "a7oaBNCyc8DdhxQD4mY4ul",
    "createTime": "2019-01-10T01:35:45.000Z",
    "updateTime": "2019-01-10T21:08:41.398Z",
    "name": "job-1547154520680",
    "startTime": "2019-01-10T21:08:41.389Z",
    "endTime": null,
    "status": {
        "state": "IN_PROGRESS",
        "message": "In Progress"
    },
    "objects": null,
    "sourceOrgId": "2wy21a5fkUphzTVNKaPowg",
    "checksumValid": true
}

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

{
    "error": {
        "message": "Import request with identifier [a7oaBNCyc8DdhxQD4mY4u] doesnt exist.",
        "requestId": "9MopwrDFAOGbuMM9utiTqJ"
    }
}

Getting the loadState job status

Use a GET request to get the status of a loadState job.

GET request

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

/public/core/v3/loadState/<id>

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

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

GET response

A request for status returns the following import status information:

FieldTypeDescription
idID of the loadState job.
createTimeTime the object states package was created.
updateTimeLast time the object states package was updated.
nameName of the loadState job.
startTimeStart time of the loadState job.
endTimeEnd time of the loadState job.
statusStatus of the package upload.
stateReturned in the status object.
Status of the loadState job, such as IN PROGRESS, SUCCESS, or FAILED.
messageReturned in the status object.
Job status message.
sourceOrgIdID of the organization that created the object states package
objectsObjects included in the import.
sourceObjectReturned in the objects object.
Object included in the import.
idReturned in the objects.sourceObject object.
Global ID of the object included in the import.
nameReturned in the objects.sourceObject object.
Name of the object included in the import
pathReturned in the objects.sourceObject object.
Complete path of the object included in the import.
pathReturned in the objects.sourceObject object.
Type of object included in the import.
descriptionReturned in the objects.sourceObject object.
Description of the object included in the import.
targetObjectReturned in the objects object.
Target object.
idReturned in the objects.targetObject object.
Global ID of the target object.
nameReturned in the objects.targetObject object.
Name of the target object.
pathReturned in the objects.targetObject object.
Complete path of the target object.
typeReturned in the objects.targetObject object.
Type of target object
descriptionReturned in the objects.targetObject object.
Description of target object.
statusReturned in the objects.targetObject object.
Status of the target object.
statusReturned in the objects object.
Load status of the object.
stateReturned in the objects.status object.
Load state of the object, such as IN PROGRESS, SUCCESS, or FAILED.
messageReturned in the objects.status object.
Status message for the object
checksumValidReturned in the objects.status object.
Whether the checksum of the object was valid or not.

GET response example

If your request for a loadState 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": "stateImportJob",
  "startTime": "2017-10-26T08:55:53.000Z",
  "endTime": "2017-10-26T08:55:56.000Z",
  "status": {
    "state": "SUCCESSFUL",
    "message": "Import completed successfully."
  },
  "objects": null,
  "sourceOrgId": "2wy21a5fkUphzTVNKaPowg",
  "checksumValid": true
}

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

{
    "id": "3OpbyDU36UgkUhXXtvGsYA",
    "createTime": "2019-01-10T21:35:33.000Z",
    "updateTime": "2019-01-10T21:35:39.000Z",
    "name": "job-1547156138681",
    "startTime": "2019-01-10T21:35:39.000Z",
    "endTime": "2019-01-10T21:35:39.000Z",
    "status": {
        "state": "SUCCESSFUL",
        "message": "Import completed successfully."
    },
    "objects": [
        {
            "sourceObject": {
                "id": "46MhQv9oxrgbOD6qtosF8t",
                "name": "MappingTask",
                "path": "/Default",
                "type": "MTT",
                "description": ""
            },
            "targetObject": {
                "id": null,
                "name": "MappingTask",
                "path": "/Default",
                "type": "MTT",
                "description": null,
                "status": null
            },
            "status": {
                "state": "SUCCESSFUL",
                "message": "Overwrite existing."
            }
        }
    ],
    "sourceOrgId": "2wy21a5fkUphzTVNKaPowg",
    "checksumValid": true
}