Using the Content Compare JATS API
The Content Compare REST API allows you to invoke JATS 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 JATS 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 JATS service, you need to download a token from the MyDelta Subscription Manager. This token needs to be passed as part of the header for authorisation to perform any operation.
![](../../__attachments/3314057274/CustomerJourney5-Subscription.png?inst-v=7c2fb52b-f8d9-4d4a-8205-858e865d1efd)
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 theid
expires - useful for checking if you need to call the/authorise
endpoint to get a freshid
.
For example:
{
"id":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.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.
![](../../__attachments/3314057274/Screenshot%202023-01-23%20at%2015.40.38.png?inst-v=7c2fb52b-f8d9-4d4a-8205-858e865d1efd)
The collection will then be available from the sidebar under "Collections":
![](../../__attachments/3314057274/Screenshot%202023-01-24%20at%2010.10.54.png?inst-v=7c2fb52b-f8d9-4d4a-8205-858e865d1efd)
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.
![](../../__attachments/3314057274/Screenshot%202023-01-24%20at%2010.12.52.png?inst-v=7c2fb52b-f8d9-4d4a-8205-858e865d1efd)
This can be done easily by going to the Variables tab of the collection and changing the current value of server
:
![](../../__attachments/3314057274/Screenshot%202023-01-24%20at%2010.14.05.png?inst-v=7c2fb52b-f8d9-4d4a-8205-858e865d1efd)
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 JATS API endpoints
Compare your first files
Please use the '/compare' endpoint mentioned in Content Compare JATS API endpoints .