# Reports (Legacy)

## List all reports

> Returns the full catalog of reports available to your agency. Each report record indicates whether it is runnable via the API and exposes the URIs to run it synchronously (\`ApiRunUri\`), export it asynchronously (\`DeferredApiRunUri\`), or fetch its metadata (\`MetaDataUri\`).

```json
{"openapi":"3.1.0","info":{"title":"Agency API — Reports","version":"2.0"},"tags":[{"name":"Reports (Legacy)","description":"Legacy synchronous reports endpoint. Subject to pagination limits — prefer `ReportExport` for large datasets."}],"servers":[{"url":"https://api.impact.com","description":"Production"}],"paths":{"/Agencies/{AccountSID}/Reports":{"get":{"operationId":"listAllReports","summary":"List all reports","description":"Returns the full catalog of reports available to your agency. Each report record indicates whether it is runnable via the API and exposes the URIs to run it synchronously (`ApiRunUri`), export it asynchronously (`DeferredApiRunUri`), or fetch its metadata (`MetaDataUri`).","tags":["Reports (Legacy)"],"parameters":[{"name":"AccountSID","in":"path","required":true,"description":"Your Agency Account SID.","schema":{"type":"string"}}],"responses":{"200":{"description":"A list of report definitions.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Report"}}}}},"401":{"description":"Unauthorized. Check that your Account SID and Auth Token are correct."}}}}},"components":{"schemas":{"Report":{"type":"object","description":"A single report definition in the report catalog.","properties":{"Name":{"type":"string","description":"The human-readable name of the report."},"Id":{"type":"string","description":"The unique identifier of the report on impact.com. Use this as the `ReportId` path parameter when running or exporting the report. May not be present for some web-only reports."},"Category":{"type":"string","description":"The category the report belongs to. Categories group reports by purpose in the impact.com UI.\n\nAdditional categories may exist beyond the values listed below.","enum":["Admin","Beta","Compliance","Cross-Program","Custom","Finance","Insights","Listing","Operations","Partner","Performance"]},"Description":{"type":"string","description":"A short explanation of the data this report shows."},"ApiAccessible":{"type":"boolean","description":"Whether this report can be run via the API. When `false`, only `RunUri` (web app URL) is populated; the report can only be run from the impact.com UI."},"ApiRunUri":{"type":"string","format":"uri-reference","description":"The relative URI to run the report synchronously via the legacy `GET /Reports/{ReportId}` endpoint. Present when `ApiAccessible` is `true`."},"DeferredApiRunUri":{"type":"string","format":"uri-reference","description":"The relative URI to export the report asynchronously via the `GET /ReportExport/{ReportId}` endpoint. Present when `ApiAccessible` is `true`.\n\n**Recommended** over `ApiRunUri` for any non-trivial report."},"MetaDataUri":{"type":"string","format":"uri-reference","description":"The relative URI to retrieve the report's metadata (filters and attributes). Present when `ApiAccessible` is `true`."},"RunUri":{"type":"string","format":"uri-reference","description":"The relative URI to run the report in the impact.com web app. Present when `ApiAccessible` is `false` — these reports cannot be run via API."}}}}}}
```

## Run a report

> Runs a report and returns the records synchronously.\
> \
> \> \*\*Legacy endpoint.\*\* This endpoint has pagination limits and may be rate-limited or capped on result size. For large datasets, use \`GET /ReportExport/{ReportId}\` instead, which schedules an asynchronous job and produces a downloadable result file.\
> \
> \## Page size is fixed\
> \
> As of October 2023, \`/Reports\` enforces a fixed \`PageSize\` of \*\*20,000 records\*\* per response. Any \`PageSize\` value you pass is silently overridden. For larger datasets, use \`ReportExport\`.\
> \
> \## Record values are returned as JSON strings\
> \
> All record field values are returned as JSON strings, even when the report's metadata declares them as \`Decimal\`, \`Integer\`, \`Boolean\`, or \`Date\`. For example, a \`Decimal\` field returns \`"5.000000000000000000"\` (string), not \`5.0\` (number). Cast on the client side as needed — use \`MetaData.Attributes\[].DataType\` to know the intended type.\
> \
> \## Filter parameters\
> \
> Filter parameters vary per report — call \`GET /Reports/{ReportId}/MetaData\` to discover which are supported. Convert each filter \`Name\` to uppercase with underscores (\`"Start Date"\` → \`START\_DATE\`) when passing as a query parameter.

```json
{"openapi":"3.1.0","info":{"title":"Agency API — Reports","version":"2.0"},"tags":[{"name":"Reports (Legacy)","description":"Legacy synchronous reports endpoint. Subject to pagination limits — prefer `ReportExport` for large datasets."}],"servers":[{"url":"https://api.impact.com","description":"Production"}],"paths":{"/Agencies/{AccountSID}/Reports/{ReportId}":{"get":{"operationId":"runReport","summary":"Run a report","description":"Runs a report and returns the records synchronously.\n\n> **Legacy endpoint.** This endpoint has pagination limits and may be rate-limited or capped on result size. For large datasets, use `GET /ReportExport/{ReportId}` instead, which schedules an asynchronous job and produces a downloadable result file.\n\n## Page size is fixed\n\nAs of October 2023, `/Reports` enforces a fixed `PageSize` of **20,000 records** per response. Any `PageSize` value you pass is silently overridden. For larger datasets, use `ReportExport`.\n\n## Record values are returned as JSON strings\n\nAll record field values are returned as JSON strings, even when the report's metadata declares them as `Decimal`, `Integer`, `Boolean`, or `Date`. For example, a `Decimal` field returns `\"5.000000000000000000\"` (string), not `5.0` (number). Cast on the client side as needed — use `MetaData.Attributes[].DataType` to know the intended type.\n\n## Filter parameters\n\nFilter parameters vary per report — call `GET /Reports/{ReportId}/MetaData` to discover which are supported. Convert each filter `Name` to uppercase with underscores (`\"Start Date\"` → `START_DATE`) when passing as a query parameter.","tags":["Reports (Legacy)"],"parameters":[{"name":"AccountSID","in":"path","required":true,"description":"Your Agency Account SID.","schema":{"type":"string"}},{"name":"ReportId","in":"path","required":true,"description":"The unique ID of the report to run.","schema":{"type":"string"}},{"name":"START_DATE","in":"query","required":false,"description":"The start date (inclusive) for the report data, in `YYYY-MM-DD` format. Required by most reports.","schema":{"type":"string","format":"date"}},{"name":"END_DATE","in":"query","required":false,"description":"The end date (inclusive) for the report data, in `YYYY-MM-DD` format. Required by most reports.","schema":{"type":"string","format":"date"}},{"name":"SUBAID","in":"query","required":false,"description":"A program (campaign) ID to refine the report.","schema":{"type":"string"}},{"name":"RQueryIDx","in":"query","required":false,"description":"For reports with multiple result tables, selects which table to return (0-indexed).","schema":{"type":"integer","default":0}}],"responses":{"200":{"description":"**Success** — a list of report record objects. Each record's field set depends on the report — refer to `MetaData.Attributes` for column descriptions.\n\n**Error** — invalid input is returned as HTTP 200 with an error envelope (`{\"Status\":\"ERROR\",\"Message\":\"...\"}`). Always check the `Status` field.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true,"description":"A single report record. Field names match the report's `MetaData.Attributes`."}}}}},"401":{"description":"Unauthorized. Check that your Account SID and Auth Token are correct."}}}}}}
```

## Get report metadata

> Returns the metadata for a single report — its filters (input parameters) and attributes (output columns). Use this to discover which query parameters a report accepts before running or exporting it.

```json
{"openapi":"3.1.0","info":{"title":"Agency API — Reports","version":"2.0"},"tags":[{"name":"Reports (Legacy)","description":"Legacy synchronous reports endpoint. Subject to pagination limits — prefer `ReportExport` for large datasets."}],"servers":[{"url":"https://api.impact.com","description":"Production"}],"paths":{"/Agencies/{AccountSID}/Reports/{ReportId}/MetaData":{"get":{"operationId":"getReportMetadata","summary":"Get report metadata","description":"Returns the metadata for a single report — its filters (input parameters) and attributes (output columns). Use this to discover which query parameters a report accepts before running or exporting it.","tags":["Reports (Legacy)"],"parameters":[{"name":"AccountSID","in":"path","required":true,"description":"Your Agency Account SID.","schema":{"type":"string"}},{"name":"ReportId","in":"path","required":true,"description":"The unique ID of the report whose metadata to retrieve.","schema":{"type":"string"}}],"responses":{"200":{"description":"The metadata object for the requested report.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportMetadata"}}}},"401":{"description":"Unauthorized. Check that your Account SID and Auth Token are correct."}}}}},"components":{"schemas":{"ReportMetadata":{"type":"object","description":"Metadata describing a single report's accepted filters (input parameters) and returned attributes (output columns).","properties":{"Name":{"type":"string","description":"The human-readable name of the report."},"Id":{"type":"string","description":"The unique identifier of the report on impact.com."},"Description":{"type":"string","description":"A short explanation of the data this report shows."},"Filters":{"type":"array","description":"The filter parameters this report accepts as query parameters. Filter names from this list (uppercased with underscores, e.g., `Start Date` → `START_DATE`) are passed as query parameters to the `Reports/{ReportId}` or `ReportExport/{ReportId}` endpoints.","items":{"$ref":"#/components/schemas/ReportFilter"}},"Attributes":{"type":"array","description":"The output columns this report returns. Each entry describes one field of each record in the report results.","items":{"$ref":"#/components/schemas/ReportAttribute"}},"RunUri":{"type":"string","format":"uri-reference","description":"The relative URI to run the report."},"Uri":{"type":"string","format":"uri-reference","description":"The relative URI of this metadata resource."}}},"ReportFilter":{"type":"object","description":"A single filter parameter that a report accepts.","properties":{"Name":{"type":"string","description":"The display name of the filter as shown in the impact.com UI (e.g., `\"Start Date\"`). When passing the filter as a query parameter, convert it to uppercase with underscores in place of spaces — `\"Start Date\"` becomes `START_DATE`."},"DataType":{"type":"string","description":"The data type the filter accepts.","enum":["Boolean","Date (yyyy-MM-dd'T'HH:mm:ssZZ)","Decimal","Integer","String"]},"Format":{"type":"string","description":"An optional input format constraint. When empty, no specific format is enforced beyond the data type.","enum":["yyyy-MM-dd",""]}}},"ReportAttribute":{"type":"object","description":"A single output column that a report returns.","properties":{"Name":{"type":"string","description":"The field name as it appears in the report records."},"DataType":{"type":"string","description":"The data type of this field.","enum":["Boolean","Date (yyyy-MM-dd'T'HH:mm:ssZZ)","Decimal","Integer","String"]},"Description":{"type":"string","description":"A short description of what this field represents. May be empty."}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://integrations.impact.com/agency-v3/agency-v2/reference/reportexport/reports-legacy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
