The DeltaJSON REST API allows you to invoke JSON comparison, merge and graft from a wide range of programming languages and systems - in either a synchronous or asynchronous fashion. This section describes how to access the API with your 'Access Token', using the token from your application, details on the endpoints and a collection for Postman.

How to access the API

You will need a DeltaJSON Professional or Trial subscription, to access the API. If you don't have a subscription please check out the 'Getting Started' section. The RESTful API endpoints, one for each operation, can be used from any programming language connecting securely using https.

Get your Token

In order to use the DeltaJSON Service, you need to download an access token from the DeltaJSON application. This access token needs to be passed as part of the header for authorisation to perform any operation.

Refresh your Token

The access token downloaded is valid for 36000 seconds (10 hours) by default. Once this token, expires you can use the existing token to generate a new token.

For detailed information, please refer to How to Refresh your Token

Compare your first files

Quick steps:

  • Use the following endpoint to do a quick comparison

POST https://www.deltaxml.com/api/djsonapp/v1/compare
CODE
  • Add appropriate authorisation header

Authorization: {{auth-token}}
Accept: application/json
JSON
  • Here is a simple synchronous request example:

{
  "a": {
    "type": "file",
    "path": "/Users/exampleUser/Documents/input1.json"
  },
  "b": {
    "type": "file",
    "path": "/Users/exampleUser/Documents/input2.json"
  },
  "wordByWord": false,
  "arrayAlignment": "typeWithValuePriority"
}
JSON
  • Play around with the parameters and generate desired results!

Postman

Postman is a popular tool for working with APIs. Download the latest version of Postman from https://www.getpostman.com/.

The REST API reference documentation and collection for DeltaJSON is hosted on Postman at: DeltaJSON 2.1.0 Postman collection.

Click on the Run in Postman button on the top-right corner on the DeltaJSON 2.1.0 reference docs page to use the desktop app (or browser) to run the example operations

If you are using the Safari browser, follow these instructions to setup the Postman collection