Notifications

37 views

This endpoint allows requesting the DIFF comparison between any 2 config data sets. The user must have at least the VIEW permissions on the config data set names in order to retrieve its content and perform the comparison. 

Endpoint

method
GET
URI
/api/v1/data/include/diff

headers

!
AuthorizationBearer <userToken or APIkey>

parameters

!
fromName
myMdsName1
the exact name of the config data set to use as the "starting" point
!
toName
myMdsName2
the exact name of the config data set to compare with
!
format
json | text/csv
set the response format

simplified
true | false
default is false. Reduces the amount of detail in the response

ignorePath
true | false
default is false. When set to true, differences in paths to the CDIs will not be taken into account in order to decide if there was a modification or not. This is relevant in case you compare 2 different CDS with the same "structure" and you only want to compare the CDI values, not their path.

Response

The response is an object in the format as requested (JSON or CSV). Example response in CSV format:

Type,Path,Key,NewValue,OldValue
"deleted","/node1","nodeFlavor",,"chocolate"
"modified","/node2","nodeName","node2","nodeXYZ"

In case of insufficient permissions, the response object will contain a {"AccessDeniedException"} message

Example cURL

curl -s -X GET 'https://demo.sweagle.com/api/v1/data/include/diff?fromName=node1&toName=node2&simplified=false&format=text/csv' -H 'authorization: Bearer Xeb940d3-ea37-4766-bb6c-f0b83deafb6f'

Article Information

Last Updated:2020-10-15 01:15:27
Published:2020-10-15