Skip to content

Get workflow run status

client.WorkflowRun.Status(ctx, runID) (*WorkflowRunStatusResponse, error)
GET/v1/workflowRun/{runId}/status

Returns the current status of a workflow run.

ParametersExpand Collapse
runID string

Unique identifier of the workflow run.

ReturnsExpand Collapse
type WorkflowRunStatusResponse struct{…}
Status string

Current status of the workflow run (e.g. running, completed, failed).

Get workflow run status

package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  workflowRunStatusResponse, err := client.WorkflowRun.Status(context.TODO(), "runId")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", workflowRunStatusResponse.Status)
}
{
  "status": "status"
}
Returns Examples
{
  "status": "status"
}