godo.HostedAgentTriggers.Get()

Generated on 25 Nov 2026 from godo version v1.246.0

Usage

client.HostedAgentTriggers.Get(ctx context.Context, triggerID string) (*godo.HostedAgentTrigger, *godo.Response, error)

Description

Get returns a single trigger by ID.

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

Parameters

triggerID string required

Returns

*godo.HostedAgentTrigger
*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.HostedAgentTrigger

HostedAgentTrigger is a webhook or cron automation bound to an agent/session.

TriggerID string

Omitted from JSON when empty. JSON key: trigger_id

TeamID int64

Omitted from JSON when empty. JSON key: team_id

Kind godo.HostedAgentTriggerKind

Omitted from JSON when empty. JSON key: kind

Name string

Omitted from JSON when empty. JSON key: name

Status godo.HostedAgentTriggerStatus

Omitted from JSON when empty. JSON key: status

SessionMode godo.HostedAgentTriggerSessionMode

Omitted from JSON when empty. JSON key: session_mode

AgentKind godo.HostedAgentKind

Omitted from JSON when empty. JSON key: agent_kind

PromptTemplate string

Omitted from JSON when empty. JSON key: prompt_template

Output *godo.HostedAgentTriggerOutputRead

Omitted from JSON when empty. JSON key: output

SessionTemplate string

Omitted from JSON when empty. JSON key: session_template

BoundSessionID string

Omitted from JSON when empty. JSON key: bound_session_id

KeepSessionAwake bool

KeepSessionAwake (reuse only) lets the trigger run while its bound
session is awake and leaves the session awake after the run, for a
session a user keeps open in Agent Canvas.

Omitted from JSON when empty. JSON key: keep_session_awake

Webhook *godo.HostedAgentWebhookConfig

Omitted from JSON when empty. JSON key: webhook

Cron *godo.HostedAgentCronConfig

Omitted from JSON when empty. JSON key: cron

CreatedAt godo.Timestamp

Omitted from JSON when empty. JSON key: created_at

UpdatedAt godo.Timestamp

Omitted from JSON when empty. JSON key: updated_at

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.Get(ctx, "<your-trigger-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.