Hi, I'm Ask INFA!
What would you like to know?
ASK INFAPreview
Please to access Ask INFA.

Table of Contents

Search

  1. Preface
  2. Informatica Intelligent Cloud Services REST API
  3. Platform REST API version 2 resources
  4. Platform REST API version 3 resources
  5. Data Integration REST API
  6. File Ingestion and Replication REST API
  7. Streaming Ingestion and Replication REST API
  8. RunAJob utility
  9. ParamSetCli utility
  10. REST API codes
  11. REST API resource quick references

REST API Reference

REST API Reference

Comparing object versions

Comparing object versions

Use the compare resource to compare two versions of an object to find what's changed between the versions.
You must have pull privileges to compare object versions.

POST request

To compare two versions of an object, use the following URI:
/public/core/v3/compare/<asset ID>
You can specify whether to receive the response in JSON format or as text using the Git diff format.
Include the following fields in the request:
Field
Type
Required
Description
source
String
Yes
The base version of the asset to compare. Use one of the following values:
  • If the asset version to compare is checked in to the repository, use the commit hash for the value.
  • If the asset version to compare hasn't been checked in, use the following value: CURRENT-VERSION
destination
String
Yes
The asset version to compare to the base version.
  • If the asset version is checked in to the repository, use the commit hash for the value.
  • If the asset version hasn't been checked in, use the following value: CURRENT-VERSION
outputFormat
String
Yes
Response format. Use one of the following values:
  • JSON
  • TEXT

POST response

If the response body is TXT and the response is successful, the asset information and changes are recorded in Git diff response format.
If the response body is JSON and the response is successful, a POST request returns the following information:
Field
Type
Description
source
Object
Base version of asset that the updated version is compared with.
name
String
Name of the asset.
path
String
Full path to the asset.
updatedOn
String
The timestamp when the commit was submitted in the following format:
yyyy-MM-dd'T'HH:mm:ss.SSSZ
updatedBy
String
User who updated the object.
commitHash
String
Commit hash of the file retrieved from the commit. Use one of the following values:
  • The commit hash number. Included if the asset version has been committed to the repository.
  • CURRENT-VERSION. The current version of the asset. Included if the version hasn't been committed to the repository.
destination
Object
Version of the asset that's being compared to the source version.
name
String
Name of the asset.
path
String
Full path to the asset.
updatedOn
String
The timestamp when the commit was submitted in the following format:
yyyy-MM-dd'T'HH:mm:ss.SSSZ
updatedBy
String
User who updated the object.
commitHash
String
Commit hash of the file retrieved from the commit. Can be one of the following values:
  • The commit hash number. Included if the asset version was committed to the repository.
  • CURRENT-VERSION. The current version of the asset. Included if the version hasn't been committed to the repository.
action
String
Action performed on the asset. Can be one of the following values:
  • CREATE
  • DELETE
  • UPDATE
  • MOVE
  • MOVE_UPDATE
  • RENAME
  • NO_ACTION
objectId
String
Global unique identifier of the object.
lineGroup
Array <Object>
Object that describes the changes made to the source version and destination version.
oldChange
Object that lists the lines with removed changes.
startPosition
Int
Initial line number of the removed changes.
noOfLinesAffected
Int
Total lines impacted.
newChange
Object that lists the lines with added changes.
startPosition
Int
Initial line number of the added changes.
noOfLinesAffected
Int
Total lines impacted.
unmodifiedLinesBefore
List <String>
Lines before affected lines that are unmodified. Maximum of 3.
unmodifiedLinesAfter
List <String>
Lines after affected lines that are unmodified. Maximum of 3.
oldChanges
List <String>
Lines removed from asset file. Inline removal of words are represented between <remove-txt>.
newChanges
List <String>
New lines added into asset file. Inline addition of words are represented between <add-txt>.

POST request examples

To request a comparison of an asset that you have checked out to an older version of the asset and receive the comparison in JSON format, you might send a request that's similar to the following example:
POST <baseApiUrl>/public/core/v3/compare/jn94HPOUK4zlEoO07eGfEq Content-Type: application/json Accept: application/json INFA-SESSION-ID: <sessionId> { "source": "CURRENT-VERSION", "destination": "aca30f6c44de9bef23db59ed16967653481c5e23", "outputFormat": "JSON" }
To request a comparison of two versions that are checked in to the repository and receive the comparison in text format, you might send a request that's similar to the following example:
POST <baseApiUrl>/public/core/v3/compare/2tDSXSjd2Fkg1AFPSWops3 Content-Type: application/json Accept: application/text INFA-SESSION-ID: <sessionId> { "source": "b0bdc63a7fb9047db6c3bc29ad67d5ecbf7d1d47", "destination": "fc6fcc318ad1b4aec17017d053bc2f0d1f605096", "outputFormat": "TEXT" }

POST response examples

If you requested a comparison of an asset that you have checked out to an older version of the asset and receive the response in JSON format, you might receive a response similar to the following example:
{ "source": { "name": "TestMapping", "path": "Test", "updatedOn": null, "updatedBy": null, "commitHash": "CURRENT-VERSION" }, "destination": { "name": "TestMapping", "path": "Test", "updatedOn": "2025-05-08T02:15:17.842Z", "updatedBy": null, "commitHash": "95983a4fe44ee21df1933c5c4b4a5c565c68b832" }, "id": "2tDSXSjd2Fkg1AFPSWops3", "action": "UPDATE", "lineGroup": [ { "oldChange": { "startPosition": 85, "noOfLinesAffected": 1 }, "newChange": { "startPosition": 85, "noOfLinesAffected": 1 }, "unmodifiedLinesBefore": [ " }", " ]", " }," ], "unmodifiedLinesAfter": [ "}" ], "oldChanges": [ " \"vcsExportTime\" : \"2025-05-<remove-text>08<remove-text> <remove-text>09:46:09<remove-text> PDT\"" ], "newChanges": [ " \"vcsExportTime\" : \"2025-05-<add-text>07<add-text> <add-text>19:15:17<add-text> PDT\"" ] } ] }
If you requested a comparison of two versions of an asset that are checked in to the repository and receive the response in text format, you might receive a response similar to the following example:
id: 2tDSXSjd2Fkg1AFPSWops3 action: UPDATE source: {name='TestMapping', path='Test', updatedOn=Thu May 08 02: 14: 35 UTC 2025, updatedBy='null', version='ed08ed8f845fe1602006130a734d4416b7b72436' } destination: {name='TestMapping', path='Test', updatedOn=Thu May 08 02: 15: 17 UTC 2025, updatedBy='null', version='95983a4fe44ee21df1933c5c4b4a5c565c68b832' } changes: @@ -2, 0 +2, 0 @@ { "content": { + "description": "This mapping is used for testing", "allowMaxFieldLength": "false", "bigIntConvertType": "ONLY_BIGINT", "documentType": "MAPPING", @@ -84, 1 +85, 1 @@ } ] }, - "vcsExportTime": "2025-05-07 <remove-text>19:14:35<remove-text> PDT" + "vcsExportTime": "2025-05-07 <add-text>19:15:17<add-text> PDT" }

0 COMMENTS

We’d like to hear from you!