Skip to content
  • Auto
  • Light
  • Dark
Get Started

Execute

Execute Automation
client.Automations.Execute(ctx, id, body) (*ExecutionIDstringAutomationExecuteResponse, error)
post/api/v1/automations/{id}/execute

Invokes the c1.api.automations.v1.AutomationService.ExecuteAutomation method.

Parameters
idstring

The id field.

bodyContextfieldAutomationExecuteParams
Hide ParametersShow Parameters
Contextfield
optional
param.Field[ContextmapAutomationContext]

The AutomationContext message.

Returns
AutomationExecuteResponsestruct

The ExecuteAutomationResponse message.

Hide ParametersShow Parameters
ExecutionIDstring
optional

The executionId field.

formatint64
Request example Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Automations.Execute(
    context.TODO(),
    "id",
    conductoronesdk.AutomationExecuteParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.ExecutionID)
}
200 Example
{
  "executionId": "executionId"
}