How can I query report data from the WorkFront API? | Community
Skip to main content
June 22, 2018
Question

How can I query report data from the WorkFront API?

  • June 22, 2018
  • 1 reply
  • 1318 views
Reading though the "https://support.workfront.com/hc/en-us/articles/115003574147-API-Basics" rel="nofollow noreferrer">Workfront API documentation it seems to suggest that you can get report data: Requesting a Report You can perform a report request, where only the aggregate of some field is desired with one or more groupings. As shown in the following example, the report syntax is the same as the syntax for the SOAP API: GET /attask/api/v9.0/hour/report?project:name_1_GroupBy=true&hours_AggFunc=sum But this doesn't really make a lot of sense. For a start the URL hour/report seems to suggest that the report is somehow under "hour". But this seems to have no bearing on how the reports are structured in workfront. For example I have a report that has a URL: https://company.attask-ondemand.com/report/view?ID=44d8b92b39c4d59cb19aa7a349158134 This is located under Reports -> List of reports -> Report. It's not under anything. The statement: the report syntax is the same as the syntax for the SOAP API Seems confusing too. What SOAP API? I can't see any reference to this anywhere else. querying using the URL: https://comapny.preview.workfront.com/attask/api/v9.0/report/44d8b92b39c4d59cb19aa7a349158134?apiKey=fjhmnnfow3hgk0lgjb3a2yk4j9ilq49c Gives me the report table object , not the data from within the report . Tl;Dr I want to query the data out of a report. I have this reports id what REST url do I use to get this data?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Level 10
June 26, 2018
Hi Liam, I could be corrected, but my understanding is that the two 'report' functions are completely unrelated. The normal reports which you use via the regular web browser interface are specific for that access method. You can't run that same report via the API. Reports via the API are requests for for the system to summarise (aggregate) data for you, including sub-totals at grouping levels if required. You would use these when you need to get a sum/average etc for a certain object type (with filters applied) as an alternative to retrieving all the data and them aggregating it in an external system. In the URL (e.g. /hour/report) the 'hour' is the object type and 'report' is a request parameter ('search' is another option which returns non-aggregated data). Here's an example of an API report which sums the planned revenue for projects which are in Current status: https://company.my.workfront.com/attask/api/v9.0/proj/report?name_1_GroupBy=true&plannedRevenue_AggFunc=sum&status=CUR&$$ROLLUP=true&apiKey=ABC123 Hope that helps! Regards, David Cornwell Pentana Solutions