Retrieve a report using API | Community
Skip to main content
November 12, 2020
Question

Retrieve a report using API

  • November 12, 2020
  • 1 reply
  • 998 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

jerflo
Adobe Employee
Adobe Employee
November 12, 2020

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‚ ‚

JayRa1Author
November 16, 2020

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

June 3, 2024

@jayra1 did you manage to make it work? If so, what was you second query?