Skip to main content
POST
/
api
/
v1
/
search
/
automation_executions
SearchAutomationExecutions
package main

import(
	"context"
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"log"
)

func main() {
    ctx := context.Background()

    s := conductoronesdkgo.New(
        conductoronesdkgo.WithSecurity(shared.Security{
            BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
            Oauth: "<YOUR_OAUTH_HERE>",
        }),
    )

    res, err := s.AutomationExecutionSearch.SearchAutomationExecutions(ctx, nil)
    if err != nil {
        log.Fatal(err)
    }
    if res.SearchAutomationExecutionsResponse != nil {
        // handle response
    }
}
{
  "expanded": [
    {
      "@type": "<string>"
    }
  ],
  "list": [
    {
      "automationExecution": {
        "automationTemplateId": "<string>",
        "completedAt": "2023-11-07T05:31:56Z",
        "context": {
          "context": {}
        },
        "createdAt": "2023-11-07T05:31:56Z",
        "currentVersion": 123,
        "deletedAt": "2023-11-07T05:31:56Z",
        "duration": "<string>",
        "id": "<string>",
        "isDraft": true,
        "updatedAt": "2023-11-07T05:31:56Z"
      },
      "automationExecutionTriggerPath": "<string>",
      "automationPath": "<string>"
    }
  ],
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Body

application/json

The SearchAutomationExecutionsRequest message.

automationTemplateId
string | null

Filter results to executions of this automation template.

executionId
string<int64> | null

Filter results to a specific execution by its numeric identifier.

executionStepStates
enum<string>[] | null

Filter results to executions in any of the specified states.

Available options:
AUTOMATION_EXECUTION_STATE_UNSPECIFIED,
AUTOMATION_EXECUTION_STATE_PENDING,
AUTOMATION_EXECUTION_STATE_CREATING,
AUTOMATION_EXECUTION_STATE_GET_STEP,
AUTOMATION_EXECUTION_STATE_PROCESS_STEP,
AUTOMATION_EXECUTION_STATE_COMPLETE_STEP,
AUTOMATION_EXECUTION_STATE_DONE,
AUTOMATION_EXECUTION_STATE_ERROR,
AUTOMATION_EXECUTION_STATE_TERMINATE,
AUTOMATION_EXECUTION_STATE_WAITING
expandMask
Automation Execution Expand Mask · object

The AutomationExecutionExpandMask message.

pageSize
integer<int32> | null

Maximum number of results to return per page.

pageToken
string | null

Pagination token from a previous SearchAutomationExecutionsResponse.

query
string | null

Free-text search query to filter executions.

refs
Automation Execution Ref · object[] | null

Restrict results to specific execution references.

Response

200 - application/json

Successful response

The SearchAutomationExecutionsResponse message.

expanded
object[] | null

Related objects requested via the expand mask.

list
Automation Execution View · object[] | null

The page of execution views matching the search criteria.

nextPageToken
string | null

Token to retrieve the next page of results, empty when no more results exist.