App Optimize API overview

Understand your Google Cloud spending and resource usage with App Optimize API. For developers and administrators, this API offers a programmatic way to fetch detailed cost and utilization data so that they can incorporate this information into their team's dashboards, tools, and daily workflows.

The API returns data in a structured, tabular format, similar to the results of a SQL query, making it straightforward to parse and ingest into other systems.

Why use App Optimize API?

You can export reports for projects and App Hub applications for trend analysis or to join with other business data. You might also use this API to power internal dashboards, drive custom alerting systems, or build checks for costs and utilization into your deployment pipelines.

These integrations help administrators and application developers make data-driven, cost-aware decisions throughout the software lifecycle.

Integrate with analysis tools

A primary use case is automating the regular export of cost and utilization data to an analysis tool. By setting up a scheduled job using Cloud Run and Cloud Scheduler, you can call the API daily to fetch the latest data.

Power custom dashboards

The API can also power custom internal dashboards. Instead of being limited to prebuilt console views, your teams can build web applications that lazy-load specific cost and utilization metrics on demand. Using JavaScript, the dashboard can call the API and remain responsive while data is fetched in the background. This provides a tailored view of cost and efficiency data embedded directly into your team's workflows.

Enable data-driven decisions

By integrating App Optimize API into your systems, you gain flexible and automated access to the data needed for effective cloud financial management and resource optimization. These programmatic access patterns help you to answer critical cost-efficiency questions. You can identify services with a recent spike in costs, find underutilized resources, calculate the precise cost of a particular application within a specific timeframe, or monitor spending trends across different products and regions.

Key features

App Optimize API includes the following key features:

  • Detailed reporting. Generate reports that aggregate data across various dimensions, including project, individual resource, SKU, timeframe, and App Hub application, service, and workload.
  • Cost and utilization data. Access a range of information such as monetary cost, CPU utilization (mean and 95th percentile), CPU core usage and allocation, memory utilization (mean and 95th percentile), and memory usage and allocation.
  • Flexible filtering. Use the Common Expression Language (CEL) to precisely filter the data included in your reports. You can filter based on time ranges, resource types, specific App Hub applications, and other available attributes to focus your analysis.

Understand the data

The reports generated by App Optimize API provide valuable insights, but it's important to understand the nature and limitations of the data. To learn more, see About cost and utilization data.

How App Optimize API works

The process for generating cost and usage reports has three main stages:

  1. Request a report. You specify the data you're interested in, including the time range, the resources or applications to cover, how to group the data, and the specific cost and usage details you want. After a report is created, its definition cannot be modified. If you need to change parameters, you must create a new report.
  2. Wait for the data to be prepared. Because gathering and organizing the data can take time, this step runs asynchronously. The API provides a way to check when your report is ready.
  3. Retrieve the report data. Once processing is finished, you can download the report, which is formatted in rows and columns based on your request.

Generated reports are automatically deleted from the API after 24 hours.

Pricing

During Preview, there is no additional cost for using App Optimize API, including creating reports, reading reports, and reading report metadata.

For information about costs that are associated with Google Cloud services that provide data to App Optimize API, refer to the following information:

What's next