List Composer recipe results

Returns the results of one Composer recipe: one finding per affected resource, with the resource's account, region, tags and cost metrics. An unknown recipe, one your customer isn't entitled to, and a dismissed recipe all return 200 with an empty items list and rowCount: 0.

By default (last_scan_only:true) only results reported by the most recent scan of each recently scanned account are returned. A resolved result keeps the ID of the last scan that reported it, so resolved results rarely appear by default; add last_scan_only:false to include them and results from earlier scans. rowCount can therefore be lower than the recipe's totalResultsCount. Results are sorted by detection_time, descending, by default. Ties break by id.

filter is one string of key:value clauses: , separates alternative values for one key (OR) and | separates keys (AND), for example region:us-east-1,us-west-2|status:active. Because , and | are separators, a value itself can't contain them. Supported keys:

  • account_id: one or more cloud account IDs, matched exactly.
  • region: one or more cloud regions, matched exactly.
  • issued_resource_name: one or more names of the affected resource, matched exactly.
  • related_resource_name: one or more names of related resources (for example an attached IAM policy), each matched as a substring anywhere in the result's related-resource details.
  • status: exactly one of active (not resolved and not snoozed), snoozed, resolved or all. Omitting it is the same as all. Combine resolved with last_scan_only:false; with the default it usually returns nothing.
  • last_scan_only: exactly one of true or false. Defaults to true, which returns only results reported by each recently scanned account's most recent scan, and so rarely includes resolved results. false returns results from every scan and account, including resolved ones.
  • allocation: up to 10 distinct allocation IDs from GET /analytics/v1/allocations. Returns only results on resources in any of those allocations. An allocation you can't view returns 404; if access can't be checked, the request returns 503 rather than unfiltered data.

Requests are always served for the customer your API token belongs to.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
int64
required
≥ 1

ID of the Composer recipe whose results to list. Get recipe IDs from GET /insights/v2/recipes.

Query Params
integer
1 to 500
Defaults to 50

Maximum number of items to return on one page, from 1 to 500. Defaults to 50. A value outside that range returns 400 validation_failed.

string

Continuation token from the pageToken of the previous response. Omit it on the first request; a response without pageToken is the last page.

The token records the position, the sort and the allocation filter IDs. Changing sortBy, sortOrder or the allocation IDs while paginating returns 400 pagination_token_invalid. Keep the other filter keys and maxResults unchanged while paginating. Tokens expire 5 minutes after they are issued; an expired token returns 400 pagination_token_expired. In both cases, restart from the first page.

string
enum
Defaults to detection_time

Field to sort results by. Defaults to detection_time. Ties break by id (ascending), whatever the sortOrder.

Show Details
detection_timeSort by when the result was first detected.
resolved_timeSort by when the result was resolved.
account_idSort by cloud account ID.
regionSort by cloud region.
resource_classSort by the affected resource's type.
cost_estimation_potential_savingsSort by potential cost savings. Results without an estimate sort last when descending and first when ascending.
cost_estimation_potential_increased_costsSort by cost avoidance. Results without an estimate sort last when descending and first when ascending.
cost_estimation_potential_freed_commitmentsSort by freed commitments. Results without an estimate sort last when descending and first when ascending.
cost_estimation_potential_increased_commitments_requiredSort by avoidable commitments. Results without an estimate sort last when descending and first when ascending.
string
enum
Defaults to desc

Sort direction for sortBy. Defaults to desc.

Show Details
ascSmallest, earliest or lowest first (for `severity`, low first).
descLargest, latest or highest first (for `severity`, critical first). Default.
Allowed:
string

Restricts the results returned. One string of key:value clauses: , separates alternative values for one key (OR) and | separates keys (AND). For example, region:us-east-1,us-west-2|status:active returns active results in either region. Because , and | are separators, a value itself can't contain them. Matching is exact unless a key says otherwise. Omit filter to list the recipe's results from the most recent scan of each recently scanned account, in every status.

Keys:

  • account_id: one or more cloud account IDs, matched exactly.
  • region: one or more cloud regions, matched exactly.
  • issued_resource_name: one or more names of the affected resource, matched exactly.
  • related_resource_name: one or more names of resources related to the result (for example, an attached IAM policy). Each value is matched as a substring anywhere in the result's related-resource details, not only against names.
  • status: exactly one of active (not resolved and not snoozed), snoozed, resolved or all. Omitting it is the same as all. Combine resolved with last_scan_only:false; with the default it usually returns nothing.
  • last_scan_only: exactly one of true or false. Defaults to true, which returns only results reported by each recently scanned account's most recent scan. A resolved result keeps the ID of the last scan that reported it, so resolved results rarely appear by default. false returns results from every scan and account, including resolved ones.
  • allocation: up to 10 distinct allocation IDs (duplicates are ignored); get allocation IDs from GET /analytics/v1/allocations. Matches results on resources in any of those allocations, as resolved by Cloud Analytics; rowCount then counts only those results. You must be able to view every listed allocation. Service-account API keys can use public allocations only. If allocation access can't be checked, the request returns 503 with Retry-After and never falls back to unfiltered data.

Errors:

  • An unknown key returns 400 filter_key_not_supported when it's the only problem, otherwise 400 validation_failed.
  • A status outside the allowed list, a non-boolean last_scan_only, more than one status or last_scan_only value, more than 10 distinct allocation IDs, an invalid allocation ID (blank, longer than 256 characters, or containing /, whitespace or control characters), a malformed expression or an unsupported operator returns 400 validation_failed.
  • An allocation that doesn't exist or that you can't view returns 404 composer-api.allocation_not_found.
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json