This document explains how to get the incident report for a Google Cloud incident using the Service Health API.
Incident reports are available for incidents that meet the following conditions:
- The incident has global impact or is affecting a significant percentage of customer projects across one or more regions.
- One or more products are unavailable or severely degraded.
Before you begin
- Set permissions to access the Service Health API.
- Get the event ID of the incident that you want to check for an incident report. You can get a list of closed incidents and find the ID of the incident.
Get the ID for the incident report
To get the incident report for an incident:
- Get the details for the incident.
Look for the following line in the JSON response:
"artifact": "projects/PROJECT_ID/locations/global/artifacts/ARTIFACT_ID",
Take note of the ARTIFACT_ID.
Get the content of the incident report
You can use the Get API to get the content of the incident report.
Before using any of the request data, make the following replacements:
- PROJECT_ID: your Google Cloud project ID.
- ARTIFACT_ID: the ID of the incident report.
HTTP method and URL:
GET https://servicehealth.googleapis.com/v1beta/projects/PROJECT_ID/locations/global/artifacts/ARTIFACT_ID
To send your request, expand one of these options:
You should receive a JSON response similar to the following:
{ "name": "projects/PROJECT_ID/locations/global/artifacts/ARTIFACT_ID", "content": { "markdown": "Content of the incident report.", }, "category": "ARTIFACT_CATEGORY_INCIDENT_REPORT", "createTime": "2022-10-18T18:00:05.690761Z", "updateTime": "2022-10-18T17:41:20.112287Z", }
If you don't have the permissions to get incident reports, you will get the following
PERMISSION_DENIED
error.
{
"error": {
"code": 403,
"message": "Permission 'servicehealth.artifacts.get' denied on resource '//servicehealth.googleapis.com/projects/PROJECT_ID/locations/global/artifacts/ARTIFACT_ID' (or it may not exist).",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"reason": "IAM_PERMISSION_DENIED",
"domain": "servicehealth.googleapis.com",
"metadata": {
"resource": "projects/PROJECT_ID/locations/global/artifacts/ARTIFACT_ID",
"permission": "servicehealth.artifacts.get"
}
}
]
}
}
To fix the error, set the required permissions.