sailpoint.v2024.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
cancel-workflow-execution
Cancel Workflow Execution by ID
Use this API to cancel a running workflow execution.
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | The workflow execution ID |
Return type
(empty response body)
Responses
Code | Description | Data Type | Response headers |
---|
204 | No content - indicates the request was successful but there is no content to be returned in the response. | | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
try:
WorkflowsApi(api_client).cancel_workflow_execution(id=id)
except Exception as e:
print("Exception when calling WorkflowsApi->cancel_workflow_execution: %s\n" % e)
[Back to top]
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.
API Spec
Parameters
Return type
CreateExternalExecuteWorkflow200Response
Responses
Code | Description | Data Type | Response headers |
---|
200 | The Workflow object | CreateExternalExecuteWorkflow200Response | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: application/json
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.create_external_execute_workflow200_response import CreateExternalExecuteWorkflow200Response
from sailpoint.v2024.models.create_external_execute_workflow_request import CreateExternalExecuteWorkflowRequest
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
create_external_execute_workflow_request = '''sailpoint.v2024.CreateExternalExecuteWorkflowRequest()'''
try:
results = WorkflowsApi(api_client).create_external_execute_workflow(id=id)
print("The response of WorkflowsApi->create_external_execute_workflow:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->create_external_execute_workflow: %s\n" % e)
[Back to top]
create-workflow
Create Workflow
Create a new workflow with the desired trigger and steps specified in the request body.
API Spec
Parameters
Return type
Workflow
Responses
Code | Description | Data Type | Response headers |
---|
200 | The Workflow object | Workflow | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: application/json
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.create_workflow_request import CreateWorkflowRequest
from sailpoint.v2024.models.workflow import Workflow
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
create_workflow_request = '''{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')]}}}'''
try:
new_create_workflow_request = CreateWorkflowRequest.from_json(create_workflow_request)
results = WorkflowsApi(api_client).create_workflow(create_workflow_request=new_create_workflow_request)
print("The response of WorkflowsApi->create_workflow:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->create_workflow: %s\n" % e)
[Back to top]
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.
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | Id of the workflow |
Return type
WorkflowOAuthClient
Responses
Code | Description | Data Type | Response headers |
---|
200 | The OAuth Client object | WorkflowOAuthClient | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.workflow_o_auth_client import WorkflowOAuthClient
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
try:
results = WorkflowsApi(api_client).create_workflow_external_trigger(id=id)
print("The response of WorkflowsApi->create_workflow_external_trigger:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->create_workflow_external_trigger: %s\n" % e)
[Back to top]
delete-workflow
Delete Workflow By Id
Delete a workflow. Enabled workflows cannot be deleted. They must first be disabled.
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | Id of the Workflow |
Return type
(empty response body)
Responses
Code | Description | Data Type | Response headers |
---|
204 | No content - indicates the request was successful but there is no content to be returned in the response. | | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
try:
WorkflowsApi(api_client).delete_workflow(id=id)
except Exception as e:
print("Exception when calling WorkflowsApi->delete_workflow: %s\n" % e)
[Back to top]
get-workflow
Get Workflow By Id
Get a single workflow by id.
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | Id of the workflow |
Return type
Workflow
Responses
Code | Description | Data Type | Response headers |
---|
200 | The workflow object | Workflow | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.workflow import Workflow
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
try:
results = WorkflowsApi(api_client).get_workflow(id=id)
print("The response of WorkflowsApi->get_workflow:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->get_workflow: %s\n" % e)
[Back to top]
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.
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | Workflow execution ID. |
Return type
object
Responses
Code | Description | Data Type | Response headers |
---|
200 | Workflow execution. | object | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
try:
results = WorkflowsApi(api_client).get_workflow_execution(id=id)
print("The response of WorkflowsApi->get_workflow_execution:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->get_workflow_execution: %s\n" % e)
[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
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | Id of the workflow execution |
Return type
List[WorkflowExecutionEvent]
Responses
Code | Description | Data Type | Response headers |
---|
200 | List of workflow execution events for the given workflow execution | List[WorkflowExecutionEvent] | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.workflow_execution_event import WorkflowExecutionEvent
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
try:
results = WorkflowsApi(api_client).get_workflow_execution_history(id=id)
print("The response of WorkflowsApi->get_workflow_execution_history:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->get_workflow_execution_history: %s\n" % e)
[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:
- 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.
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | Workflow ID. |
Query | limit | int | (optional) (default to 250) | Max number of results to return. See V3 API Standard Collection Parameters for more information. |
Query | offset | int | (optional) (default to 0) | Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. |
Query | count | bool | (optional) (default to False) | 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. |
Query | filters | str | (optional) | 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
List[WorkflowExecution]
Responses
Code | Description | Data Type | Response headers |
---|
200 | List of workflow executions for the specified workflow. | List[WorkflowExecution] | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
404 | Not Found - returned if the request URL refers to a resource or object that does not exist | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.workflow_execution import WorkflowExecution
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
limit = 250
offset = 0
count = False
filters = 'status eq \"Failed\"'
try:
results = WorkflowsApi(api_client).get_workflow_executions(id=id)
print("The response of WorkflowsApi->get_workflow_executions:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->get_workflow_executions: %s\n" % e)
[Back to top]
list-complete-workflow-library
List Complete Workflow Library
This lists all triggers, actions, and operators in the library
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Query | limit | int | (optional) (default to 250) | Max number of results to return. See V3 API Standard Collection Parameters for more information. |
Query | offset | int | (optional) (default to 0) | Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. |
Return type
List[ListCompleteWorkflowLibrary200ResponseInner]
Responses
Code | Description | Data Type | Response headers |
---|
200 | List of workflow steps | List[ListCompleteWorkflowLibrary200ResponseInner] | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.list_complete_workflow_library200_response_inner import ListCompleteWorkflowLibrary200ResponseInner
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
limit = 250
offset = 0
try:
results = WorkflowsApi(api_client).list_complete_workflow_library()
print("The response of WorkflowsApi->list_complete_workflow_library:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->list_complete_workflow_library: %s\n" % e)
[Back to top]
list-workflow-library-actions
List Workflow Library Actions
This lists the workflow actions available to you.
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Query | limit | int | (optional) (default to 250) | Max number of results to return. See V3 API Standard Collection Parameters for more information. |
Query | offset | int | (optional) (default to 0) | Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. |
Query | filters | str | (optional) | 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
List[WorkflowLibraryAction]
Responses
Code | Description | Data Type | Response headers |
---|
200 | List of workflow actions | List[WorkflowLibraryAction] | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.workflow_library_action import WorkflowLibraryAction
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
limit = 250
offset = 0
filters = 'id eq \"sp:create-campaign\"'
try:
results = WorkflowsApi(api_client).list_workflow_library_actions()
print("The response of WorkflowsApi->list_workflow_library_actions:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->list_workflow_library_actions: %s\n" % e)
[Back to top]
list-workflow-library-operators
List Workflow Library Operators
This lists the workflow operators available to you
API Spec
Parameters
This endpoint does not need any parameter.
Return type
List[WorkflowLibraryOperator]
Responses
Code | Description | Data Type | Response headers |
---|
200 | List of workflow operators | List[WorkflowLibraryOperator] | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.workflow_library_operator import WorkflowLibraryOperator
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
try:
results = WorkflowsApi(api_client).list_workflow_library_operators()
print("The response of WorkflowsApi->list_workflow_library_operators:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->list_workflow_library_operators: %s\n" % e)
[Back to top]
list-workflow-library-triggers
List Workflow Library Triggers
This lists the workflow triggers available to you
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Query | limit | int | (optional) (default to 250) | Max number of results to return. See V3 API Standard Collection Parameters for more information. |
Query | offset | int | (optional) (default to 0) | Offset into the full result set. Usually specified with limit to paginate through the results. See V3 API Standard Collection Parameters for more information. |
Query | filters | str | (optional) | 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
List[WorkflowLibraryTrigger]
Responses
Code | Description | Data Type | Response headers |
---|
200 | List of workflow triggers | List[WorkflowLibraryTrigger] | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.workflow_library_trigger import WorkflowLibraryTrigger
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
limit = 250
offset = 0
filters = 'id eq \"idn:identity-attributes-changed\"'
try:
results = WorkflowsApi(api_client).list_workflow_library_triggers()
print("The response of WorkflowsApi->list_workflow_library_triggers:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->list_workflow_library_triggers: %s\n" % e)
[Back to top]
list-workflows
List Workflows
List all workflows in the tenant.
API Spec
Parameters
This endpoint does not need any parameter.
Return type
List[Workflow]
Responses
Code | Description | Data Type | Response headers |
---|
200 | List of workflows | List[Workflow] | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: Not defined
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.workflow import Workflow
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
try:
results = WorkflowsApi(api_client).list_workflows()
print("The response of WorkflowsApi->list_workflows:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->list_workflows: %s\n" % e)
[Back to top]
patch-workflow
Patch Workflow
Partially update an existing Workflow using JSON Patch syntax.
API Spec
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | Id of the Workflow |
Body | json_patch_operation | []JsonPatchOperation | True | |
Return type
Workflow
Responses
Code | Description | Data Type | Response headers |
---|
200 | The Workflow object | Workflow | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: application/json-patch+json
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.json_patch_operation import JsonPatchOperation
from sailpoint.v2024.models.workflow import Workflow
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
json_patch_operation = '''[{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}}}]'''
try:
new_json_patch_operation = JsonPatchOperation.from_json(json_patch_operation)
results = WorkflowsApi(api_client).patch_workflow(id=id, json_patch_operation=new_json_patch_operation)
print("The response of WorkflowsApi->patch_workflow:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->patch_workflow: %s\n" % e)
[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
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | Id of the Workflow |
Body | workflow_body | WorkflowBody | True | |
Return type
Workflow
Responses
Code | Description | Data Type | Response headers |
---|
200 | The Workflow object | Workflow | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: application/json
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.workflow import Workflow
from sailpoint.v2024.models.workflow_body import WorkflowBody
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
workflow_body = '''{
"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" : {
"description" : "Triggered when an identity's manager attribute changes",
"formDefinitionId" : "Admin_Access_Request_Form",
"attributeToFilter" : "LifecycleState",
"id" : "idn:identity-attributes-changed",
"filter.$" : "$.changes[?(@.attribute == 'manager')]"
},
"type" : "EVENT"
},
"enabled" : false
}'''
try:
new_workflow_body = WorkflowBody.from_json(workflow_body)
results = WorkflowsApi(api_client).put_workflow(id=id, workflow_body=new_workflow_body)
print("The response of WorkflowsApi->put_workflow:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->put_workflow: %s\n" % e)
[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
Parameters
Return type
TestExternalExecuteWorkflow200Response
Responses
Code | Description | Data Type | Response headers |
---|
200 | Responds with the test input | TestExternalExecuteWorkflow200Response | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: application/json
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.test_external_execute_workflow200_response import TestExternalExecuteWorkflow200Response
from sailpoint.v2024.models.test_external_execute_workflow_request import TestExternalExecuteWorkflowRequest
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
test_external_execute_workflow_request = '''sailpoint.v2024.TestExternalExecuteWorkflowRequest()'''
try:
results = WorkflowsApi(api_client).test_external_execute_workflow(id=id)
print("The response of WorkflowsApi->test_external_execute_workflow:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->test_external_execute_workflow: %s\n" % e)
[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
Parameters
Param Type | Name | Data Type | Required | Description |
---|
Path | id | str | True | Id of the workflow |
Body | test_workflow_request | TestWorkflowRequest | True | |
Return type
TestWorkflow200Response
Responses
Code | Description | Data Type | Response headers |
---|
200 | The Workflow object | TestWorkflow200Response | - |
400 | Client Error - Returned if the request body is invalid. | ErrorResponseDto | - |
401 | Unauthorized - Returned if there is no authorization header, or if the JWT token is expired. | ListAccessProfiles401Response | - |
403 | Forbidden - Returned if the user you are running as, doesn't have access to this end-point. | ErrorResponseDto | - |
429 | Too Many Requests - Returned in response to too many requests in a given period of time - rate limited. The Retry-After header in the response includes how long to wait before trying again. | ListAccessProfiles429Response | - |
500 | Internal Server Error - Returned if there is an unexpected error. | ErrorResponseDto | - |
- Content-Type: application/json
- Accept: application/json
Example
from sailpoint.v2024.api.workflows_api import WorkflowsApi
from sailpoint.v2024.api_client import ApiClient
from sailpoint.v2024.models.test_workflow200_response import TestWorkflow200Response
from sailpoint.v2024.models.test_workflow_request import TestWorkflowRequest
from sailpoint.configuration import Configuration
configuration = Configuration()
with ApiClient(configuration) as api_client:
id = 'c17bea3a-574d-453c-9e04-4365fbf5af0b'
test_workflow_request = '''{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]}]}}'''
try:
new_test_workflow_request = TestWorkflowRequest.from_json(test_workflow_request)
results = WorkflowsApi(api_client).test_workflow(id=id, test_workflow_request=new_test_workflow_request)
print("The response of WorkflowsApi->test_workflow:\n")
print(results.model_dump_json(by_alias=True, indent=4))
except Exception as e:
print("Exception when calling WorkflowsApi->test_workflow: %s\n" % e)
[Back to top]