Accept a bounded, sanitized batch of browser runtime diagnostics.
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://example.com/api/workspace/ui-project/runtime/diagnostics"), Headers = { { "Authorization", "Bearer <token>" }, }, Content = new StringContent("{ \"Events\": [ { \"EventKind\": 1, \"StatusFamily\": 0, \"PageKey\": \"example\", \"ArtifactId\": \"example\", \"ArtifactHash\": \"example\", \"HostContractVersion\": 1, \"DurationMilliseconds\": 1, \"SourcePath\": \"example\", \"Line\": 1, \"Column\": 1, \"Summary\": \"example\" } ] }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}const url = 'https://example.com/api/workspace/ui-project/runtime/diagnostics';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"Events":[{"EventKind":1,"StatusFamily":0,"PageKey":"example","ArtifactId":"example","ArtifactHash":"example","HostContractVersion":1,"DurationMilliseconds":1,"SourcePath":"example","Line":1,"Column":1,"Summary":"example"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/workspace/ui-project/runtime/diagnostics \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "Events": [ { "EventKind": 1, "StatusFamily": 0, "PageKey": "example", "ArtifactId": "example", "ArtifactHash": "example", "HostContractVersion": 1, "DurationMilliseconds": 1, "SourcePath": "example", "Line": 1, "Column": 1, "Summary": "example" } ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Optional access token for clients that cannot set Authorization headers. Prefer Authorization: Bearer <token> when possible.
Request Body
Section titled “Request Body”Bounded batch of Workspace UI runtime diagnostics.
object
Diagnostic events, limited to ten items.
One bounded browser-generated Workspace UI runtime diagnostic.
object
Optional active page key.
Optional active artifact identifier.
Optional active artifact hash.
Observed host contract version.
Optional duration in milliseconds.
Optional canonical Workspace UI source path.
Optional one-based source line.
Optional one-based source column.
Optional bounded and sanitized summary.
Bounded batch of Workspace UI runtime diagnostics.
object
Diagnostic events, limited to ten items.
One bounded browser-generated Workspace UI runtime diagnostic.
object
Optional active page key.
Optional active artifact identifier.
Optional active artifact hash.
Observed host contract version.
Optional duration in milliseconds.
Optional canonical Workspace UI source path.
Optional one-based source line.
Optional one-based source column.
Optional bounded and sanitized summary.
Bounded batch of Workspace UI runtime diagnostics.
object
Diagnostic events, limited to ten items.
One bounded browser-generated Workspace UI runtime diagnostic.
object
Optional active page key.
Optional active artifact identifier.
Optional active artifact hash.
Observed host contract version.
Optional duration in milliseconds.
Optional canonical Workspace UI source path.
Optional one-based source line.
Optional one-based source column.
Optional bounded and sanitized summary.
Responses
Section titled “Responses”OK
object
Result of best-effort Workspace UI runtime diagnostic ingestion.
object
Number of accepted events.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Bad Request
object
Result of best-effort Workspace UI runtime diagnostic ingestion.
object
Number of accepted events.
object
object
object
object
Example
{ "Errors": [ { "Type": 0, "Severity": 0 } ], "Warnings": [ { "Type": 0, "Severity": 0 } ]}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Too Many Requests
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}