List webhook deliveries
client.Agents.WebhookDeliveries.List(ctx, agentID, query) (*CursorPagination[WebhookDelivery], error)
GET/v1/agents/{agentId}/webhook_deliveries
List webhook deliveries
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.Agents.WebhookDeliveries.List(
context.TODO(),
"agentId",
cadenya.AgentWebhookDeliveryListParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
{
"items": [
{
"data": {
"agentId": "agentId",
"attemptCount": 0,
"eventType": "OBJECTIVE_EVENT_TYPE_UNSPECIFIED",
"httpStatusCode": 0,
"lastAttemptAt": "2019-12-27T18:11:19.117Z",
"latencyMs": 0,
"objectiveEventId": "objectiveEventId",
"objectiveId": "objectiveId",
"responseContentLength": "responseContentLength",
"status": "WEBHOOK_DELIVERY_STATUS_UNSPECIFIED",
"webhookId": "webhookId",
"webhookUrl": "webhookUrl",
"errorMessage": "errorMessage",
"responseHeaders": {
"foo": "string"
}
},
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}Returns Examples
{
"items": [
{
"data": {
"agentId": "agentId",
"attemptCount": 0,
"eventType": "OBJECTIVE_EVENT_TYPE_UNSPECIFIED",
"httpStatusCode": 0,
"lastAttemptAt": "2019-12-27T18:11:19.117Z",
"latencyMs": 0,
"objectiveEventId": "objectiveEventId",
"objectiveId": "objectiveId",
"responseContentLength": "responseContentLength",
"status": "WEBHOOK_DELIVERY_STATUS_UNSPECIFIED",
"webhookId": "webhookId",
"webhookUrl": "webhookUrl",
"errorMessage": "errorMessage",
"responseHeaders": {
"foo": "string"
}
},
"metadata": {
"id": "id",
"accountId": "accountId",
"createdAt": "2019-12-27T18:11:19.117Z",
"profileId": "profileId",
"workspaceId": "workspaceId",
"externalId": "externalId",
"labels": {
"foo": "string"
}
}
}
],
"pagination": {
"nextCursor": "nextCursor",
"total": 0
}
}