Aristotle API usage - java and miscellaneous

Hello Community!

I’ve been wondering if there are any folk out there who have made use of the Aristotle API using java.
I have some old code used to generate some pretty detailed Data Set reports in pdf format, and thought it might be fun to build a connector to Aristotle to draw this required information.

I’m new here, so apologies if there might already be a repository for code snippets :grinning:

Also, just to throw in something out of left field. Has anyone made a call to the API using VBA? I have a simple Object Class going using the MSXML2.XMLHTTP60 object, but haven’t figured out how I’d attach a token to something like this.

Hi Michael,

Thanks for such an interesting question. I work for Aristotle Cloud Services Australia.

The connector sounds like a great idea! We don’t currently have a repository for code snippets for interacting with the API, but you should be able to use any Java request library to interact with our API.

Regarding attaching a token for your VBA question, all you need to do is set the Authorization HTTP Header to Token {YOUR TOKEN} during the setup of your VBA request. Based on a quick look into VBA, the relevant method on your MSXML2.XMLHTTP60 object is called setRequestHeader.

Here’s a quick code snippet to show what it looks like:

xmlhttp.setRequestHeader "Authorization", "Token {YOUR_TOKEN_HERE}"

Here’s the StackOverflow question that I was referring to for this:

Again, thanks for such an interesting question. If you have anything to follow up, feel free to keep the conversation going!

Thanks, I’ll throw a few test calls into the ether and see how it runs.

1 Like

@Michael how did those test calls go?

Hi silke,

Yes that did it:
xmlhttp.setRequestHeader “Authorization”, “Token blahblahblahblahblahblahblahblahblahblah”

So I’m getting json back, it’s just a matter of parsing the results now.

Looking into triggering a request like this via a SQL Server stored procedure, but I have permission issues to sort out before I can attempt it :wink: