Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
API - DIFF comparison - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • API - DIFF comparison
KB0854314

API - DIFF comparison


624 Views Last updated : Sep 15, 2023 public Copy Permalink
KB Summary by Now Assist

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'

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.