#915 Integration through REST API in JAVA


Hi ,

I am new to Haystack platform , My query is : how to Integrate to Haystack Connection through using "REST API" . Please provide me the details/Example, so i can understand & use this platform.

Thanks & Regards Gaurav Sahu

Chris Breederveld Fri 7 May

Hi Gaurav,

You may want to look into the haystack-java library, and take a look at the detailed documentation


Hi Chris Breederveld,

I have gone through the detail documentation but one of the link of Rest API page (https://project-haystack.org/doc/Rest) is not getting open. It gives 404 not Found error.

Please Guide me regarding the same.

Thanks & Regards Gaurav Sahu

Chris Breederveld Sat 8 May

Hi Gaurav,

I think that link should now point to this location because things have moved around a bit with the new docs setup.


Hi Chris Breederveld,

I am new to this "Haystack" integration ,i have read and also gone through the docs, details & Example of Skyfoundry "https://github.com/skyfoundry/haystack-java" , i am phasing some complication to understand and about how to connect & Use the Haystack Tagging/features to the project. I need your help to understand that how could i use it and can you please provide me some demo videos in Java platform through REST API , So i can able to understand the structure that how it is Connecting , working and how can apply tagging to the projects.

Thanks & Regards Gaurav Sahu

Chris Breederveld Mon 14 Jun

HI Gaurav,

It is a bit hard for me to gauge your level of knowledge and where you need help exactly, but I'll try to give you some general pointers and then perhaps you can give me a bit more detail what topics you are exactly struggling with. Also I would like to know which Haystack server you are working with, this might also help with providing more specific resources.

Haystack ontology

To get some overall insight about the tagging mechanism in Haystack I can recommend this video which explains the current v4 standard (under review at the time of this video): https://www.youtube.com/watch?v=5kZZW1HCMwA

Haystack API authentication

It depends a bit what system you are connecting to, but most implementations use the SCRAM authentication method, all described in this documentation. In the Java library you can set up such a connection using this code:

HClient client = HClient.open("http://localhost/api/demo", "user", "pass");
client.about(); // <- gets some basic info, useful to test your connection.

Haystack operations

The Java client has functions like pointWrite to write records and hisRead to read historic information. You can use filters like point and equipRef->elec in function onReadAll to get a list of filtered items.

HGrid grid = client.onReadAll("point and equipRef->elec");
for (int i = 0; i < grid.numRows(); i++) {
  HRow row = grid.row(i);


HI ,

Can we directly import & run this example project given "https://github.com/skyfoundry/haystack-java" code for basic understanding in tomcat server to see how its workflow structure???

Thanks & Regards Gaurav Sahu

Login or Signup to reply.