Skip to content
Ona Docs

DeleteAgentExecution

client.Agents.DeleteExecution(ctx, body) (*AgentDeleteExecutionResponse, error)
POST/gitpod.v1.AgentService/DeleteAgentExecution

Deletes an agent run.

Use this method to:

  • Clean up agent runs that are no longer needed

Examples

  • Delete an agent run by ID:

    agentExecutionId: "6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"
ParametersExpand Collapse
body AgentDeleteExecutionParams
AgentExecutionID param.Field[string]Optional
formatuuid
ReturnsExpand Collapse
type AgentDeleteExecutionResponse interface{…}

DeleteAgentExecution

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  response, err := client.Agents.DeleteExecution(context.TODO(), gitpod.AgentDeleteExecutionParams{
    AgentExecutionID: gitpod.F("6fa1a3c7-fbb7-49d1-ba56-1890dc7c4c35"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response)
}
{}
Returns Examples
{}