RunWhen workflow-v4 API

The workflow-v4 API from RunWhen — 3 operation(s) for workflow-v4.

OpenAPI Specification

runwhen-workflow-v4-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: papi alert-query-proxy workflow-v4 API
  description: RunWhen Platform API
  version: 2.0.0
tags:
- name: workflow-v4
paths:
  /api/v4/workspaces/{workspace_name}/workflows:
    get:
      tags:
      - workflow-v4
      summary: List Workflows
      operationId: list_workflows_api_v4_workspaces__workspace_name__workflows_get
      parameters:
      - name: workspace_name
        in: path
        required: true
        schema:
          type: string
          title: Workspace Name
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 1000
          minimum: 1
          description: Maximum number of results
          default: 100
          title: Limit
        description: Maximum number of results
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          description: Number of results to skip
          default: 0
          title: Offset
        description: Number of results to skip
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowListResponseV4'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - BearerAuth: []
  /api/v4/workspaces/{workspace_name}/workflows/{workflow_name}:
    get:
      tags:
      - workflow-v4
      summary: Get Workflow
      operationId: get_workflow_api_v4_workspaces__workspace_name__workflows__workflow_name__get
      parameters:
      - name: workspace_name
        in: path
        required: true
        schema:
          type: string
          title: Workspace Name
      - name: workflow_name
        in: path
        required: true
        schema:
          type: string
          title: Workflow Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowResponseV4'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - BearerAuth: []
    delete:
      tags:
      - workflow-v4
      summary: Soft-delete a Workflow (V4, short-name URL)
      description: Soft-delete a Workflow by its short name (mirrors the v4 GET URL).
      operationId: delete_workflow_api_v4_workspaces__workspace_name__workflows__workflow_name__delete
      parameters:
      - name: workspace_name
        in: path
        required: true
        schema:
          type: string
          title: Workspace Name
      - name: workflow_name
        in: path
        required: true
        schema:
          type: string
          title: Workflow Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - BearerAuth: []
  /api/v4/workspaces/{workspace_name}/workflows/sync-typed:
    post:
      tags:
      - workflow-v4
      summary: Upsert a Workflow (V4 typed payload)
      operationId: sync_workflow_typed_api_v4_workspaces__workspace_name__workflows_sync_typed_post
      parameters:
      - name: workspace_name
        in: path
        required: true
        schema:
          type: string
          title: Workspace Name
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowSyncRequestV4'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
      - BearerAuth: []
components:
  schemas:
    WorkflowListResponseV4:
      properties:
        results:
          items:
            $ref: '#/components/schemas/WorkflowResponseV4'
          type: array
          title: Results
        count:
          type: integer
          title: Count
        next:
          anyOf:
          - type: string
          - type: 'null'
          title: Next
        previous:
          anyOf:
          - type: string
          - type: 'null'
          title: Previous
      type: object
      required:
      - results
      - count
      title: WorkflowListResponseV4
      description: Paginated list of Workflows.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    WorkflowSyncRequestV4:
      properties:
        payload:
          $ref: '#/components/schemas/WorkflowPayloadV4'
        lastSyncedAt:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Lastsyncedat
      additionalProperties: false
      type: object
      required:
      - payload
      title: WorkflowSyncRequestV4
      description: 'Body of POST /api/v4/workspaces/{ws}/workflows/sync-typed.


        ``modified_by`` is not accepted: the server derives it from the JWT via

        ``get_effective_modifier``. Unknown keys (including ``modified_by``)

        raise 422 because ``V4RequestModel`` sets ``extra="forbid"``.'
    WorkflowResponseV4:
      properties:
        id:
          type: integer
          title: Id
        name:
          type: string
          title: Name
          description: 'Full workflow name: workspace--workflow-short-name'
        shortName:
          type: string
          title: Shortname
        workspaceId:
          type: integer
          title: Workspaceid
        definition:
          additionalProperties: true
          type: object
          title: Definition
        createdAt:
          type: string
          format: date-time
          title: Createdat
        modifiedAt:
          type: string
          format: date-time
          title: Modifiedat
      type: object
      required:
      - id
      - name
      - shortName
      - workspaceId
      - createdAt
      - modifiedAt
      title: WorkflowResponseV4
      description: Flat-shape Workflow detail response.
    WorkflowPayloadV4:
      properties:
        name:
          type: string
          title: Name
        definition:
          additionalProperties: true
          type: object
          title: Definition
      additionalProperties: false
      type: object
      required:
      - name
      title: WorkflowPayloadV4
      description: Writable subset of Workflow (the body of a sync upsert).
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT access token from /api/v3/token/ or Auth0 login