Retrieving Data from Reports using WebApi

Hi,

I have played around a bit with the APi wondering if there is a way to get the data from the reports. 

Ok, so far I was able to get the reports, the specific id I needed for a report, and as well as I was able to return the collection of rows for the report.

All that is good but as for that  API call in the Reports API, when the collection of rows are returned for the Report its shows on the specific report  DataRows : null. 

Example: 

1. Authenticate & retrieve key

2. Used 1st API call in Reports API --> returns list of reports with ID and name 

3. Used 2nd API call in Reports API --> used Id parameter with ID I got from a specific report,  withData param set to true,  last param left alone.

     this returned the collection of rows.  It is here that I'm trying to figure out if there is a way for me to get the Data that are in those rows? 

below appears when 2nd API call is made.

"Description": "",

"MaxResults": 500,

[],

"ChartType": "None",

[],

"DataRows": null,  ----> SEE RIGHT HERE  is there a way to get data here or No

"ID": 7834,          -----> Example Id , not real ---> but this would be id I used in 2nd API call

"Name": "", ---> Name that contains report rows 

 

 

 

 

Tags web-api webapi API
Asked by yony fernandez on Fri 5/5/17 4:17 PM Last edited Mon 5/8/17 2:17 PM
Sign In to leave feedback or contribute an answer

Answers (5)

This answer has been marked as the accepted answer
yony fernandez Tue 5/9/17 10:08 AM

Hello again,

I see what you mean about the true parameter on the withData. But it only registers the call if I put the True within quotes. If I just type in True  it only returns the data columns  

Ex: 

withData={True} --> does nothing 

withData={"True"}--> returns data found within those columns. 

 

Thank you for your help, But I would suggest fixing that in the API. 

No feedback

Mark Sayers Mon 5/8/17 4:09 PM

So it looks like the parameter for DataRows is optional in the API call. The default value, if not otherwise set, is False. You would need to set this value to True in order to populate the returned report's collection of rows.

I think that will get you where you need to go when making your call.

Please let me know if this does not resolve your question.

Sincerely,
Mark Sayers
TeamDynamix

1 of 1 users found this helpful.

yony fernandez Tue 5/9/17 9:37 AM

Hi, 

I have set it To True as stated in my original question when it is true it only returns a collection of rows which are just the 

Columns to which the data is under. But the specific data does not show up for example. 

 

Buildings       Rooms    --> these are columns that show when dataRows set to true 

OMAL             255             --> this data is in the report but does not appear when appear the api calls.  I want this data

No feedback

yony fernandez Mon 5/8/17 4:00 PM

Hello Mark , 

Yes, I'm trying to figure out how to return the results of the report itself. 

Not sure why nothing appears, but what I do know now,  is that the result appears to be individual tickets. Which I have tracked and found but I'm not sure how they link back to the report. 

 

No feedback

Mark Sayers Mon 5/8/17 2:29 PM

Hi Yony,

Are you wanting to return the results of the report itself via the call you are attempting, or are you asking why the number that is supposed to be populated by DataRows is coming back "null" instead of having a number there?

Please let me know at your earliest convenience so I can better assist you.

Sincerely,
Mark Sayers
TeamDynamix

No feedback