Skip to main content

WorkflowsAPI

Workflows allow administrators to create custom automation scripts directly within Identity Security Cloud. These automation scripts respond to event triggers and perform a series of actions to perform tasks that are either too cumbersome or not available in the Identity Security Cloud UI. Workflows can be configured via a graphical user interface within Identity Security Cloud, or by creating and uploading a JSON formatted script to the Workflow service. The Workflows API collection provides the necessary functionality to create, manage, and test your workflows via REST.

All URIs are relative to https://sailpoint.api.identitynow.com/beta

MethodHTTP requestDescription
cancel-workflow-executionPost /workflow-executions/{id}/cancelCancel Workflow Execution by ID
create-workflowPost /workflowsCreate Workflow
delete-workflowDelete /workflows/{id}Delete Workflow By Id
get-workflowGet /workflows/{id}Get Workflow By Id
get-workflow-executionGet /workflow-executions/{id}Get Workflow Execution
get-workflow-execution-historyGet /workflow-executions/{id}/historyGet Workflow Execution History
get-workflow-executionsGet /workflows/{id}/executionsList Workflow Executions
list-complete-workflow-libraryGet /workflow-libraryList Complete Workflow Library
list-workflow-library-actionsGet /workflow-library/actionsList Workflow Library Actions
list-workflow-library-operatorsGet /workflow-library/operatorsList Workflow Library Operators
list-workflow-library-triggersGet /workflow-library/triggersList Workflow Library Triggers
list-workflowsGet /workflowsList Workflows
patch-workflowPatch /workflows/{id}Patch Workflow
post-external-execute-workflowPost /workflows/execute/external/{id}Execute Workflow via External Trigger
post-workflow-external-triggerPost /workflows/{id}/external/oauth-clientsGenerate External Trigger OAuth Client
put-workflowPut /workflows/{id}Update Workflow
test-external-execute-workflowPost /workflows/execute/external/{id}/testTest Workflow via External Trigger
test-workflowPost /workflows/{id}/testTest Workflow By Id

cancel-workflow-execution

Cancel Workflow Execution by ID Use this API to cancel a running workflow execution.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringThe workflow execution ID

Other Parameters

Other parameters are passed through a pointer to a apiCancelWorkflowExecutionRequest struct via the builder pattern

NameTypeDescriptionNotes

Return type

(empty response body)

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | The workflow execution ID # string | The workflow execution ID



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
r, err := apiClient.Beta.WorkflowsAPI.CancelWorkflowExecution(context.Background(), id).Execute()
//r, err := apiClient.Beta.WorkflowsAPI.CancelWorkflowExecution(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.CancelWorkflowExecution``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}

[Back to top]

create-workflow

Create Workflow Create a new workflow with the desired trigger and steps specified in the request body.

API Spec

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateWorkflowRequest struct via the builder pattern

NameTypeDescriptionNotes
createWorkflowRequestCreateWorkflowRequest

Return type

Workflow

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
createworkflowrequest := []byte(`{name=Send Email, owner={type=IDENTITY, id=2c91808568c529c60168cca6f90c1313, name=William Wilson}, description=Send an email to the identity who's attributes changed., definition={start=Send Email Test, steps={Send Email={actionId=sp:send-email, attributes={body=This is a test, [email protected], recipientId.$=$.identity.id, subject=test}, nextStep=success, selectResult=null, type=action}, success={type=success}}}, enabled=false, trigger={type=EVENT, attributes={id=idn:identity-attributes-changed, filter=$.changes[?(@.attribute == 'manager')]}}}`) // CreateWorkflowRequest |


var createWorkflowRequest beta.CreateWorkflowRequest
if err := json.Unmarshal(createworkflowrequest, &createWorkflowRequest); err != nil {
fmt.Println("Error:", err)
return
}


configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.CreateWorkflow(context.Background()).CreateWorkflowRequest(createWorkflowRequest).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.CreateWorkflow(context.Background()).CreateWorkflowRequest(createWorkflowRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.CreateWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateWorkflow`: Workflow
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.CreateWorkflow`: %v\n", resp)
}

[Back to top]

delete-workflow

Delete Workflow By Id Delete a workflow. Enabled workflows cannot be deleted. They must first be disabled.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringId of the Workflow

Other Parameters

Other parameters are passed through a pointer to a apiDeleteWorkflowRequest struct via the builder pattern

NameTypeDescriptionNotes

Return type

(empty response body)

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the Workflow # string | Id of the Workflow



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
r, err := apiClient.Beta.WorkflowsAPI.DeleteWorkflow(context.Background(), id).Execute()
//r, err := apiClient.Beta.WorkflowsAPI.DeleteWorkflow(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.DeleteWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}

[Back to top]

get-workflow

Get Workflow By Id Get a single workflow by id.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringId of the workflow

Other Parameters

Other parameters are passed through a pointer to a apiGetWorkflowRequest struct via the builder pattern

NameTypeDescriptionNotes

workflowMetrics | bool | disable workflow metrics | [default to true]

Return type

Workflow

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow
workflowMetrics := false // bool | disable workflow metrics (optional) (default to true) # bool | disable workflow metrics (optional) (default to true)



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.GetWorkflow(context.Background(), id).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.GetWorkflow(context.Background(), id).WorkflowMetrics(workflowMetrics).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.GetWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWorkflow`: Workflow
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.GetWorkflow`: %v\n", resp)
}

[Back to top]

get-workflow-execution

Get Workflow Execution Get a single workflow execution. Workflow executions are available for up to 90 days before being archived. If you attempt to access a workflow execution that has been archived, you will receive a "404 Not Found" response.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringWorkflow execution ID.

Other Parameters

Other parameters are passed through a pointer to a apiGetWorkflowExecutionRequest struct via the builder pattern

NameTypeDescriptionNotes

Return type

map[string]interface

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Workflow execution ID. # string | Workflow execution ID.



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.GetWorkflowExecution(context.Background(), id).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.GetWorkflowExecution(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.GetWorkflowExecution``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWorkflowExecution`: map[string]interface{}
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.GetWorkflowExecution`: %v\n", resp)
}

[Back to top]

get-workflow-execution-history

Get Workflow Execution History Get a detailed history of a single workflow execution. Workflow executions are available for up to 90 days before being archived. If you attempt to access a workflow execution that has been archived, you will receive a 404 Not Found.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringId of the workflow execution

Other Parameters

Other parameters are passed through a pointer to a apiGetWorkflowExecutionHistoryRequest struct via the builder pattern

NameTypeDescriptionNotes

Return type

[]WorkflowExecutionEvent

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow execution # string | Id of the workflow execution



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.GetWorkflowExecutionHistory(context.Background(), id).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.GetWorkflowExecutionHistory(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.GetWorkflowExecutionHistory``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWorkflowExecutionHistory`: []WorkflowExecutionEvent
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.GetWorkflowExecutionHistory`: %v\n", resp)
}

[Back to top]

get-workflow-executions

List Workflow Executions Use this API to list a specified workflow's executions. Workflow executions are available for up to 90 days before being archived. By default, you can get a maximum of 250 executions. To get executions past the first 250 records, you can do the following:

  1. Use the Get Workflows endpoint to get your workflows.
  2. Get your workflow ID from the response.
  3. You can then do either of the following:
  • Filter to find relevant workflow executions. For example, you can filter for failed workflow executions: GET /workflows/:workflowID/executions?filters=status eq "Failed"

  • Paginate through results with the offset parameter. For example, you can page through 50 executions per page and use that as a way to get to the records past the first 250. Refer to Paginating Results for more information about the query parameters you can use to achieve pagination.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringWorkflow ID.

Other Parameters

Other parameters are passed through a pointer to a apiGetWorkflowExecutionsRequest struct via the builder pattern

NameTypeDescriptionNotes

limit | int32 | Max number of results to return. See V3 API Standard Collection Parameters for more information. | [default to 250] offset | int32 | Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. | [default to 0] count | bool | If true it will populate the X-Total-Count response header with the number of results that would be returned if limit and offset were ignored. Since requesting a total count can have a performance impact, it is recommended not to send count=true if that value will not be used. See V3 API Standard Collection Parameters for more information. | [default to false] filters | string | Filter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: startTime: eq, lt, le, gt, ge status: eq |

Return type

[]WorkflowExecution

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Workflow ID. # string | Workflow ID.
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
count := true // bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false) # bool | If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to false)
filters := `status eq "Failed"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **startTime**: *eq, lt, le, gt, ge* **status**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **startTime**: *eq, lt, le, gt, ge* **status**: *eq* (optional)



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.GetWorkflowExecutions(context.Background(), id).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.GetWorkflowExecutions(context.Background(), id).Limit(limit).Offset(offset).Count(count).Filters(filters).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.GetWorkflowExecutions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetWorkflowExecutions`: []WorkflowExecution
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.GetWorkflowExecutions`: %v\n", resp)
}

[Back to top]

list-complete-workflow-library

List Complete Workflow Library This lists all triggers, actions, and operators in the library

API Spec

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListCompleteWorkflowLibraryRequest struct via the builder pattern

NameTypeDescriptionNotes
limitint32Max number of results to return. See V3 API Standard Collection Parameters for more information.[default to 250]
offsetint32Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.[default to 0]

Return type

[]ListCompleteWorkflowLibrary200ResponseInner

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.ListCompleteWorkflowLibrary(context.Background()).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.ListCompleteWorkflowLibrary(context.Background()).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListCompleteWorkflowLibrary``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListCompleteWorkflowLibrary`: []ListCompleteWorkflowLibrary200ResponseInner
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListCompleteWorkflowLibrary`: %v\n", resp)
}

[Back to top]

list-workflow-library-actions

List Workflow Library Actions This lists the workflow actions available to you.

API Spec

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListWorkflowLibraryActionsRequest struct via the builder pattern

NameTypeDescriptionNotes
limitint32Max number of results to return. See V3 API Standard Collection Parameters for more information.[default to 250]
offsetint32Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.[default to 0]
filtersstringFilter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: id: eq

Return type

[]WorkflowLibraryAction

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
filters := `id eq "sp:create-campaign"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* (optional)



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.ListWorkflowLibraryActions(context.Background()).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.ListWorkflowLibraryActions(context.Background()).Limit(limit).Offset(offset).Filters(filters).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListWorkflowLibraryActions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListWorkflowLibraryActions`: []WorkflowLibraryAction
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListWorkflowLibraryActions`: %v\n", resp)
}

[Back to top]

list-workflow-library-operators

List Workflow Library Operators This lists the workflow operators available to you

API Spec

Path Parameters

This endpoint does not need any parameter.

Other Parameters

Other parameters are passed through a pointer to a apiListWorkflowLibraryOperatorsRequest struct via the builder pattern

Return type

[]WorkflowLibraryOperator

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.ListWorkflowLibraryOperators(context.Background()).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.ListWorkflowLibraryOperators(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListWorkflowLibraryOperators``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListWorkflowLibraryOperators`: []WorkflowLibraryOperator
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListWorkflowLibraryOperators`: %v\n", resp)
}

[Back to top]

list-workflow-library-triggers

List Workflow Library Triggers This lists the workflow triggers available to you

API Spec

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListWorkflowLibraryTriggersRequest struct via the builder pattern

NameTypeDescriptionNotes
limitint32Max number of results to return. See V3 API Standard Collection Parameters for more information.[default to 250]
offsetint32Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.[default to 0]
filtersstringFilter results using the standard syntax described in V3 API Standard Collection Parameters Filtering is supported for the following fields and operators: id: eq

Return type

[]WorkflowLibraryTrigger

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
filters := `id eq "idn:identity-attributes-changed"` // string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* (optional) # string | Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq* (optional)



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.ListWorkflowLibraryTriggers(context.Background()).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.ListWorkflowLibraryTriggers(context.Background()).Limit(limit).Offset(offset).Filters(filters).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListWorkflowLibraryTriggers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListWorkflowLibraryTriggers`: []WorkflowLibraryTrigger
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListWorkflowLibraryTriggers`: %v\n", resp)
}

[Back to top]

list-workflows

List Workflows List all workflows in the tenant.

API Spec

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiListWorkflowsRequest struct via the builder pattern

NameTypeDescriptionNotes
limitint32Max number of results to return. See V3 API Standard Collection Parameters for more information.[default to 250]
offsetint32Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information.[default to 0]
triggerIdstringTrigger ID
connectorInstanceIdstringConnector Instance ID

Return type

[]Workflow

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
limit := 250 // int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250) # int32 | Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 250)
offset := 0 // int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0) # int32 | Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. (optional) (default to 0)
triggerId := `idn:identity-created` // string | Trigger ID (optional) # string | Trigger ID (optional)
connectorInstanceId := `28541fec-bb81-4ad4-88ef-0f7d213adcad` // string | Connector Instance ID (optional) # string | Connector Instance ID (optional)



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.ListWorkflows(context.Background()).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.ListWorkflows(context.Background()).Limit(limit).Offset(offset).TriggerId(triggerId).ConnectorInstanceId(connectorInstanceId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.ListWorkflows``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListWorkflows`: []Workflow
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.ListWorkflows`: %v\n", resp)
}

[Back to top]

patch-workflow

Patch Workflow Partially update an existing Workflow using JSON Patch syntax.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringId of the Workflow

Other Parameters

Other parameters are passed through a pointer to a apiPatchWorkflowRequest struct via the builder pattern

NameTypeDescriptionNotes

jsonPatchOperation | []JsonPatchOperation | |

Return type

Workflow

HTTP request headers

  • Content-Type: application/json-patch+json
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the Workflow # string | Id of the Workflow
jsonpatchoperation := []byte(`[{op=replace, path=/name, value=Send Email}, {op=replace, path=/owner, value={type=IDENTITY, id=2c91808568c529c60168cca6f90c1313, name=William Wilson}}, {op=replace, path=/description, value=Send an email to the identity who's attributes changed.}, {op=replace, path=/enabled, value=false}, {op=replace, path=/definition, value={start=Send Email Test, steps={Send Email={actionId=sp:send-email, attributes={body=This is a test, [email protected], recipientId.$=$.identity.id, subject=test}, nextStep=success, selectResult=null, type=action}, success={type=success}}}}, {op=replace, path=/trigger, value={type=EVENT, attributes={id=idn:identity-attributes-changed}}}]`) // []JsonPatchOperation |


var jsonPatchOperation beta.[]JsonPatchOperation
if err := json.Unmarshal(jsonpatchoperation, &jsonPatchOperation); err != nil {
fmt.Println("Error:", err)
return
}


configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.PatchWorkflow(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.PatchWorkflow(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.PatchWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchWorkflow`: Workflow
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.PatchWorkflow`: %v\n", resp)
}

[Back to top]

post-external-execute-workflow

Execute Workflow via External Trigger This endpoint allows a service outside of IdentityNow to initiate a workflow that uses the "External Trigger" step. The external service will invoke this endpoint with the input data it wants to send to the workflow in the body.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringId of the workflow

Other Parameters

Other parameters are passed through a pointer to a apiPostExternalExecuteWorkflowRequest struct via the builder pattern

NameTypeDescriptionNotes

postExternalExecuteWorkflowRequest | PostExternalExecuteWorkflowRequest | |

Return type

PostExternalExecuteWorkflow200Response

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow
postexternalexecuteworkflowrequest := []byte(``) // PostExternalExecuteWorkflowRequest | (optional)



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.PostExternalExecuteWorkflow(context.Background(), id).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.PostExternalExecuteWorkflow(context.Background(), id).PostExternalExecuteWorkflowRequest(postExternalExecuteWorkflowRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.PostExternalExecuteWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostExternalExecuteWorkflow`: PostExternalExecuteWorkflow200Response
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.PostExternalExecuteWorkflow`: %v\n", resp)
}

[Back to top]

post-workflow-external-trigger

Generate External Trigger OAuth Client Create OAuth client ID, client secret, and callback URL for use in an external trigger. External triggers will need this information to generate an access token to authenticate to the callback URL and submit a trigger payload that will initiate the workflow.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringId of the workflow

Other Parameters

Other parameters are passed through a pointer to a apiPostWorkflowExternalTriggerRequest struct via the builder pattern

NameTypeDescriptionNotes

Return type

WorkflowOAuthClient

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.PostWorkflowExternalTrigger(context.Background(), id).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.PostWorkflowExternalTrigger(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.PostWorkflowExternalTrigger``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostWorkflowExternalTrigger`: WorkflowOAuthClient
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.PostWorkflowExternalTrigger`: %v\n", resp)
}

[Back to top]

put-workflow

Update Workflow Perform a full update of a workflow. The updated workflow object is returned in the response.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringId of the Workflow

Other Parameters

Other parameters are passed through a pointer to a apiPutWorkflowRequest struct via the builder pattern

NameTypeDescriptionNotes

workflowBody | WorkflowBody | |

Return type

Workflow

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the Workflow # string | Id of the Workflow
workflowbody := []byte(`{
"owner" : {
"name" : "William Wilson",
"id" : "2c91808568c529c60168cca6f90c1313",
"type" : "IDENTITY"
},
"name" : "Send Email",
"description" : "Send an email to the identity who's attributes changed.",
"definition" : {
"start" : "Send Email Test",
"steps" : {
"Send Email" : {
"actionId" : "sp:send-email",
"attributes" : {
"body" : "This is a test",
"from" : "[email protected]",
"recipientId.$" : "$.identity.id",
"subject" : "test"
},
"nextStep" : "success",
"type" : "ACTION"
},
"success" : {
"type" : "success"
}
}
},
"trigger" : {
"displayName" : "displayName",
"attributes" : "{}",
"type" : "EVENT"
},
"enabled" : false
}`) // WorkflowBody |


var workflowBody beta.WorkflowBody
if err := json.Unmarshal(workflowbody, &workflowBody); err != nil {
fmt.Println("Error:", err)
return
}


configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.PutWorkflow(context.Background(), id).WorkflowBody(workflowBody).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.PutWorkflow(context.Background(), id).WorkflowBody(workflowBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.PutWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutWorkflow`: Workflow
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.PutWorkflow`: %v\n", resp)
}

[Back to top]

test-external-execute-workflow

Test Workflow via External Trigger Validate a workflow with an "External Trigger" can receive input. The response includes the input that the workflow received, which can be used to validate that the input is intact when it reaches the workflow.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringId of the workflow

Other Parameters

Other parameters are passed through a pointer to a apiTestExternalExecuteWorkflowRequest struct via the builder pattern

NameTypeDescriptionNotes

testExternalExecuteWorkflowRequest | TestExternalExecuteWorkflowRequest | |

Return type

TestExternalExecuteWorkflow200Response

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"


sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow
testexternalexecuteworkflowrequest := []byte(``) // TestExternalExecuteWorkflowRequest | (optional)



configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.TestExternalExecuteWorkflow(context.Background(), id).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.TestExternalExecuteWorkflow(context.Background(), id).TestExternalExecuteWorkflowRequest(testExternalExecuteWorkflowRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.TestExternalExecuteWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TestExternalExecuteWorkflow`: TestExternalExecuteWorkflow200Response
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.TestExternalExecuteWorkflow`: %v\n", resp)
}

[Back to top]

test-workflow

Test Workflow By Id Test a workflow with the provided input data. The input data should resemble the input that the trigger will send the workflow. See the event trigger documentation for an example input for the trigger that initiates this workflow. This endpoint will return an execution ID, which can be used to lookup more information about the execution using the Get a Workflow Execution endpoint. This will cause a live run of the workflow, which could result in unintended modifications to your IDN tenant.

API Spec

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
idstringId of the workflow

Other Parameters

Other parameters are passed through a pointer to a apiTestWorkflowRequest struct via the builder pattern

NameTypeDescriptionNotes

testWorkflowRequest | TestWorkflowRequest | |

Return type

TestWorkflow200Response

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

Example

package main

import (
"context"
"fmt"
"os"
"encoding/json"
beta "github.com/sailpoint-oss/golang-sdk/v2/api_beta"
sailpoint "github.com/sailpoint-oss/golang-sdk/v2"
)

func main() {
id := `c17bea3a-574d-453c-9e04-4365fbf5af0b` // string | Id of the workflow # string | Id of the workflow
testworkflowrequest := []byte(`{input={identity={id=ee769173319b41d19ccec6cea52f237b, name=john.doe, type=IDENTITY}, changes=[{attribute=department, oldValue=sales, newValue=marketing}, {attribute=manager, oldValue={id=ee769173319b41d19ccec6c235423237b, name=nice.guy, type=IDENTITY}, newValue={id=ee769173319b41d19ccec6c235423236c, name=mean.guy, type=IDENTITY}}, {attribute=email, [email protected], [email protected]}]}}`) // TestWorkflowRequest |


var testWorkflowRequest beta.TestWorkflowRequest
if err := json.Unmarshal(testworkflowrequest, &testWorkflowRequest); err != nil {
fmt.Println("Error:", err)
return
}


configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.Beta.WorkflowsAPI.TestWorkflow(context.Background(), id).TestWorkflowRequest(testWorkflowRequest).Execute()
//resp, r, err := apiClient.Beta.WorkflowsAPI.TestWorkflow(context.Background(), id).TestWorkflowRequest(testWorkflowRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.TestWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TestWorkflow`: TestWorkflow200Response
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.TestWorkflow`: %v\n", resp)
}

[Back to top]