Closed pedromss closed 5 years ago
You can fetch the differences via the json api used to power the UI.
Take a look at https://github.com/opendiffy/diffy/blob/master/src/main/scala/ai/diffy/ApiController.scala
Let me know if you have something else in mind.
Just discovered the JSON API last night while looking at the code. My first suggestion here would be to include this API in the README so people know it exists.
Looking at the API it appears one can:
/api/1/endpoints/:endpoint/stats
/api/1/endpoints/:endpoint/fields/:path/results
The next step for this would be to include 2 buttons in the UI + 1 more endpoint:
As mentioned before the use case for this is to be able to reset Diffy keeping the differences data. The upload button is so people can see the old differences they downloaded in the UI which is a nicer way to view the differences, especially if you are presenting to more people.
If for some reason I'm missing something and one can already download and upload the differences currently in memory, please let me know.
Is there a way to get a representation of the differences?
If not, is this something you would accept? Perhaps through an HTTP endpoint?
The use case for this is to be able to reset Diffy but keep the data regarding the differences.