GetFindingsTrendsV2 - Amazon Security Hub CSPM
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

GetFindingsTrendsV2

Returns findings trend data based on the specified criteria. This operation helps you analyze patterns and changes in findings over time.

Request Syntax

POST /findingsTrendsv2 HTTP/1.1 Content-type: application/json { "EndTime": "string", "Filters": { "CompositeFilters": [ { "NestedCompositeFilters": [ "FindingsTrendsCompositeFilter" ], "Operator": "string", "StringFilters": [ { "FieldName": "string", "Filter": { "Comparison": "string", "Value": "string" } } ] } ], "CompositeOperator": "string" }, "MaxResults": number, "NextToken": "string", "StartTime": "string" }

URI Request Parameters

The request does not use any URI parameters.

Request Body

The request accepts the following data in JSON format.

EndTime

The ending timestamp for the time period to analyze findings trends, in ISO 8601 format.

Type: Timestamp

Required: Yes

Filters

The filters to apply to the findings trend data.

Type: object

Required: No

MaxResults

The maximum number of trend data points to return in a single response.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 100.

Required: No

NextToken

The token to use for paginating results. This value is returned in the response if more results are available.

Type: String

Required: No

StartTime

The starting timestamp for the time period to analyze findings trends, in ISO 8601 format.

Type: Timestamp

Required: Yes

Response Syntax

HTTP/1.1 200 Content-type: application/json { "Granularity": "string", "NextToken": "string", "TrendsMetrics": [ { "Timestamp": "string", "TrendsValues": { "SeverityTrends": { "Critical": number, "Fatal": number, "High": number, "Informational": number, "Low": number, "Medium": number, "Other": number, "Unknown": number } } } ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Granularity

The time interval granularity for the returned trend data.

Type: String

Valid Values: Daily | Weekly | Monthly

NextToken

The token to use for retrieving the next page of results, if more trend data is available.

Type: String

TrendsMetrics

The collection of time-series trend metrics, including counts of findings by severity across the specified time period.

Type: Array of objects

Errors

For information about the errors that are common to all actions, see Common Errors.

AccessDeniedException

You don't have permission to perform the action specified in the request.

HTTP Status Code: 403

InternalServerException

The request has failed due to an internal failure of the service.

HTTP Status Code: 500

ThrottlingException

The limit on the number of requests per second was exceeded.

HTTP Status Code: 429

ValidationException

The request has failed validation because it's missing required fields or has invalid inputs.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific Amazon SDKs, see the following: