Apigee 的高级 API 操作 (AAPI Ops) 提供了可帮助您确保 API 按预期正常运行的工具。AAPI Ops 会自动检测 API 流量中的异常模式(称为“异常值”),例如延迟时间或错误率激增。异常值可能表示 API 性能出现问题。当 AAPI Ops 检测到异常值时,您可以在异常值事件信息中心内查看其详细信息,然后采取相应措施来恢复正常的 API 行为。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-27。"],[[["\u003cp\u003eAAPI Ops, available for Apigee and Apigee hybrid, helps monitor API health by detecting unusual traffic patterns, known as anomalies, which may signal performance issues.\u003c/p\u003e\n"],["\u003cp\u003eWhen anomalies are detected, users can view details in the Anomaly Events dashboard to investigate the cause and take steps to restore normal API functionality.\u003c/p\u003e\n"],["\u003cp\u003eAAPI Ops allows users to create custom alerts and receive notifications via email, Slack, PagerDuty, or webhooks when incidents occur, ensuring prompt responses.\u003c/p\u003e\n"],["\u003cp\u003eEnabling and disabling AAPI Ops in an organization can be done via API calls, and it requires checking and including the existing add-ons configuration to prevent overwriting.\u003c/p\u003e\n"],["\u003cp\u003eUsing AAPI Ops requires the following assigned roles: \u003ccode\u003eroles/apigee.readOnlyAdmin\u003c/code\u003e, \u003ccode\u003eroles/logging.viewer\u003c/code\u003e, and \u003ccode\u003eroles/monitoring.viewer\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Advanced API Operations overview\n\n*This page\napplies to **Apigee** and **Apigee hybrid**.*\n\n\n*View [Apigee Edge](https://docs.apigee.com/api-platform/get-started/what-apigee-edge) documentation.*\n\nApigee's Advanced API Operations (AAPI Ops) provides tools to help you\nensure that your APIs stay up and running as intended. AAPI Ops automatically\ndetects unusual patterns in API traffic---called *anomalies*---such as\nspikes in latency or error rate. Anomalies can\nbe a sign of issues with your API's performance. When AAPI Ops detects an anomaly, you can\nview its details in the Anomaly Events dashboard and\ntake appropriate action to restore normal API behavior.\n| **Important:** \"Anomaly Detection\" describes the Advanced API Operations Anomaly Detection functionality, which is available in the Classic Apigee UI. This functionality is comparable to the \"Operations Anomalies\" functionality in [Apigee UI in Cloud console](https://console.cloud.google.com/apigee). Both are available at this time. See [Operations Anomalies overview](/apigee/docs/api-platform/analytics/operations-anomalies-overview) for information on the Operations Anomalies functionality.\n| **Note:** AAPI Ops is a paid add-on that extends the features of Apigee's API Monitoring. You can try out AAPI Ops in any trial org. Contact [Apigee](https://cloud.google.com/contact?direct=true&pre_product=apigee) to learn more.\n\nAAPI Ops enables you to:\n\n- [Detect anomalies](/apigee/docs/aapi-ops/anomaly-detect-ui): AAPI Ops reports unusual API events (anomalies) in the Anomaly Events dashboard.\n- [Investigate anomalies](/apigee/docs/aapi-ops/anomaly-detect-ui#viewing-anomalies-in-the-api-monitoring-dashboard): When AAPI Ops detects an anomaly, you can drill down to find out where and when the incident occurred, and what triggered it, so you can quickly remedy the situation.\n- [Create anomaly alerts](/apigee/docs/aapi-ops/create-alerts) and set up notifications to have Apigee send you a message when an incident occurs. You can receive notifications through multiple channels, including email, Slack, PagerDuty, or webhooks.\n\nTo learn more about anomalies, see [About anomaly detection](/apigee/docs/aapi-ops/about-anomaly-detection).\n\nRequired roles for AAPI Ops\n---------------------------\n\nTo use AAPI Ops, you need to be assigned the following roles:\n\n- `roles/apigee.readOnlyAdmin`\n- `roles/logging.viewer`\n- `roles/monitoring.viewer`\n\nSee [Apigee roles](https://cloud.google.com/iam/docs/understanding-roles#apigee-roles)\nto learn more.\n\nEnable AAPI Ops in an organization\n----------------------------------\n\nTo use AAPI Ops, you must enable it in your organization. Before doing so, first\n[obtain an OAuth 2.0\naccess token](/apigee/docs/api-platform/get-started/api-get-started#oauth20). You can then enable AAPI Ops using an API call that passes\nthe access token.\n\n### View the current add-ons configuration\n\nBefore enabling AAPI Ops, check to see whether is already enabled by making the\nfollowing API call: \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/YOUR_ORG\" \\\n -X GET \\\n -H \"Content-type: application/json\" \\\n -H \"Authorization: Bearer $TOKEN\"\n```\n\nwhere \u003cvar translate=\"no\"\u003eYOUR_ORG\u003c/var\u003e is the name of your organization and `$TOKEN` is the\nenvironment variable for an\n[OAuth access token](/apigee/docs/api-platform/get-started/api-get-started#oauth20).\nThis returns basic information\nabout your organization, which includes a section for Apigee add-ons that begins with the line: \n\n```\n\"addonsConfig\": {\n```\n\nCheck to see whether this section contains an entry that begins with\n`\"advancedApiOpsConfig\"`, like the following example: \n\n```\n\"advancedApiOpsConfig\": {\n \"enabled\": \"true\"\n }\n```\n\nIf this entry is present, AAPI Ops is already enabled in the organization. If not,\nyou need to enable it as described next.\n\n### Enable AAPI Ops\n\nTo enable AAPI Ops in the organization with the default configuration, issue a\n`POST` request like the one shown below.\n| **Caution:** This API call overwrites the current add-ons configuration. You must include the current configurations for all add-ons in the above request to prevent them from being overwritten.\n**Note:** The API call below starts a long running operation that may take a while to complete. \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/ORG:setAddons\" \\\n -X POST \\\n -H \"Authorization: Bearer $TOKEN\" \\\n -H \"Content-type: application/json\" \\\n -d '{\n \"addonsConfig\": {\n \"advancedApiOpsConfig\": {\n \"enabled\": \"true\"\n }\n \u003cCurrent add-ons configuration\u003e\n }\n }'\n```\n\nwhere \u003cvar translate=\"no\"\u003e<Current add-ons configuration>\u003c/var\u003e is the current add-ons\nconfiguration. You can find the current add-ons configuration\nin the response to the [call to view\nthe current add-ons configuration](#view-the-current-add-ons-configuration). For example, if the current add-ons configuration\nis \n\n```\n\"addonsConfig\": {\n \"integrationConfig\": {\n \"enabled\":\"true\"\n },\n \"monetizationConfig\": {\n \"enabled\":\"true\"\n }\n },\n```\n\nthe command to enable AAPI Ops would be\n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/YOUR_ORG:setAddons\" \\\n -X POST \\\n -H \"Authorization: Bearer $TOKEN\" \\\n -H \"Content-type: application/json\" \\\n -d '{\n \"addonsConfig\": {\n \"advancedApiOpsConfig\": {\n \"enabled\": \"true\"\n },\n \"integrationConfig\": {\n \"enabled\": \"true\"\n },\n \"monetizationConfig\": {\n \"enabled\": \"true\"\n }\n }\n }'\n```\n\nAfter you send the request, you will see a response like the following: \n\n```\n{\n \"name\": \"organizations/apigee-docs-d/operations/0718a945-76e0-4393-a456-f9929603b32c\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.apigee.v1.OperationMetadata\",\n \"operationType\": \"UPDATE\",\n \"targetResourceName\": \"organizations/apigee-docs-d\",\n \"state\": \"IN_PROGRESS\"\n }\n}\n```\n\nDisable AAPI Ops in your organization\n-------------------------------------\n\n\nIf for some reason you need to disable AAPI Ops in your organization,\nyou can do so by issuing a `POST` request, passing the add-ons\nconfiguration in your request body, as shown below.\n| **Caution:** The add-ons configuration that you pass in the request body will **overwrite** the current add-ons configuration. [View the current add-ons configuration](/apigee/docs/reference/apis/apigee/rest/v1/organizations/get) in the Apigee organization profile and be sure to include it in the request payload.\n**Note:** The API call below starts a long running operation that may take a while to complete. \n\n```\ncurl \"https://apigee.googleapis.com/v1/organizations/$ORG:setAddons\" \\\n -X POST \\\n -H \"Authorization: Bearer $TOKEN\" \\\n -H \"Content-type: application/json\" \\\n -d '{\n \"addonsConfig\": {\n \"advancedApiOpsConfig`\": {\n \"enabled\": \"false\"\n }\n \u003cInclude current add-ons configuration\u003e\n }\n }'\n```\n\n\nThe following provides an example of the response showing that the operation is in progress: \n\n```\n{\n \"name\": \"organizations/$ORG/operations/06274ffb-8940-41da-836d-781cba190437\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.apigee.v1.OperationMetadata\",\n \"operationType\": \"UPDATE\",\n \"targetResourceName\": \"organizations/$ORG\",\n \"state\": \"IN_PROGRESS\"\n }\n}\n```\n\n\nFor more information, see the [Configure organization add-ons API](https://cloud.google.com/apigee/docs/reference/apis/apigee/rest/v1/organizations/setAddons)."]]