(Events)
REST APIs for managing events captured by a speakeasy binary (CLI, GitHub Action etc)
- GetEventsByTarget - Load recent events for a particular workspace
- GetTargets - Load targets for a particular workspace
- GetTargetsDeprecated - Load targets for a particular workspace
- Post - Post events for a specific workspace
- Search - Search events for a particular workspace by any field
Load recent events for a particular workspace
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
GetWorkspaceEventsByTargetRequest req = new GetWorkspaceEventsByTargetRequest() {
TargetId = "<id>",
WorkspaceId = "<id>",
};
var res = await sdk.Events.GetEventsByTargetAsync(req);
// handle response
GetWorkspaceEventsByTargetResponse
Error Type |
Status Code |
Content Type |
SpeakeasySDK.Models.Errors.Error |
5XX |
application/json |
SpeakeasySDK.Models.Errors.SDKException |
4XX |
*/* |
Load targets for a particular workspace
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
GetWorkspaceTargetsRequest req = new GetWorkspaceTargetsRequest() {};
var res = await sdk.Events.GetTargetsAsync(req);
// handle response
GetWorkspaceTargetsResponse
Error Type |
Status Code |
Content Type |
SpeakeasySDK.Models.Errors.Error |
5XX |
application/json |
SpeakeasySDK.Models.Errors.SDKException |
4XX |
*/* |
Load targets for a particular workspace
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
GetWorkspaceTargetsDeprecatedRequest req = new GetWorkspaceTargetsDeprecatedRequest() {
WorkspaceId = "<id>",
};
var res = await sdk.Events.GetTargetsDeprecatedAsync(req);
// handle response
GetWorkspaceTargetsDeprecatedResponse
Error Type |
Status Code |
Content Type |
SpeakeasySDK.Models.Errors.Error |
5XX |
application/json |
SpeakeasySDK.Models.Errors.SDKException |
4XX |
*/* |
Sends an array of events to be stored for a particular workspace.
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
using System;
using System.Collections.Generic;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
PostWorkspaceEventsRequest req = new PostWorkspaceEventsRequest() {
RequestBody = new List<CliEvent>() {
new CliEvent() {
CreatedAt = System.DateTime.Parse("2024-05-07T03:24:39.583Z"),
ExecutionId = "<id>",
Id = "<id>",
InteractionType = InteractionType.Quickstart,
LocalStartedAt = System.DateTime.Parse("2024-09-08T05:59:33.876Z"),
SpeakeasyApiKeyName = "<value>",
SpeakeasyVersion = "<value>",
Success = false,
WorkspaceId = "<id>",
},
},
WorkspaceId = "<id>",
};
var res = await sdk.Events.PostAsync(req);
// handle response
PostWorkspaceEventsResponse
Error Type |
Status Code |
Content Type |
SpeakeasySDK.Models.Errors.Error |
5XX |
application/json |
SpeakeasySDK.Models.Errors.SDKException |
4XX |
*/* |
Search events for a particular workspace by any field
using SpeakeasySDK;
using SpeakeasySDK.Models.Operations;
using SpeakeasySDK.Models.Shared;
var sdk = new SDK(security: new Security() {
APIKey = "<YOUR_API_KEY_HERE>",
});
SearchWorkspaceEventsRequest req = new SearchWorkspaceEventsRequest() {
WorkspaceId = "<id>",
};
var res = await sdk.Events.SearchAsync(req);
// handle response
SearchWorkspaceEventsResponse
Error Type |
Status Code |
Content Type |
SpeakeasySDK.Models.Errors.Error |
5XX |
application/json |
SpeakeasySDK.Models.Errors.SDKException |
4XX |
*/* |