> For the complete documentation index, see [llms.txt](https://help.impact.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.impact.com/other/zh/reference-documentation/jian-cha-bao-gao-de-api-ke-yong-xing.md).

# 检查报告的 API 可用性

并非 impact.com 上的所有报告都可通过 API 获取。每份报告的 API 访问权限都是单独设置的，而且可能随时间变化，因此最可靠的做法是检查报告的当前状态。以下步骤适用于品牌方和合作伙伴。

{% hint style="success" %}
**前提条件：** 完成这些步骤需要 API 访问令牌。了解如何 [创建 API 访问令牌](https://help.impact.com/other/zh/reference-documentation/api-access-tokens/create-an-api-access-token.md)，并阅读我们的提示，了解如何 [确保访问令牌安全](https://help.impact.com/other/zh/reference-documentation/api-access-tokens/keep-your-access-tokens-secure.md).
{% endhint %}

## 获取 API 凭据

1. [登录](https://help.impact.com/other/zh/reference-documentation/log-in-to-your-impactcom-account.md) 您的 impact.com 账户。
2. 在顶部导航栏中，选择 ![](https://2499487857-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhRN1rcrim887TwHLBjac%2Fuploads%2Fpmc2UIFakEHRS3pas1a0%2Fprofile.svg?alt=media\&token=87284fd9-5037-4062-ad5d-234b845664f5) **\[用户个人资料] → 设置**.
3. 在 *技术*下方，选择适用于您账户类型的 API 页面：
   * 品牌方页面： [**API**](https://app.impact.com/secure/advertiser/api/fr/api-access-tokens-ui.ihtml)
   * 合作伙伴页面： [**API**](https://app.impact.com/secure/mediapartner/api/fr/api-access-tokens-ui.ihtml)
4. 选择您要使用的访问令牌卡片。
5. 在 *凭据* 选项卡中，复制您的 *账户 SID* 和 *身份验证令牌* 值。您将在下一步中使用这些值。

## 列出账户可用的所有报告

1. 打开 API 客户端，例如 [Postman](https://www.postman.com/).
   * 或者，使用命令行工具，例如 macOS 上的“终端”或 Windows 上的 PowerShell。
2. 使用您的 *列出报告* 端点获取所有报告的列表：
   * 品牌方端点： [列出所有可用报告](https://integrations.impact.com/brand-api-reference/reference/report-export/reports-legacy)
   * 合作伙伴端点： [列出所有可用报告](https://integrations.impact.com/partner-api-reference/reference/reports/reports)
3. 将 `<AccountSID>` 和 `<AuthToken>` 占位符替换为您复制的值。
   * 响应会显示您账户可用的所有报告，包括无法通过 API 获取的报告。

## 检查特定报告的 API 可用性

1. 在响应中，查找您感兴趣的报告：扫描其 *名称或 ID*.
2. 检查报告的 `ApiAccessible` 字段值：
   * `true`：您可以通过 API 获取此报告。
   * `false`：目前无法通过 API 获取此报告。请了解如何在平台中下载或安排报告。
3. 以下是可通过合作伙伴 API 获取的报告响应示例：

   ```json
   {
     "Reports": [
       {
         "Name": "Action Listing",
         "Id": "ps_a_action_listing",
         "Category": "Performance",
         "Description": "Lists all actions for a date range.",
         "ApiAccessible": true,
         "ApiRunUri": "/Mediapartners/<AccountSID>/Reports/ps_a_action_listing",
         "DeferredApiRunUri": "/Mediapartners/<AccountSID>/ReportExport/ps_a_action_listing",
         "MetaDataUri": "/Mediapartners/<AccountSID>/ReportsMetadata/ps_a_action_listing"
       }
     ]
   }
   ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.impact.com/other/zh/reference-documentation/jian-cha-bao-gao-de-api-ke-yong-xing.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
