1<html><body> 2<style> 3 4body, h1, h2, h3, div, span, p, pre, a { 5 margin: 0; 6 padding: 0; 7 border: 0; 8 font-weight: inherit; 9 font-style: inherit; 10 font-size: 100%; 11 font-family: inherit; 12 vertical-align: baseline; 13} 14 15body { 16 font-size: 13px; 17 padding: 1em; 18} 19 20h1 { 21 font-size: 26px; 22 margin-bottom: 1em; 23} 24 25h2 { 26 font-size: 24px; 27 margin-bottom: 1em; 28} 29 30h3 { 31 font-size: 20px; 32 margin-bottom: 1em; 33 margin-top: 1em; 34} 35 36pre, code { 37 line-height: 1.5; 38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace; 39} 40 41pre { 42 margin-top: 0.5em; 43} 44 45h1, h2, h3, p { 46 font-family: Arial, sans serif; 47} 48 49h1, h2, h3 { 50 border-bottom: solid #CCC 1px; 51} 52 53.toc_element { 54 margin-top: 0.5em; 55} 56 57.firstline { 58 margin-left: 2 em; 59} 60 61.method { 62 margin-top: 1em; 63 border: solid 1px #CCC; 64 padding: 1em; 65 background: #EEE; 66} 67 68.details { 69 font-weight: bold; 70 font-size: 14px; 71} 72 73</style> 74 75<h1><a href="clouderrorreporting_v1beta1.html">Stackdriver Error Reporting API</a> . <a href="clouderrorreporting_v1beta1.projects.html">projects</a> . <a href="clouderrorreporting_v1beta1.projects.events.html">events</a></h1> 76<h2>Instance Methods</h2> 77<p class="toc_element"> 78 <code><a href="#list">list(projectName, pageSize=None, x__xgafv=None, serviceFilter_resourceType=None, timeRange_period=None, serviceFilter_version=None, pageToken=None, serviceFilter_service=None, groupId=None)</a></code></p> 79<p class="firstline">Lists the specified events.</p> 80<p class="toc_element"> 81 <code><a href="#list_next">list_next(previous_request, previous_response)</a></code></p> 82<p class="firstline">Retrieves the next page of results.</p> 83<p class="toc_element"> 84 <code><a href="#report">report(projectName, body, x__xgafv=None)</a></code></p> 85<p class="firstline">Report an individual error event.</p> 86<h3>Method Details</h3> 87<div class="method"> 88 <code class="details" id="list">list(projectName, pageSize=None, x__xgafv=None, serviceFilter_resourceType=None, timeRange_period=None, serviceFilter_version=None, pageToken=None, serviceFilter_service=None, groupId=None)</code> 89 <pre>Lists the specified events. 90 91Args: 92 projectName: string, [Required] The resource name of the Google Cloud Platform project. Written 93as `projects/` plus the 94[Google Cloud Platform project 95ID](https://support.google.com/cloud/answer/6158840). 96Example: `projects/my-project-123`. (required) 97 pageSize: integer, [Optional] The maximum number of results to return per response. 98 x__xgafv: string, V1 error format. 99 Allowed values 100 1 - v1 error format 101 2 - v2 error format 102 serviceFilter_resourceType: string, [Optional] The exact value to match against 103[`ServiceContext.resource_type`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.resource_type). 104 timeRange_period: string, Restricts the query to the specified time range. 105 serviceFilter_version: string, [Optional] The exact value to match against 106[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). 107 pageToken: string, [Optional] A `next_page_token` provided by a previous response. 108 serviceFilter_service: string, [Optional] The exact value to match against 109[`ServiceContext.service`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.service). 110 groupId: string, [Required] The group for which events shall be returned. 111 112Returns: 113 An object of the form: 114 115 { # Contains a set of requested error events. 116 "nextPageToken": "A String", # If non-empty, more results are available. 117 # Pass this token, along with the same query parameters as the first 118 # request, to view the next page of results. 119 "errorEvents": [ # The error events which match the given request. 120 { # An error event which is returned by the Error Reporting system. 121 "serviceContext": { # Describes a running service that sends errors. # The `ServiceContext` for which this error was reported. 122 # Its version changes over time and multiple versions can run in parallel. 123 "resourceType": "A String", # Type of the MonitoredResource. List of possible values: 124 # https://cloud.google.com/monitoring/api/resources 125 # 126 # Value is set automatically for incoming errors and must not be set when 127 # reporting errors. 128 "version": "A String", # Represents the source code version that the developer provided, 129 # which could represent a version label or a Git SHA-1 hash, for example. 130 # For App Engine standard environment, the version is set to the version of 131 # the app. 132 "service": "A String", # An identifier of the service, such as the name of the 133 # executable, job, or Google App Engine service name. This field is expected 134 # to have a low number of values that are relatively stable over time, as 135 # opposed to `version`, which can be changed whenever new code is deployed. 136 # 137 # Contains the service name for error reports extracted from Google 138 # App Engine logs or `default` if the App Engine default service is used. 139 }, 140 "message": "A String", # The stack trace that was reported or logged by the service. 141 "eventTime": "A String", # Time when the event occurred as provided in the error report. 142 # If the report did not contain a timestamp, the time the error was received 143 # by the Error Reporting system is used. 144 "context": { # A description of the context in which an error occurred. # Data about the context in which the error occurred. 145 # This data should be provided by the application when reporting an error, 146 # unless the 147 # error report has been generated automatically from Google App Engine logs. 148 "httpRequest": { # HTTP request data that is related to a reported error. # The HTTP request which was processed when the error was 149 # triggered. 150 # This data should be provided by the application when reporting an error, 151 # unless the 152 # error report has been generated automatically from Google App Engine logs. 153 "responseStatusCode": 42, # The HTTP response status code for the request. 154 "url": "A String", # The URL of the request. 155 "referrer": "A String", # The referrer information that is provided with the request. 156 "remoteIp": "A String", # The IP address from which the request originated. 157 # This can be IPv4, IPv6, or a token which is derived from the 158 # IP address, depending on the data that has been provided 159 # in the error report. 160 "userAgent": "A String", # The user agent information that is provided with the request. 161 "method": "A String", # The type of HTTP request, such as `GET`, `POST`, etc. 162 }, 163 "sourceReferences": [ # Source code that was used to build the executable which has 164 # caused the given error message. 165 { # A reference to a particular snapshot of the source tree used to build and 166 # deploy an application. 167 "revisionId": "A String", # The canonical and persistent identifier of the deployed revision. 168 # Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" 169 "repository": "A String", # Optional. A URI string identifying the repository. 170 # Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" 171 }, 172 ], 173 "user": "A String", # The user who caused or was affected by the crash. 174 # This can be a user ID, an email address, or an arbitrary token that 175 # uniquely identifies the user. 176 # When sending an error report, leave this field empty if the user was not 177 # logged in. In this case the 178 # Error Reporting system will use other data, such as remote IP address, to 179 # distinguish affected users. See `affected_users_count` in 180 # `ErrorGroupStats`. 181 "reportLocation": { # Indicates a location in the source code of the service for which errors are # The location in the source code where the decision was made to 182 # report the error, usually the place where it was logged. 183 # For a logged exception this would be the source line where the 184 # exception is logged, usually close to the place where it was 185 # caught. This value is in contrast to `Exception.cause_location`, 186 # which describes the source line where the exception was thrown. 187 # reported. `functionName` must be provided by the application when reporting 188 # an error, unless the error report contains a `message` with a supported 189 # exception stack trace. All fields are optional for the later case. 190 "lineNumber": 42, # 1-based. 0 indicates that the line number is unknown. 191 "functionName": "A String", # Human-readable name of a function or method. 192 # The value can include optional context like the class or package name. 193 # For example, `my.package.MyClass.method` in case of Java. 194 "filePath": "A String", # The source code filename, which can include a truncated relative 195 # path, or a full path from a production machine. 196 }, 197 }, 198 }, 199 ], 200 "timeRangeBegin": "A String", # The timestamp specifies the start time to which the request was restricted. 201 }</pre> 202</div> 203 204<div class="method"> 205 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 206 <pre>Retrieves the next page of results. 207 208Args: 209 previous_request: The request for the previous page. (required) 210 previous_response: The response from the request for the previous page. (required) 211 212Returns: 213 A request object that you can call 'execute()' on to request the next 214 page. Returns None if there are no more items in the collection. 215 </pre> 216</div> 217 218<div class="method"> 219 <code class="details" id="report">report(projectName, body, x__xgafv=None)</code> 220 <pre>Report an individual error event. 221 222This endpoint accepts <strong>either</strong> an OAuth token, 223<strong>or</strong> an 224<a href="https://support.google.com/cloud/answer/6158862">API key</a> 225for authentication. To use an API key, append it to the URL as the value of 226a `key` parameter. For example: 227<pre>POST https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456</pre> 228 229Args: 230 projectName: string, [Required] The resource name of the Google Cloud Platform project. Written 231as `projects/` plus the 232[Google Cloud Platform project ID](https://support.google.com/cloud/answer/6158840). 233Example: `projects/my-project-123`. (required) 234 body: object, The request body. (required) 235 The object takes the form of: 236 237{ # An error event which is reported to the Error Reporting system. 238 "serviceContext": { # Describes a running service that sends errors. # [Required] The service context in which this error has occurred. 239 # Its version changes over time and multiple versions can run in parallel. 240 "resourceType": "A String", # Type of the MonitoredResource. List of possible values: 241 # https://cloud.google.com/monitoring/api/resources 242 # 243 # Value is set automatically for incoming errors and must not be set when 244 # reporting errors. 245 "version": "A String", # Represents the source code version that the developer provided, 246 # which could represent a version label or a Git SHA-1 hash, for example. 247 # For App Engine standard environment, the version is set to the version of 248 # the app. 249 "service": "A String", # An identifier of the service, such as the name of the 250 # executable, job, or Google App Engine service name. This field is expected 251 # to have a low number of values that are relatively stable over time, as 252 # opposed to `version`, which can be changed whenever new code is deployed. 253 # 254 # Contains the service name for error reports extracted from Google 255 # App Engine logs or `default` if the App Engine default service is used. 256 }, 257 "eventTime": "A String", # [Optional] Time when the event occurred. 258 # If not provided, the time when the event was received by the 259 # Error Reporting system will be used. 260 "message": "A String", # [Required] The error message. 261 # If no `context.reportLocation` is provided, the message must contain a 262 # header (typically consisting of the exception type name and an error 263 # message) and an exception stack trace in one of the supported programming 264 # languages and formats. 265 # Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. 266 # Supported stack trace formats are: 267 # 268 # * **Java**: Must be the return value of [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). 269 # * **Python**: Must be the return value of [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). 270 # * **JavaScript**: Must be the value of [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) 271 # as returned by V8. 272 # * **Ruby**: Must contain frames returned by [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). 273 # * **C#**: Must be the return value of [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). 274 # * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` 275 # and contain the result of [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). 276 # * **Go**: Must be the return value of [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). 277 "context": { # A description of the context in which an error occurred. # [Optional] A description of the context in which the error occurred. 278 # This data should be provided by the application when reporting an error, 279 # unless the 280 # error report has been generated automatically from Google App Engine logs. 281 "httpRequest": { # HTTP request data that is related to a reported error. # The HTTP request which was processed when the error was 282 # triggered. 283 # This data should be provided by the application when reporting an error, 284 # unless the 285 # error report has been generated automatically from Google App Engine logs. 286 "responseStatusCode": 42, # The HTTP response status code for the request. 287 "url": "A String", # The URL of the request. 288 "referrer": "A String", # The referrer information that is provided with the request. 289 "remoteIp": "A String", # The IP address from which the request originated. 290 # This can be IPv4, IPv6, or a token which is derived from the 291 # IP address, depending on the data that has been provided 292 # in the error report. 293 "userAgent": "A String", # The user agent information that is provided with the request. 294 "method": "A String", # The type of HTTP request, such as `GET`, `POST`, etc. 295 }, 296 "sourceReferences": [ # Source code that was used to build the executable which has 297 # caused the given error message. 298 { # A reference to a particular snapshot of the source tree used to build and 299 # deploy an application. 300 "revisionId": "A String", # The canonical and persistent identifier of the deployed revision. 301 # Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" 302 "repository": "A String", # Optional. A URI string identifying the repository. 303 # Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" 304 }, 305 ], 306 "user": "A String", # The user who caused or was affected by the crash. 307 # This can be a user ID, an email address, or an arbitrary token that 308 # uniquely identifies the user. 309 # When sending an error report, leave this field empty if the user was not 310 # logged in. In this case the 311 # Error Reporting system will use other data, such as remote IP address, to 312 # distinguish affected users. See `affected_users_count` in 313 # `ErrorGroupStats`. 314 "reportLocation": { # Indicates a location in the source code of the service for which errors are # The location in the source code where the decision was made to 315 # report the error, usually the place where it was logged. 316 # For a logged exception this would be the source line where the 317 # exception is logged, usually close to the place where it was 318 # caught. This value is in contrast to `Exception.cause_location`, 319 # which describes the source line where the exception was thrown. 320 # reported. `functionName` must be provided by the application when reporting 321 # an error, unless the error report contains a `message` with a supported 322 # exception stack trace. All fields are optional for the later case. 323 "lineNumber": 42, # 1-based. 0 indicates that the line number is unknown. 324 "functionName": "A String", # Human-readable name of a function or method. 325 # The value can include optional context like the class or package name. 326 # For example, `my.package.MyClass.method` in case of Java. 327 "filePath": "A String", # The source code filename, which can include a truncated relative 328 # path, or a full path from a production machine. 329 }, 330 }, 331 } 332 333 x__xgafv: string, V1 error format. 334 Allowed values 335 1 - v1 error format 336 2 - v2 error format 337 338Returns: 339 An object of the form: 340 341 { # Response for reporting an individual error event. 342 # Data may be added to this message in the future. 343 }</pre> 344</div> 345 346</body></html>