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/v2024
Method | HTTP request | Description |
---|---|---|
cancel-workflow-execution | Post /workflow-executions/{id}/cancel | Cancel Workflow Execution by ID |
create-external-execute-workflow | Post /workflows/execute/external/{id} | Execute Workflow via External Trigger |
create-workflow | Post /workflows | Create Workflow |
create-workflow-external-trigger | Post /workflows/{id}/external/oauth-clients | Generate External Trigger OAuth Client |
delete-workflow | Delete /workflows/{id} | Delete Workflow By Id |
get-workflow | Get /workflows/{id} | Get Workflow By Id |
get-workflow-execution | Get /workflow-executions/{id} | Get Workflow Execution |
get-workflow-execution-history | Get /workflow-executions/{id}/history | Get Workflow Execution History |
get-workflow-executions | Get /workflows/{id}/executions | List Workflow Executions |
list-complete-workflow-library | Get /workflow-library | List Complete Workflow Library |
list-workflow-library-actions | Get /workflow-library/actions | List Workflow Library Actions |
list-workflow-library-operators | Get /workflow-library/operators | List Workflow Library Operators |
list-workflow-library-triggers | Get /workflow-library/triggers | List Workflow Library Triggers |
list-workflows | Get /workflows | List Workflows |
patch-workflow | Patch /workflows/{id} | Patch Workflow |
put-workflow | Put /workflows/{id} | Update Workflow |
test-external-execute-workflow | Post /workflows/execute/external/{id}/test | Test Workflow via External Trigger |
test-workflow | Post /workflows/{id}/test | Test Workflow By Id |
cancel-workflow-execution
Cancel Workflow Execution by ID Use this API to cancel a running workflow execution.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | The workflow execution ID |
Other Parameters
Other parameters are passed through a pointer to a apiCancelWorkflowExecutionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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.V2024.WorkflowsAPI.CancelWorkflowExecution(context.Background(), id).Execute()
//r, err := apiClient.V2024.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)
}
}
create-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.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the workflow |
Other Parameters
Other parameters are passed through a pointer to a apiCreateExternalExecuteWorkflowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
createExternalExecuteWorkflowRequest | CreateExternalExecuteWorkflowRequest | |
Return type
CreateExternalExecuteWorkflow200Response
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
createexternalexecuteworkflowrequest := []byte(``) // CreateExternalExecuteWorkflowRequest | (optional)
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V2024.WorkflowsAPI.CreateExternalExecuteWorkflow(context.Background(), id).Execute()
//resp, r, err := apiClient.V2024.WorkflowsAPI.CreateExternalExecuteWorkflow(context.Background(), id).CreateExternalExecuteWorkflowRequest(createExternalExecuteWorkflowRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.CreateExternalExecuteWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateExternalExecuteWorkflow`: CreateExternalExecuteWorkflow200Response
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.CreateExternalExecuteWorkflow`: %v\n", resp)
}
create-workflow
Create Workflow Create a new workflow with the desired trigger and steps specified in the request body.
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiCreateWorkflowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createWorkflowRequest | CreateWorkflowRequest |
Return type
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
"encoding/json"
v2024 "github.com/sailpoint-oss/golang-sdk/v2/api_v2024"
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 v2024.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.V2024.WorkflowsAPI.CreateWorkflow(context.Background()).CreateWorkflowRequest(createWorkflowRequest).Execute()
//resp, r, err := apiClient.V2024.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)
}
create-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.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the workflow |
Other Parameters
Other parameters are passed through a pointer to a apiCreateWorkflowExternalTriggerRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
Return type
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.V2024.WorkflowsAPI.CreateWorkflowExternalTrigger(context.Background(), id).Execute()
//resp, r, err := apiClient.V2024.WorkflowsAPI.CreateWorkflowExternalTrigger(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WorkflowsAPI.CreateWorkflowExternalTrigger``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateWorkflowExternalTrigger`: WorkflowOAuthClient
fmt.Fprintf(os.Stdout, "Response from `WorkflowsAPI.CreateWorkflowExternalTrigger`: %v\n", resp)
}
delete-workflow
Delete Workflow By Id Delete a workflow. Enabled workflows cannot be deleted. They must first be disabled.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the Workflow |
Other Parameters
Other parameters are passed through a pointer to a apiDeleteWorkflowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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.V2024.WorkflowsAPI.DeleteWorkflow(context.Background(), id).Execute()
//r, err := apiClient.V2024.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)
}
}
get-workflow
Get Workflow By Id Get a single workflow by id.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the workflow |
Other Parameters
Other parameters are passed through a pointer to a apiGetWorkflowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
Return type
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.V2024.WorkflowsAPI.GetWorkflow(context.Background(), id).Execute()
//resp, r, err := apiClient.V2024.WorkflowsAPI.GetWorkflow(context.Background(), id).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)
}
get-workflow-execution
Get Workflow Execution Use this API to 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.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Workflow execution ID. |
Other Parameters
Other parameters are passed through a pointer to a apiGetWorkflowExecutionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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.V2024.WorkflowsAPI.GetWorkflowExecution(context.Background(), id).Execute()
//resp, r, err := apiClient.V2024.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)
}
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.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the workflow execution |
Other Parameters
Other parameters are passed through a pointer to a apiGetWorkflowExecutionHistoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
Return type
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.V2024.WorkflowsAPI.GetWorkflowExecutionHistory(context.Background(), id).Execute()
//resp, r, err := apiClient.V2024.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)
}
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:
- Use the Get Workflows endpoint to get your workflows.
- Get your workflow ID from the response.
- 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.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Workflow ID. |
Other Parameters
Other parameters are passed through a pointer to a apiGetWorkflowExecutionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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: start_time: eq, lt, le, gt, ge status: eq |
Return type
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: **start_time**: *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: **start_time**: *eq, lt, le, gt, ge* **status**: *eq* (optional)
configuration := sailpoint.NewDefaultConfiguration()
apiClient := sailpoint.NewAPIClient(configuration)
resp, r, err := apiClient.V2024.WorkflowsAPI.GetWorkflowExecutions(context.Background(), id).Execute()
//resp, r, err := apiClient.V2024.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)
}
list-complete-workflow-library
List Complete Workflow Library This lists all triggers, actions, and operators in the library
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiListCompleteWorkflowLibraryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
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] |
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.V2024.WorkflowsAPI.ListCompleteWorkflowLibrary(context.Background()).Execute()
//resp, r, err := apiClient.V2024.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)
}
list-workflow-library-actions
List Workflow Library Actions This lists the workflow actions available to you.
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiListWorkflowLibraryActionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
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] |
filters | string | Filter 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
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.V2024.WorkflowsAPI.ListWorkflowLibraryActions(context.Background()).Execute()
//resp, r, err := apiClient.V2024.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)
}
list-workflow-library-operators
List Workflow Library Operators This lists the workflow operators available to you
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
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.V2024.WorkflowsAPI.ListWorkflowLibraryOperators(context.Background()).Execute()
//resp, r, err := apiClient.V2024.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)
}
list-workflow-library-triggers
List Workflow Library Triggers This lists the workflow triggers available to you
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiListWorkflowLibraryTriggersRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
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] |
filters | string | Filter 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
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.V2024.WorkflowsAPI.ListWorkflowLibraryTriggers(context.Background()).Execute()
//resp, r, err := apiClient.V2024.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)
}
list-workflows
List Workflows List all workflows in the tenant.
Path Parameters
This endpoint does not need any parameter.
Other Parameters
Other parameters are passed through a pointer to a apiListWorkflowsRequest struct via the builder pattern
Return type
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.V2024.WorkflowsAPI.ListWorkflows(context.Background()).Execute()
//resp, r, err := apiClient.V2024.WorkflowsAPI.ListWorkflows(context.Background()).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)
}
patch-workflow
Patch Workflow Partially update an existing Workflow using JSON Patch syntax.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the Workflow |
Other Parameters
Other parameters are passed through a pointer to a apiPatchWorkflowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
jsonPatchOperation | []JsonPatchOperation | |
Return type
HTTP request headers
- Content-Type: application/json-patch+json
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
"encoding/json"
v2024 "github.com/sailpoint-oss/golang-sdk/v2/api_v2024"
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 []v2024.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.V2024.WorkflowsAPI.PatchWorkflow(context.Background(), id).JsonPatchOperation(jsonPatchOperation).Execute()
//resp, r, err := apiClient.V2024.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)
}
put-workflow
Update Workflow Perform a full update of a workflow. The updated workflow object is returned in the response.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the Workflow |
Other Parameters
Other parameters are passed through a pointer to a apiPutWorkflowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
workflowBody | WorkflowBody | |
Return type
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
"encoding/json"
v2024 "github.com/sailpoint-oss/golang-sdk/v2/api_v2024"
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 v2024.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.V2024.WorkflowsAPI.PutWorkflow(context.Background(), id).WorkflowBody(workflowBody).Execute()
//resp, r, err := apiClient.V2024.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)
}
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.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the workflow |
Other Parameters
Other parameters are passed through a pointer to a apiTestExternalExecuteWorkflowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
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.V2024.WorkflowsAPI.TestExternalExecuteWorkflow(context.Background(), id).Execute()
//resp, r, err := apiClient.V2024.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)
}
test-workflow
Test Workflow By Id
Workflow must be disabled in order to use this endpoint.
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.
Path Parameters
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Id of the workflow |
Other Parameters
Other parameters are passed through a pointer to a apiTestWorkflowRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
testWorkflowRequest | TestWorkflowRequest | |
Return type
HTTP request headers
- Content-Type: application/json
- Accept: application/json
Example
package main
import (
"context"
"fmt"
"os"
"encoding/json"
v2024 "github.com/sailpoint-oss/golang-sdk/v2/api_v2024"
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 v2024.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.V2024.WorkflowsAPI.TestWorkflow(context.Background(), id).TestWorkflowRequest(testWorkflowRequest).Execute()
//resp, r, err := apiClient.V2024.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)
}