GetWorkflowExecutionAction
client.Automations.GetExecutionAction(ctx, body) (*AutomationGetExecutionActionResponse, error)
POST/gitpod.v1.WorkflowService/GetWorkflowExecutionAction
Gets details about a specific workflow execution action.
Use this method to:
- Check execution action status
- View execution action results
- Monitor execution action progress
Examples
-
Get execution action details:
Retrieves information about a specific execution action.
workflowExecutionActionId: "a1b2c3d4-5e6f-7890-abcd-ef1234567890"
GetWorkflowExecutionAction
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.Automations.GetExecutionAction(context.TODO(), gitpod.AutomationGetExecutionActionParams{
WorkflowExecutionActionID: gitpod.F("a1b2c3d4-5e6f-7890-abcd-ef1234567890"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", response.WorkflowExecutionAction)
}
{
"workflowExecutionAction": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"metadata": {
"actionName": "actionName",
"finishedAt": "2019-12-27T18:11:19.117Z",
"startedAt": "2019-12-27T18:11:19.117Z",
"workflowExecutionId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"workflowId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
},
"spec": {
"context": {
"contextUrl": {
"environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"url": "https://example.com"
},
"environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"pullRequest": {
"id": "id",
"author": "author",
"draft": true,
"fromBranch": "fromBranch",
"repository": {
"cloneUrl": "cloneUrl",
"host": "host",
"name": "name",
"owner": "owner"
},
"state": "STATE_UNSPECIFIED",
"title": "title",
"toBranch": "toBranch",
"url": "url"
}
},
"desiredPhase": "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED",
"limits": {
"maxTime": "+9125115.360s"
},
"session": "session"
},
"status": {
"agentExecutionId": "agentExecutionId",
"environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"failureMessage": "failureMessage",
"failures": [
{
"code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
"message": "message",
"meta": {
"foo": "string"
},
"reason": "reason",
"retry": {
"retriable": true,
"retryAfter": "+9125115.360s"
}
}
],
"phase": "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED",
"session": "session",
"stepStatuses": [
{
"error": {
"code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
"message": "message",
"meta": {
"foo": "string"
},
"reason": "reason",
"retry": {
"retriable": true,
"retryAfter": "+9125115.360s"
}
},
"failureMessage": "failureMessage",
"finishedAt": "2019-12-27T18:11:19.117Z",
"phase": "STEP_PHASE_UNSPECIFIED",
"startedAt": "2019-12-27T18:11:19.117Z",
"step": {
"agent": {
"prompt": "prompt"
},
"pullRequest": {
"branch": "branch",
"description": "description",
"draft": true,
"title": "title"
},
"report": {
"outputs": [
{
"acceptanceCriteria": "acceptanceCriteria",
"boolean": {},
"command": "command",
"float": {
"max": 0,
"min": 0
},
"integer": {
"max": 0,
"min": 0
},
"key": "key",
"prompt": "prompt",
"string": {
"pattern": "pattern"
},
"title": "title"
}
]
},
"task": {
"command": "command"
}
},
"stepIndex": 0
}
],
"warningMessage": "warningMessage",
"warnings": [
{
"code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
"message": "message",
"meta": {
"foo": "string"
},
"reason": "reason",
"retry": {
"retriable": true,
"retryAfter": "+9125115.360s"
}
}
]
}
}
}Returns Examples
{
"workflowExecutionAction": {
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"metadata": {
"actionName": "actionName",
"finishedAt": "2019-12-27T18:11:19.117Z",
"startedAt": "2019-12-27T18:11:19.117Z",
"workflowExecutionId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"workflowId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
},
"spec": {
"context": {
"contextUrl": {
"environmentClassId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"url": "https://example.com"
},
"environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"projectId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"pullRequest": {
"id": "id",
"author": "author",
"draft": true,
"fromBranch": "fromBranch",
"repository": {
"cloneUrl": "cloneUrl",
"host": "host",
"name": "name",
"owner": "owner"
},
"state": "STATE_UNSPECIFIED",
"title": "title",
"toBranch": "toBranch",
"url": "url"
}
},
"desiredPhase": "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED",
"limits": {
"maxTime": "+9125115.360s"
},
"session": "session"
},
"status": {
"agentExecutionId": "agentExecutionId",
"environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"failureMessage": "failureMessage",
"failures": [
{
"code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
"message": "message",
"meta": {
"foo": "string"
},
"reason": "reason",
"retry": {
"retriable": true,
"retryAfter": "+9125115.360s"
}
}
],
"phase": "WORKFLOW_EXECUTION_ACTION_PHASE_UNSPECIFIED",
"session": "session",
"stepStatuses": [
{
"error": {
"code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
"message": "message",
"meta": {
"foo": "string"
},
"reason": "reason",
"retry": {
"retriable": true,
"retryAfter": "+9125115.360s"
}
},
"failureMessage": "failureMessage",
"finishedAt": "2019-12-27T18:11:19.117Z",
"phase": "STEP_PHASE_UNSPECIFIED",
"startedAt": "2019-12-27T18:11:19.117Z",
"step": {
"agent": {
"prompt": "prompt"
},
"pullRequest": {
"branch": "branch",
"description": "description",
"draft": true,
"title": "title"
},
"report": {
"outputs": [
{
"acceptanceCriteria": "acceptanceCriteria",
"boolean": {},
"command": "command",
"float": {
"max": 0,
"min": 0
},
"integer": {
"max": 0,
"min": 0
},
"key": "key",
"prompt": "prompt",
"string": {
"pattern": "pattern"
},
"title": "title"
}
]
},
"task": {
"command": "command"
}
},
"stepIndex": 0
}
],
"warningMessage": "warningMessage",
"warnings": [
{
"code": "WORKFLOW_ERROR_CODE_UNSPECIFIED",
"message": "message",
"meta": {
"foo": "string"
},
"reason": "reason",
"retry": {
"retriable": true,
"retryAfter": "+9125115.360s"
}
}
]
}
}
}