google-apigoogle-api-clientgoogle-api-ruby-clientdfareporting

DFA Reporting API v2.4 - list all reports or filter by name


I have a DFA account that has access to several hundred profiles from other accounts. Is there a way to get a list of all reports I have associated with a Profile, or at least filter by name? I want to keep a named Report for each Profile that I run every day, but I don't know how I'll find this named report through the API. It looks to me like the maximum number of reports a single reports/list API call can return is 10, and there's no way to filter by name. I'd prefer not to store the reportId's of each profile in a database, because my app currently isn't configured to store state per profile. It just seems strange to me that there would't be a way to get a report by name through the API - I'm hoping that I'm reading the documentation wrong somehow. Does anyone have a solution to this?

Things I've considered:

Docs for listing reports: https://developers.google.com/doubleclick-advertisers/reporting/v2.4/reports/list


Solution

  • By setting maxResults in your request you can decide how many rows you want returned per page. the value can be 0 - 10.

    If you have more then 10 then nextPageToken will be returned in the request. If you then send the nextPageToken you will get the next page of data. You can continue as long as there are nextPageToken's and more data.

    So if you want to find one specific report I sugest that you loop though your next links until you find it.