Highlighted
05 Base Camper

Re: API(s) for Prognosis?

there is no file named that in that location.
Highlighted

Re: API(s) for Prognosis?

Ok, then that is your starting point. You need to create a file in that directory and populate it with views you'd require Rest API access to.

e.g - In attached example, it lists all the devices available in PNODES record as defined in PrognosisNodeView that must exist as a persistent view.

RestApiDataSets.xml_.txt

If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
Highlighted
05 Base Camper

Re: API(s) for Prognosis?

great thanks, is this documented somewhere? I read through the PQL and the api documents and didn't see anything about having to create files.
Highlighted

Re: API(s) for Prognosis?

It was in the email Adam sent, but looks like the documentation fails to mention it. That document may not be most accurate or up to date, so keep reaching out and we'll make sure we get all the rest data available for you.

If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
Highlighted
05 Base Camper

Re: API(s) for Prognosis?

I follow your insteruction for API access https://server-name/Prognosis/rest/v1/data/

however, I am getting below error 

 

PrognoAPI error.png

 

The dataset setting looks good to me in RestApiDataSets.xml.

Can you guid me access the data using API?

Tags (1)
Highlighted

Re: API(s) for Prognosis?

@Amol 

 

if there is syntax error in the query inside your restapi xml file, then it may give that error. Can you try running the query manually (that you have in the dataset xml) to make sure it works fine on cmdline?

 

https://help.prognosis.com/prognosis/116/prognosis-rest-api-17236289.html 


If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
Highlighted
05 Base Camper

Re: API(s) for Prognosis?

@Shoaib_Dilawar 

As sugested by you I tried running the querries from CMD using ..\irpqlcli.

They are working fine as expected, see below.PrognoError.png

Highlighted

Re: API(s) for Prognosis?

@Amol,

 

sometime restarting IIS>PrognosisSite can reset the views. try that, if it doesn't work, you can open a support case, send us the dataset XML and we can have a look.


If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
Highlighted

Re: API(s) for Prognosis?

Hi @Amol ,

 

I was working with our support team on your issue and I am guessing you were not logged into prognosis when you tried to run that URL? To access REST objects, you first need to login to prognois webUI, otherwise server will come back as 500.

 

Once you log in, we were able to verify that your rest xml (same as out of box xml) loads fine. Look out for a closure from support team on this as well.


If my reply answered your question please click on the 'Accept as Solution' button to help others find the answer.
Thanks,
Shoaib
Highlighted

Re: API(s) for Prognosis?

The current Prognosis Online help document has the following statement about the REST API Authorization and Security:

"If the Rest API request contains the cookie that belongs to the existing Prognosis Web Application session, the cookie will be accepted and the role will be recognized and authenticated. Otherwise request is not coming from the existing Web Application session, and HTTP Basic authentication will be required in the REST request."

 

We will update this statement to clearly include the Prognosis Web Application login step to get REST API to work.

Thank you for bringing this to our attention.

Webinar: Keep the modern workforce connected

Unified Communications has always been an important part of companies' digital transformation efforts due to its ability to enable rich virtual collaboration and communication. But with COVID-19, we've reached a break-through point.

Join Bill Haskins, Sr. Analyst & Partner, Unified Communications at Wainhouse Research, and John Ruthven, CEO at IR discuss UC challenges companies are experiencing due to the COVOID-19 crisis.

Join webinar