godo.HostedAgentTriggers.List()

Generated on 25 Nov 2026 from godo version v1.246.0

Usage

client.HostedAgentTriggers.List(ctx context.Context, opt *godo.HostedAgentTriggerListOptions) (*godo.HostedAgentTriggersListResponse, *godo.Response, error)

Description

List enumerates the calling team’s triggers.

This method sends a GET request to /v2/harness-runtime/triggers.

Parameters

opt *godo.HostedAgentTriggerListOptions

Fields of godo.HostedAgentTriggerListOptions

HostedAgentTriggerListOptions specifies optional list filters and pagination.

PageSize int
PageToken string
Kind godo.HostedAgentTriggerKind
Status godo.HostedAgentTriggerStatus
BoundSessionID string

BoundSessionID lists only the reuse triggers bound to that session.

Returns

*godo.HostedAgentTriggersListResponse
*godo.Response

The HTTP response, with pagination Links, Meta, and Rate limit information.

error

Non-nil when the request fails. API errors are returned as *godo.ErrorResponse.

Fields of godo.HostedAgentTriggersListResponse

HostedAgentTriggersListResponse is returned by List.

Triggers []godo.HostedAgentTrigger

JSON key: triggers

NextPageToken string

Omitted from JSON when empty. JSON key: next_page_token

Request Sample

Show Request Sample
package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/digitalocean/godo"
)

func main() {
	client := godo.NewFromToken(os.Getenv("DIGITALOCEAN_TOKEN"))
	ctx := context.TODO()

	result, _, err := client.HostedAgentTriggers.List(ctx, &godo.HostedAgentTriggerListOptions{
		PageSize: 1234567,
		PageToken: "<your-page-token>",
		BoundSessionID: "<your-bound-session-id>",
	})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%+v\n", result)
}

More Information

See GET /v2/harness-runtime/triggers in the API reference for additional detail on responses, headers, parameters, and more.

See the Go package documentation for the source of this method.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.