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:
Field | Type | Description |
---|---|---|
jobId | String | ID of the loadState job. |
jobStatus | Collection | Status of the package upload. |
state | String | Returned in the status object. Status of the loadState job, such as IN PROGRESS, SUCCESS, or FAILED. |
message | String | Returned in the status object. Job status message. |
checksumValid | Boolean | Indicates 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:
Field | Type | Required | Description |
---|---|---|---|
name | String | Name of the loadState job. Default name is job-<currentTimeInMilliseconds | |
importSpecification | Complex type | Used to specify the objects to include. | |
includeObjects | Collection | Include 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. | |
objectSpecification | Collection | Include in the importSpecification object. Specifies the object properties. | |
sourceObjectId | String | Yes | Include in the objectSpecification object. The container ID in the object states package file. Required if objectSpecification is present |
targetObjectId | String | Yes | Include 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:
Field | Type | Description |
---|---|---|
Id | ID of the loadState job. | |
createTime | Time the loadState job was created. | |
updateTime | Last time the loadState job was updated. | |
name | Name of the loadState job. | |
startTime | Start time of the loadState job. | |
endTime | End time of the loadState job. | |
status | Status of the package upload. | |
state | Returned in the status object. Load state for each individual object, such as IN PROGRESS, SUCCESS, FAILED, or SKIPPED. | |
message | Returned in the status object. Job status message. | |
objects | Objects included in the loadState job and object level status. | |
sourceOrgId | Organization ID of the organization that created the object states package. | |
checksumValid | Indicates 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:
Field | Type | Description |
---|---|---|
id | ID of the loadState job. | |
createTime | Time the object states package was created. | |
updateTime | Last time the object states package was updated. | |
name | Name of the loadState job. | |
startTime | Start time of the loadState job. | |
endTime | End time of the loadState job. | |
status | Status of the package upload. | |
state | Returned in the status object. Status of the loadState job, such as IN PROGRESS, SUCCESS, or FAILED. | |
message | Returned in the status object. Job status message. | |
sourceOrgId | ID of the organization that created the object states package | |
objects | Objects included in the import. | |
sourceObject | Returned in the objects object. Object included in the import. | |
id | Returned in the objects.sourceObject object. Global ID of the object included in the import. | |
name | Returned in the objects.sourceObject object. Name of the object included in the import | |
path | Returned in the objects.sourceObject object. Complete path of the object included in the import. | |
path | Returned in the objects.sourceObject object. Type of object included in the import. | |
description | Returned in the objects.sourceObject object. Description of the object included in the import. | |
targetObject | Returned in the objects object. Target object. | |
id | Returned in the objects.targetObject object. Global ID of the target object. | |
name | Returned in the objects.targetObject object. Name of the target object. | |
path | Returned in the objects.targetObject object. Complete path of the target object. | |
type | Returned in the objects.targetObject object. Type of target object | |
description | Returned in the objects.targetObject object. Description of target object. | |
status | Returned in the objects.targetObject object. Status of the target object. | |
status | Returned in the objects object. Load status of the object. | |
state | Returned in the objects.status object. Load state of the object, such as IN PROGRESS, SUCCESS, or FAILED. | |
message | Returned in the objects.status object. Status message for the object | |
checksumValid | Returned 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
}