List tool set events
client.ToolSets.ListEvents(ctx, toolSetID, query) (*CursorPagination[ToolSetEvent], error)
GET/v1/tool_sets/{toolSetId}/events
List tool set events
package main
import (
"context"
"fmt"
"github.com/cadenya/cadenya-go"
"github.com/cadenya/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.ToolSets.ListEvents(
context.TODO(),
"toolSetId",
cadenya.ToolSetListEventsParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"event": {
"syncCompleted": {
"message": "message",
"toolsSynced": 0
},
"syncFailed": {
"error": true,
"errorType": "errorType",
"message": "message"
},
"syncStarted": {
"message": "message"
},
"type": "type"
},
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"toolSet": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
},
"toolSetId": "toolSetId"
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}Returns Examples
{
"items": [
{
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"event": {
"syncCompleted": {
"message": "message",
"toolsSynced": 0
},
"syncFailed": {
"error": true,
"errorType": "errorType",
"message": "message"
},
"syncStarted": {
"message": "message"
},
"type": "type"
},
"info": {
"createdBy": {
"metadata": {
"id": "id",
"accountId": "accountId",
"name": "name",
"profileId": "profileId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
},
"spec": {
"type": "PROFILE_TYPE_USER",
"email": "email",
"name": "name"
}
},
"toolSet": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"name": "name",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
},
"toolSetId": "toolSetId"
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}