We created an api which allows you to access the GraphViz visualisation for a list of ID's. This api is accessed using a post request with the following parameters:
Using this url: https://onto-spread-ed.ew.r.appspot.com/api/openVisualiseAcrossSheets
var data = new FormData();
data.append("idList", "ADDICTO:0000323 ADDICTO:0000322 ADDICTO:0000324 ADDICTO:0000967 ADDICTO:0000325 ADDICTO:0000326");
data.append("repo", "AddictO");
var xhr = new XMLHttpRequest();
xhr.withCredentials = false;
xhr.addEventListener("readystatechange", function() {
if(this.readyState === 4) {
//render returned html in the same page:
var newHTML = document.open("text/html");
newHTML.write(this.responseText);
newHTML.close();
}
});
xhr.open("POST", "https://onto-spread-ed.ew.r.appspot.com/api/openVisualiseAcrossSheets");
xhr.send(data);
We have created a Postman "collection" sample request. When imported into the "Postman" application, this can be used to test out the api. Postman can also be used to generate request code in a number of languages. The postman application can be found here. See this article to learn more about how to generate code snippets with Postman.
Click on the button to create a form dynamically, then press "Submit" to access the visualisation for the selected ids.