diff --git a/idn/v3/paths/workflows/workflow.yaml b/idn/v3/paths/workflows/workflow.yaml index 1b6fe7c4..a7ee7755 100644 --- a/idn/v3/paths/workflows/workflow.yaml +++ b/idn/v3/paths/workflows/workflow.yaml @@ -216,131 +216,5 @@ delete: $ref: '../../../v3/responses/403.yaml' '429': $ref: '../../../v3/responses/429.yaml' - '500': - $ref: '../../../v3/responses/500.yaml' -post: - operationId: createWorkflow - tags: - - Workflows - summary: Create Workflow - description: >- - Create a new workflow with the desired trigger and steps specified in the request body. - security: - - userAuth: [sp:workflow:manage] - requestBody: - required: true - content: - application/json: - schema: - allOf: - - required: - - name - - owner - - $ref: '../../schemas/workflows/WorkflowBody.yaml' - examples: - Event Trigger: - description: Workflow initiated by an event trigger - value: - 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 - from: sailpoint@sailpoint.com - recipientId.$: "$.identity.id" - subject: test - nextStep: success - selectResult: - type: action - success: - type: success - enabled: false - trigger: - type: EVENT - attributes: - id: idn:identity-attributes-changed - filter: "$.changes[?(@.attribute == 'manager')]" - Scheduled Trigger: - description: Workflow initiated by a scheduled trigger - value: - 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 - from: sailpoint@sailpoint.com - recipientId.$: "$.identity.id" - subject: test - nextStep: success - selectResult: - type: action - success: - type: success - enabled: false - trigger: - type: SCHEDULED - attributes: - cronString: 0 * */3 */5 * - External Trigger: - description: Workflow initiated by an external trigger - value: - name: Send Email - owner: - type: IDENTITY - id: 2c91808568c529c60168cca6f90c1313 - name: William Wilson - description: Send an email to the identity whose attributes changed. - definition: - start: Send Email Test - steps: - Send Email: - actionId: sp:send-email - attributes: - body: This is a test - from: sailpoint@sailpoint.com - recipientId.$: "$.identity.id" - subject: test - nextStep: success - selectResult: - type: action - success: - type: success - enabled: false - trigger: - type: EXTERNAL - attributes: - name: search-and-notify - description: Run a search and notify the results - responses: - '200': - description: The Workflow object - content: - application/json: - schema: - $ref: '../../schemas/workflows/Workflow.yaml' - '400': - $ref: '../../../v3/responses/400.yaml' - '401': - $ref: '../../../v3/responses/401.yaml' - '403': - $ref: '../../../v3/responses/403.yaml' - '429': - $ref: '../../../v3/responses/429.yaml' '500': $ref: '../../../v3/responses/500.yaml' \ No newline at end of file diff --git a/idn/v3/paths/workflows/workflows.yaml b/idn/v3/paths/workflows/workflows.yaml index 415174d8..78943df1 100644 --- a/idn/v3/paths/workflows/workflows.yaml +++ b/idn/v3/paths/workflows/workflows.yaml @@ -27,3 +27,128 @@ get: $ref: '../../../v3/responses/429.yaml' '500': $ref: '../../../v3/responses/500.yaml' +post: + operationId: createWorkflow + tags: + - Workflows + summary: Create Workflow + description: >- + Create a new workflow with the desired trigger and steps specified in the request body. + security: + - userAuth: [sp:workflow:manage] + requestBody: + required: true + content: + application/json: + schema: + allOf: + - required: + - name + - $ref: '../../schemas/workflows/WorkflowBody.yaml' + examples: + Event Trigger: + description: Workflow initiated by an event trigger + value: + 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 + from: sailpoint@sailpoint.com + recipientId.$: "$.identity.id" + subject: test + nextStep: success + selectResult: + type: action + success: + type: success + enabled: false + trigger: + type: EVENT + attributes: + id: idn:identity-attributes-changed + filter: "$.changes[?(@.attribute == 'manager')]" + Scheduled Trigger: + description: Workflow initiated by a scheduled trigger + value: + 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 + from: sailpoint@sailpoint.com + recipientId.$: "$.identity.id" + subject: test + nextStep: success + selectResult: + type: action + success: + type: success + enabled: false + trigger: + type: SCHEDULED + attributes: + cronString: 0 * */3 */5 * + External Trigger: + description: Workflow initiated by an external trigger + value: + name: Send Email + owner: + type: IDENTITY + id: 2c91808568c529c60168cca6f90c1313 + name: William Wilson + description: Send an email to the identity whose attributes changed. + definition: + start: Send Email Test + steps: + Send Email: + actionId: sp:send-email + attributes: + body: This is a test + from: sailpoint@sailpoint.com + recipientId.$: "$.identity.id" + subject: test + nextStep: success + selectResult: + type: action + success: + type: success + enabled: false + trigger: + type: EXTERNAL + attributes: + name: search-and-notify + description: Run a search and notify the results + responses: + '200': + description: The Workflow object + content: + application/json: + schema: + $ref: '../../schemas/workflows/Workflow.yaml' + '400': + $ref: '../../../v3/responses/400.yaml' + '401': + $ref: '../../../v3/responses/401.yaml' + '403': + $ref: '../../../v3/responses/403.yaml' + '429': + $ref: '../../../v3/responses/429.yaml' + '500': + $ref: '../../../v3/responses/500.yaml' \ No newline at end of file