Events.com Workflow Template Controller API

The workflow-template-controller API from Events.com — 5 operation(s) for workflow-template-controller.

OpenAPI Specification

eventscom-workflow-template-controller-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Saasxl-api doc Workflow Template Controller API
  version: '1.0'
servers:
- url: https://datagol-be.events.com
  description: Generated server url
tags:
- name: workflow-template-controller
paths:
  /orchestrator/api/v1/workflowTemplates/{id}:
    get:
      tags:
      - workflow-template-controller
      summary: Get workflow template by id
      description: Loads by id with active=true (soft-deleted templates are not returned). The template must belong to the logged-in user's company.
      operationId: getById_1
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WorkflowTemplateResponse'
    put:
      tags:
      - workflow-template-controller
      summary: Update workflow template
      operationId: update_2
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowTemplateRequest'
        required: true
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WorkflowTemplateResponse'
    delete:
      tags:
      - workflow-template-controller
      summary: Soft-delete workflow template
      operationId: delete_1
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
  /orchestrator/api/v1/workflowTemplates:
    get:
      tags:
      - workflow-template-controller
      summary: Get workflow template by name
      description: Name is globally unique. The template must belong to the logged-in user's company.
      operationId: list_1
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                oneOf:
                - $ref: '#/components/schemas/WorkflowTemplateResponse'
                - type: array
                  items:
                    $ref: '#/components/schemas/WorkflowTemplateResponse'
    post:
      tags:
      - workflow-template-controller
      summary: Create workflow template
      description: companyId is taken from the logged-in user.
      operationId: create_2
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowTemplateRequest'
        required: true
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/WorkflowTemplateResponse'
  /orchestrator/api/v1/workflowTemplates/{workflowTemplateId}/run:
    post:
      tags:
      - workflow-template-controller
      summary: Merge input into template and start orchestrator workflow
      description: Substitutes {{key}} placeholders using inputJson (dot paths for nested objects). Returns the Temporal workflow id and resolved definition JSON.
      operationId: runFromTemplate
      parameters:
      - name: workflowTemplateId
        in: path
        required: true
        schema:
          type: integer
          format: int64
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunWorkflowTemplateRequest'
        required: true
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RunWorkflowTemplateResponse'
  /orchestrator/api/v1/workflowTemplates/run:
    post:
      tags:
      - workflow-template-controller
      summary: Run workflow template by name
      description: Same as POST /{id}/run but resolves the template by its unique name for the user's company. Pass the template name as the query parameter name.
      operationId: runFromTemplateByName
      parameters:
      - name: name
        in: query
        required: true
        schema:
          type: string
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunWorkflowTemplateRequest'
        required: true
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RunWorkflowTemplateResponse'
  /orchestrator/api/v1/workflowTemplates/run/ONBOARDING_DATASET:
    post:
      tags:
      - workflow-template-controller
      summary: Seed onboarding demo data and run workflow from demo dataset templateName
      description: Expects input.request.datasetKeys in the body. Seeds demo tables for those keys, reads templateName from company demo dataset config, then runs that template.
      operationId: runOnboardingDataset
      parameters:
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunWorkflowTemplateRequest'
        required: true
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '404':
          description: Not Found
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/RunWorkflowTemplateResponse'
components:
  schemas:
    RunWorkflowTemplateResponse:
      type: object
      properties:
        workflowId:
          type: string
        workflowName:
          type: string
        resolvedDefinition:
          type: object
          additionalProperties:
            type: object
    SaasxlResponseDTOObject:
      type: object
      properties:
        success:
          type: boolean
        version:
          type: string
        date:
          type: string
          format: date-time
        error:
          $ref: '#/components/schemas/ErrorMessage'
        data:
          type: object
    WorkflowTemplateRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        templateJson:
          type: object
          additionalProperties:
            type: object
    ErrorMessage:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
        requestId:
          type: string
        message:
          type: object
        details:
          type: object
        errorCodes:
          type: array
          items:
            type: string
    RunWorkflowTemplateRequest:
      type: object
      properties:
        inputJson:
          type: object
          additionalProperties:
            type: object
    WorkflowTemplateResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
        name:
          type: string
        description:
          type: string
        templateJson:
          type: object
          additionalProperties:
            type: object
        createDate:
          type: string
          format: date-time
        modiDate:
          type: string
          format: date-time
  securitySchemes:
    s_jwt:
      type: http
      description: Jwt Token
      scheme: bearer
      bearerFormat: JWT