This page applies to Apigee and Apigee hybrid.
View Apigee Edge documentation.
Apigee's Advanced API Operations (AAPI Ops) provides tools to help you ensure that your APIs stay up and running as intended. AAPI Ops automatically detects unusual patterns in API traffic—called anomalies—such as spikes in latency or error rate. Anomalies can be a sign of issues with your API's performance. When AAPI Ops detects an anomaly, you can view its details in the Anomaly Events dashboard and take appropriate action to restore normal API behavior.
AAPI Ops enables you to:
- Detect anomalies: AAPI Ops reports unusual API events (anomalies) in the Anomaly Events dashboard.
- Investigate anomalies: 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.
- Create anomaly 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.
To learn more about anomalies, see About anomaly detection.
Required roles for AAPI Ops
To use AAPI Ops, you need to be assigned the following roles:
roles/apigee.readOnlyAdmin
roles/logging.viewer
roles/monitoring.viewer
See Apigee roles to learn more.
Enable AAPI Ops in an organization
To use AAPI Ops, you must enable it in your organization. Before doing so, first obtain an OAuth 2.0 access token. You can then enable AAPI Ops using an API call that passes the access token.
View the current add-ons configuration
Before enabling AAPI Ops, check to see whether is already enabled by making the following API call:
curl "https://apigee.googleapis.com/v1/organizations/YOUR_ORG" \ -X GET \ -H "Content-type: application/json" \ -H "Authorization: Bearer $TOKEN"
where YOUR_ORG is the name of your organization and $TOKEN
is the
environment variable for an
OAuth access token.
This returns basic information
about your organization, which includes a section for Apigee add-ons that begins with the line:
"addonsConfig": {
Check to see whether this section contains an entry that begins with
"advancedApiOpsConfig"
, like the following example:
"advancedApiOpsConfig": { "enabled": "true" }
If this entry is present, AAPI Ops is already enabled in the organization. If not, you need to enable it as described next.
Enable AAPI Ops
To enable AAPI Ops in the organization with the default configuration, issue a
POST
request like the one shown below.
curl "https://apigee.googleapis.com/v1/organizations/ORG:setAddons" \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-type: application/json" \ -d '{ "addonsConfig": { "advancedApiOpsConfig": { "enabled": "true" } <Current add-ons configuration> } }'
where <Current add-ons configuration>
is the current add-ons
configuration. You can find the current add-ons configuration
in the response to the call to view
the current add-ons configuration. For example, if the current add-ons configuration
is
"addonsConfig": { "integrationConfig": { "enabled":"true" }, "monetizationConfig": { "enabled":"true" } },
the command to enable AAPI Ops would be
curl "https://apigee.googleapis.com/v1/organizations/YOUR_ORG:setAddons" \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-type: application/json" \ -d '{ "addonsConfig": { "advancedApiOpsConfig": { "enabled": "true" }, "integrationConfig": { "enabled": "true" }, "monetizationConfig": { "enabled": "true" } } }'
After you send the request, you will see a response like the following:
{ "name": "organizations/apigee-docs-d/operations/0718a945-76e0-4393-a456-f9929603b32c", "metadata": { "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata", "operationType": "UPDATE", "targetResourceName": "organizations/apigee-docs-d", "state": "IN_PROGRESS" } }
Disable AAPI Ops in your organization
If for some reason you need to disable AAPI Ops in your organization,
you can do so by issuing a POST
request, passing the add-ons
configuration in your request body, as shown below.
curl "https://apigee.googleapis.com/v1/organizations/$ORG:setAddons" \ -X POST \ -H "Authorization: Bearer $TOKEN" \ -H "Content-type: application/json" \ -d '{ "addonsConfig": { "advancedApiOpsConfig`": { "enabled": "false" } <Include current add-ons configuration> } }'
The following provides an example of the response showing that the operation is in progress:
{ "name": "organizations/$ORG/operations/06274ffb-8940-41da-836d-781cba190437", "metadata": { "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata", "operationType": "UPDATE", "targetResourceName": "organizations/$ORG", "state": "IN_PROGRESS" } }
For more information, see the Configure organization add-ons API.