Is there any way to retrieve a specific report using the API ?
Is there a way to download the report using the API in XLSX or CSV format?
Appreciate if you can share the snippet of the sample code that downloads the report using the API.
Thank you
Jay
Topics help categorize Community content and increase your ability to discover relevant content.
Hi Jay,
You can retrieve the report definition, but not the contents of the report. It would look something like this:
Step 1: Get the report definition
/attask/api/v11.0/ptlsec/{GUID}?fields=objObjCode,filter:*,groupBy:*,view:*
...this should give you a list of filter criteria, how it is grouped, and the columns in the view.
Step 2: Pull the same info (assuming no grouping)
/attask/api/v11.0/{1.objObjCode}/search?{mapped string from 1.filter response}&fields={mapped string from 1.view response}
Hope this is helpful.
CC. @Darin Patterson - inactive‚ ‚
Views
Replies
Total Likes
Hi Jeremy
Thanks for your response and help.
Step#1 gave me a response.
In Step#2, here's my request
/attask/api/v9.0/CUST/search?id=<A Customer ID>&sessionID=<My Session ID>
gives a response
{"error":{"message":null,"title":null,"msgKey":"exception.attask","attributes":[""],"code":0}}
Could you please let me know what I am missing ?Also, what does it mean "mapped string"?
Much appreciated.
Thank you
Jay
Views
Replies
Total Likes
You bet, Jay.
Going forward, I would suggest contacting our support team at 844-306-4357 to go through this in more detail and to answer any additional questions you have. (They are equipped with API resources who can further assist you and can schedule time with you.)
For now, I'm guessing it is because you are using version 9.0 of the API. Your "id" parameter is also supposed to be "ID" and you cannot search on the customer object. You have to search against any other object and pull in Customer details.
/attask/api/v11.0/USER/search?customerID={SOME_CUSTOMER_ID}&$$LIMIT=1&sessionID=...
On the first search we could probably be a bit more selective... we definitely don't need to pull in any reports with the "CUST" objCode. You might add a filter to the first query to return just reports created by the customer as native reports won't have custom data fields on them.
/attask/api/v11.0/ptlsec/{GUID}?objObjCode=CUST&fields=objObjCode,uiObjCode,filter:*,groupBy:*,view:*,definition
Here are a few other things to note:
Views
Replies
Total Likes
@JayRa1 did you manage to make it work? If so, what was you second query?
Views
Replies
Total Likes
Views
Like
Replies