Method: projects.apps.generateAlertPolicy

Creates a Cloud Monitoring AlertPolicy for the requested Crashlytics Web alert type and returns the created resource reference.

HTTP request

POST https://firebasecrashlytics.googleapis.com/v1alpha/{name=projects/*/apps/*}:generateAlertPolicy

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The firebase application. Format: "projects/{project}/apps/{app_id}".

Request body

The request body contains data with the following structure:

JSON representation
{
  "alertType": enum (AlertType),
  "language": enum (Language)
}
Fields
alertType

enum (AlertType)

Required. The type of alert to create.

language

enum (Language)

Optional. Language to use for the alert policy. Defaults to USER_PREFERENCE.

Response body

Response message for the apps.generateAlertPolicy method.

If successful, the response body contains data with the following structure:

JSON representation
{
  "alertPolicy": string
}
Fields
alertPolicy

string

The created Cloud Monitoring AlertPolicy resource name. Format: "projects/{project}/alertPolicies/{alert_policy_id}".

Authorization scopes

Requires one of the following OAuth scopes:

  • https://www.googleapis.com/auth/cloud-platform
  • https://www.googleapis.com/auth/firebase

For more information, see the OAuth 2.0 Overview.

AlertType

Supported alert types for template generation.

Enums
ALERT_TYPE_UNSPECIFIED Unknown.
ALERT_TYPE_NEW_ISSUE Alert for newly detected issues.
ALERT_TYPE_REGRESSED_ISSUE Alert for regressed (reopened) issues.

Language

Language options for the generated alert policy.

Enums
USER_PREFERENCE Use the requester's language preference, falling back to en-US if unavailable or unsupported.
EN_US Force the alert policy to be created in en-US.