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
Answers (5)
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.
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
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
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.
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