The Campaign Manager 360 API provides several ways to retrieve data for ads trafficked through Campaign Manager 360.
Reports service
Generating reports using the Reports service
involves a multi-step workflow to configure, generate, and retrieve report files
(such as CSV or Excel format). This is the standard reporting path for the
Campaign Manager 360 API and is suitable for large datasets, automated scheduled scripts,
or downstream applications that consume files.
The workflow typically consists of the following steps:
- Define or locate a
Reportresource (specifying dimensions, metrics, date ranges, and filters) which is saved with a unique report ID. See Create and Update Reports. - Run report generation by calling the
reports.runmethod. This queues the report run and returns a placeholderFileresource. See Find and Run Reports. - Periodically check the
Fileresource's status. Because this process runs asynchronously, a file's status will start asPROCESSINGand transition toREPORT_AVAILABLEwhen complete. See Find and Run Reports. - Fetch the file content (CSV or Excel) once the report generation is complete. See Download Reports.
Run reports synchronously
If you need to generate a report file (CSV or Excel) for a small amount of data,
you can run the report synchronously by calling the
reports.run method with the synchronous parameter set
to true. The API attempts to generate the report within a brief timeout
period. If execution takes longer, the report run automatically falls back to
the asynchronous queue.
For more details, see Synchronous Reports.
Query report data
Use the reportData.query method to query
reporting data directly instead of generating a report file.
- Instead of creating and saving a
Reportresource, you specify dimensions, metrics, and other filtering or sorting criteria directly in the request. - The response contains structured report data, eliminating the need to poll for and download a generated file.
- The request executes synchronously with a 60-second limit.
For more details, see Query JSON Report Data.