Skip to main content
Skip table of contents

Using the Content Compare BITS API

The Content Compare REST API allows you to invoke BITS comparison from a wide range of programming languages and systems. This section describes how to access the API with your 'Token', using the token from your application, details on the endpoints.

How to access the API

You will need a Content Compare BITS subscription or trial, to access the API. If you don't have a subscription please check out the 'Getting Started' section. The RESTful API endpoints, can be used from any programming language connecting securely using https.

Get your Token

In order to use the Content Compare BITS service, you need to download an token from the MyDelta Subscription Manager. This token needs to be passed as part of the header for authorisation to perform any operation.

It will be in the form of a JSON file containing refresh, id, and ID Token expiry information.

  • refresh
    Pass this along with your other information to our /authorise endpoint to generate a new id.

  • id
    Used to authorise when comparing content, these last for 10 hours and you will need to call /authorise to get a new one.

  • expiry
    Unix epoch timestamp of when the id expires - useful for checking if you need to call the /authorise endpoint to get a fresh id.

For example:

CODE
{
  "id":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eDGHGFHyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  "refresh": "GEbRxBN...edjnXbL",
  "expiry": "1648141119"
}

Testing Using Postman

Postman is a popular tool for working with APIs. We have published a collection for testing and documentation using Postman. 

Postman provides extensive features for performing integration testing with our API. It allows for repeatable, reliable tests that can be automated and used in a variety of environments and includes useful tools for persisting data. See the Postman Learning Centre.

Download the latest version of Postman from https://www.getpostman.com/

You will then need to fork our collection from Postman. Click the “Fork” button in the top-right and follow Postman’s instructions.

The collection will then be available from the sidebar under "Collections":

The collection comes with various example requests, that have been set up with collection variables, the main one being server which by default is pointing to localhost and will need to be changed if running on-premise.

This can be done easily by going to the Variables tab of the collection and changing the current value of server:

Refresh your Token

The 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 /authorise endpoint mentioned in Content Compare BITS API endpoints

Compare your first files

Please use the '/compare' endpoint mentioned in Content Compare BITS API endpoints.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.