Is there a concrete example of using the Haystack API in Niagara to read a data point?
Richard McElhinneyWed 2 Jun 2021
Hi Ian,
Can you clarify what you are looking for?
Are you looking for code?
A Niagara Station?
A SkySpark project?
Something else?
Cheers, Richard
Ian BonadeoThu 3 Jun 2021
Hi Richard,
Thanks for the reply. I have a Niagara Station and I want to bring that data to an remote web server where I have a dashboarding UI.
Let's say I have a point called "Ramp" where n:name="Ramp".
My station url is http://station.com.
What would the script be to subscribe to the Ramp point from my dashboard HTML server?
Thanks! -Ian
Ian BonadeoFri 4 Jun 2021
I suppose I am looking for an ops example to read a point.
Richard McElhinneyWed 1 Sep 2021
Hi Ian,
The first thing to understand is that you in your post above you have used a NEQL query. Haystack and NEQL queries are slightly different and NEQL queries are not supported via the REST API.
If you wish to do a single Read on a point then you should look at the Read Op in the Haystack REST API.
If you wish to subscribe to a point via the REST API then you should look at the Watch Ops (there are multiple endpoints).
For reading histories or trend log data then there is the HisRead Op.
Have a look at the documentation and let me know if doesn't make sense.
Ian Bonadeo Fri 28 May 2021
Is there a concrete example of using the Haystack API in Niagara to read a data point?
Richard McElhinney Wed 2 Jun 2021
Hi Ian,
Can you clarify what you are looking for?
Are you looking for code?
A Niagara Station?
A SkySpark project?
Something else?
Cheers, Richard
Ian Bonadeo Thu 3 Jun 2021
Hi Richard,
Thanks for the reply. I have a Niagara Station and I want to bring that data to an remote web server where I have a dashboarding UI.
Let's say I have a point called "Ramp" where n:name="Ramp".
My station url is http://station.com.
What would the script be to subscribe to the Ramp point from my dashboard HTML server?
Thanks! -Ian
Ian Bonadeo Fri 4 Jun 2021
I suppose I am looking for an ops example to read a point.
Richard McElhinney Wed 1 Sep 2021
Hi Ian,
The first thing to understand is that you in your post above you have used a NEQL query. Haystack and NEQL queries are slightly different and NEQL queries are not supported via the REST API.
If you wish to do a single Read on a point then you should look at the Read Op in the Haystack REST API.
If you wish to subscribe to a point via the REST API then you should look at the Watch Ops (there are multiple endpoints).
For reading histories or trend log data then there is the HisRead Op.
Have a look at the documentation and let me know if doesn't make sense.