Compare two versions of an export template
Compares two versions of an export template and lists what differs per Version History category: template settings, tags and custom form fields, attributes by name, analyzer tests by attribute and test name, and metadata fields. Each item is `added`, `removed` or `changed`, from `base` to `target`, and carries its content on both sides (`base` and `target`), so both versions can be shown next to each other. Items that are the same on both sides are not listed. Uses the same rules as the revision change lists and `changeSummary`, so for two consecutive revisions the summary equals the later revision's `changeSummary`. IDs and timestamps are ignored. Each side is `active` (the active revision), `draft` (the current draft) or a revision id. The draft is read as it is now; nothing is created or saved. **Authorization.** You can only compare revisions of export templates you own.
Productsup Keycloak JWT bearer token.
In: header
Path Parameters
Export template ID
Query Parameters
active, draft or a revision id. Defaults to active.
active, draft or a revision id.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://export-template-api.productsup.com/V2/export-templates/0/revisions/compare?target=draft"{
"base": {
"ref": "active",
"revisionId": "01980f10-5b04-7845-b0d5-66861c6cabb0",
"revisionNumber": 3,
"draft": false
},
"target": {
"ref": "active",
"revisionId": "01980f10-5b04-7845-b0d5-66861c6cabb0",
"revisionNumber": 3,
"draft": false
},
"identical": false,
"changeSummary": {
"templateDetails": {
"added": 0,
"removed": 0,
"changed": 1
},
"attributes": {
"added": 0,
"removed": 0,
"changed": 1
},
"analyzerTests": {
"added": 0,
"removed": 0,
"changed": 1
},
"metadata": {
"added": 0,
"removed": 0,
"changed": 1
}
},
"changes": {
"templateDetails": [
{
"type": "changed",
"field": "encoding",
"attribute": "Price",
"name": "Numeric Validation",
"fields": [
{
"field": "type",
"from": "optional",
"to": "conditionally_mandatory"
}
],
"base": "optional",
"target": "conditionally_mandatory"
}
],
"attributes": [
{
"type": "changed",
"field": "encoding",
"attribute": "Price",
"name": "Numeric Validation",
"fields": [
{
"field": "type",
"from": "optional",
"to": "conditionally_mandatory"
}
],
"base": "optional",
"target": "conditionally_mandatory"
}
],
"analyzerTests": [
{
"type": "changed",
"field": "encoding",
"attribute": "Price",
"name": "Numeric Validation",
"fields": [
{
"field": "type",
"from": "optional",
"to": "conditionally_mandatory"
}
],
"base": "optional",
"target": "conditionally_mandatory"
}
],
"metadata": [
{
"type": "changed",
"field": "encoding",
"attribute": "Price",
"name": "Numeric Validation",
"fields": [
{
"field": "type",
"from": "optional",
"to": "conditionally_mandatory"
}
],
"base": "optional",
"target": "conditionally_mandatory"
}
]
}
}{
"errors": {
"message": "Resource access denied."
}
}{
"errors": {
"message": "Resource access denied."
}
}{
"errors": {
"message": "Resource access denied."
}
}How is this guide?