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, pageToken=None, serviceFilter_version=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, pageToken=None, serviceFilter_version=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 pageToken: string, [Optional] A `next_page_token` provided by a previous response. 106 serviceFilter_version: string, [Optional] The exact value to match against 107[`ServiceContext.version`](/error-reporting/reference/rest/v1beta1/ServiceContext#FIELDS.version). 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 "eventTime": "A String", # Time when the event occurred as provided in the error report. 141 # If the report did not contain a timestamp, the time the error was received 142 # by the Error Reporting system is used. 143 "message": "A String", # The stack trace that was reported or logged by the service. 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 "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 174 # report the error, usually the place where it was logged. 175 # For a logged exception this would be the source line where the 176 # exception is logged, usually close to the place where it was 177 # caught. 178 # reported. `functionName` must be provided by the application when reporting 179 # an error, unless the error report contains a `message` with a supported 180 # exception stack trace. All fields are optional for the later case. 181 "lineNumber": 42, # 1-based. 0 indicates that the line number is unknown. 182 "functionName": "A String", # Human-readable name of a function or method. 183 # The value can include optional context like the class or package name. 184 # For example, `my.package.MyClass.method` in case of Java. 185 "filePath": "A String", # The source code filename, which can include a truncated relative 186 # path, or a full path from a production machine. 187 }, 188 "user": "A String", # The user who caused or was affected by the crash. 189 # This can be a user ID, an email address, or an arbitrary token that 190 # uniquely identifies the user. 191 # When sending an error report, leave this field empty if the user was not 192 # logged in. In this case the 193 # Error Reporting system will use other data, such as remote IP address, to 194 # distinguish affected users. See `affected_users_count` in 195 # `ErrorGroupStats`. 196 }, 197 }, 198 ], 199 "timeRangeBegin": "A String", # The timestamp specifies the start time to which the request was restricted. 200 }</pre> 201</div> 202 203<div class="method"> 204 <code class="details" id="list_next">list_next(previous_request, previous_response)</code> 205 <pre>Retrieves the next page of results. 206 207Args: 208 previous_request: The request for the previous page. (required) 209 previous_response: The response from the request for the previous page. (required) 210 211Returns: 212 A request object that you can call 'execute()' on to request the next 213 page. Returns None if there are no more items in the collection. 214 </pre> 215</div> 216 217<div class="method"> 218 <code class="details" id="report">report(projectName, body, x__xgafv=None)</code> 219 <pre>Report an individual error event. 220 221This endpoint accepts **either** an OAuth token, 222**or** an [API key](https://support.google.com/cloud/answer/6158862) 223for authentication. To use an API key, append it to the URL as the value of 224a `key` parameter. For example: 225 226`POST 227https://clouderrorreporting.googleapis.com/v1beta1/projects/example-project/events:report?key=123ABC456` 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 233ID](https://support.google.com/cloud/answer/6158840). Example: 234`projects/my-project-123`. (required) 235 body: object, The request body. (required) 236 The object takes the form of: 237 238{ # An error event which is reported to the Error Reporting system. 239 "serviceContext": { # Describes a running service that sends errors. # [Required] The service context in which this error has occurred. 240 # Its version changes over time and multiple versions can run in parallel. 241 "resourceType": "A String", # Type of the MonitoredResource. List of possible values: 242 # https://cloud.google.com/monitoring/api/resources 243 # 244 # Value is set automatically for incoming errors and must not be set when 245 # reporting errors. 246 "version": "A String", # Represents the source code version that the developer provided, 247 # which could represent a version label or a Git SHA-1 hash, for example. 248 # For App Engine standard environment, the version is set to the version of 249 # the app. 250 "service": "A String", # An identifier of the service, such as the name of the 251 # executable, job, or Google App Engine service name. This field is expected 252 # to have a low number of values that are relatively stable over time, as 253 # opposed to `version`, which can be changed whenever new code is deployed. 254 # 255 # Contains the service name for error reports extracted from Google 256 # App Engine logs or `default` if the App Engine default service is used. 257 }, 258 "message": "A String", # [Required] The error message. 259 # If no `context.reportLocation` is provided, the message must contain a 260 # header (typically consisting of the exception type name and an error 261 # message) and an exception stack trace in one of the supported programming 262 # languages and formats. 263 # Supported languages are Java, Python, JavaScript, Ruby, C#, PHP, and Go. 264 # Supported stack trace formats are: 265 # 266 # * **Java**: Must be the return value of 267 # [`Throwable.printStackTrace()`](https://docs.oracle.com/javase/7/docs/api/java/lang/Throwable.html#printStackTrace%28%29). 268 # * **Python**: Must be the return value of 269 # [`traceback.format_exc()`](https://docs.python.org/2/library/traceback.html#traceback.format_exc). 270 # * **JavaScript**: Must be the value of 271 # [`error.stack`](https://github.com/v8/v8/wiki/Stack-Trace-API) as returned 272 # by V8. 273 # * **Ruby**: Must contain frames returned by 274 # [`Exception.backtrace`](https://ruby-doc.org/core-2.2.0/Exception.html#method-i-backtrace). 275 # * **C#**: Must be the return value of 276 # [`Exception.ToString()`](https://msdn.microsoft.com/en-us/library/system.exception.tostring.aspx). 277 # * **PHP**: Must start with `PHP (Notice|Parse error|Fatal error|Warning)` 278 # and contain the result of 279 # [`(string)$exception`](http://php.net/manual/en/exception.tostring.php). 280 # * **Go**: Must be the return value of 281 # [`runtime.Stack()`](https://golang.org/pkg/runtime/debug/#Stack). 282 "eventTime": "A String", # [Optional] Time when the event occurred. 283 # If not provided, the time when the event was received by the 284 # Error Reporting system will be used. 285 "context": { # A description of the context in which an error occurred. # [Optional] A description of the context in which the error occurred. 286 # This data should be provided by the application when reporting an error, 287 # unless the 288 # error report has been generated automatically from Google App Engine logs. 289 "httpRequest": { # HTTP request data that is related to a reported error. # The HTTP request which was processed when the error was 290 # triggered. 291 # This data should be provided by the application when reporting an error, 292 # unless the 293 # error report has been generated automatically from Google App Engine logs. 294 "responseStatusCode": 42, # The HTTP response status code for the request. 295 "url": "A String", # The URL of the request. 296 "referrer": "A String", # The referrer information that is provided with the request. 297 "remoteIp": "A String", # The IP address from which the request originated. 298 # This can be IPv4, IPv6, or a token which is derived from the 299 # IP address, depending on the data that has been provided 300 # in the error report. 301 "userAgent": "A String", # The user agent information that is provided with the request. 302 "method": "A String", # The type of HTTP request, such as `GET`, `POST`, etc. 303 }, 304 "sourceReferences": [ # Source code that was used to build the executable which has 305 # caused the given error message. 306 { # A reference to a particular snapshot of the source tree used to build and 307 # deploy an application. 308 "revisionId": "A String", # The canonical and persistent identifier of the deployed revision. 309 # Example (git): "0035781c50ec7aa23385dc841529ce8a4b70db1b" 310 "repository": "A String", # Optional. A URI string identifying the repository. 311 # Example: "https://github.com/GoogleCloudPlatform/kubernetes.git" 312 }, 313 ], 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. 319 # reported. `functionName` must be provided by the application when reporting 320 # an error, unless the error report contains a `message` with a supported 321 # exception stack trace. All fields are optional for the later case. 322 "lineNumber": 42, # 1-based. 0 indicates that the line number is unknown. 323 "functionName": "A String", # Human-readable name of a function or method. 324 # The value can include optional context like the class or package name. 325 # For example, `my.package.MyClass.method` in case of Java. 326 "filePath": "A String", # The source code filename, which can include a truncated relative 327 # path, or a full path from a production machine. 328 }, 329 "user": "A String", # The user who caused or was affected by the crash. 330 # This can be a user ID, an email address, or an arbitrary token that 331 # uniquely identifies the user. 332 # When sending an error report, leave this field empty if the user was not 333 # logged in. In this case the 334 # Error Reporting system will use other data, such as remote IP address, to 335 # distinguish affected users. See `affected_users_count` in 336 # `ErrorGroupStats`. 337 }, 338 } 339 340 x__xgafv: string, V1 error format. 341 Allowed values 342 1 - v1 error format 343 2 - v2 error format 344 345Returns: 346 An object of the form: 347 348 { # Response for reporting an individual error event. 349 # Data may be added to this message in the future. 350 }</pre> 351</div> 352 353</body></html>