v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-1361531.3 KB
projects

Report an individual error event and record the event to a log. This endpoint accepts either an OAuth token, or an API key for authentication. To use an API key, append it to the URL as the value of a key parameter. For example: POST https://clouderrorreporting.googleapis.com/v1beta1/{projectName}/events:report?key=123ABC456 Note: [Error Reporting] (https://cloud.google.com/error-reporting) is a service built on Cloud Logging and can analyze log entries when all of the following are true: * Customer-managed encryption keys (CMEK) are disabled on the log bucket. * The log bucket satisfies one of the following: * The log bucket is stored in the same project where the logs originated. * The logs were routed to a project, and then that project stored those logs in a log bucket that it owns.

post/v1beta1/{+projectName}/events:report

Path parameters

projectNamestring required

Required. The resource name of the Google Cloud Platform project. Written as projects/{projectId}, where {projectId} is the Google Cloud Platform project ID. Example: // projects/my-project-123.

Request body

messagestring

Required. The error message. If no context.reportLocation is provided, the message must contain a header (typically consisting of the exception type name and an error message) and an exception stack trace in one of the supported programming languages and formats. Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. Supported stack trace formats are: * Java: Must be the return value of Throwable.printStackTrace(). * Python: Must be the return value of traceback.format_exc(). * JavaScript: Must be the value of error.stack as returned by V8. * Ruby: Must contain frames returned by Exception.backtrace. * C#: Must be the return value of Exception.ToString(). * PHP: Must be prefixed with "PHP (Notice|Parse error|Fatal error|Warning): " and contain the result of (string)$exception. * Go: Must be the return value of debug.Stack().

eventTimestring google-datetime

Optional. Time when the event occurred. If not provided, the time when the event was received by the Error Reporting system is used. If provided, the time must not exceed the logs retention period in the past, or be more than 24 hours in the future. If an invalid time is provided, then an error is returned.

Response

Successful response