post:
  x-eov-operation-id: stopManyExecutions
  x-eov-operation-handler: v1/handlers/executions/executions.handler
  tags:
    - Execution
  summary: Stop multiple executions
  description: Stop multiple executions from your instance based on filter criteria.
  requestBody:
    required: true
    content:
      application/json:
        schema:
          type: object
          required:
            - status
          properties:
            status:
              type: array
              description: Array of execution statuses to stop. Must include at least one status.
              items:
                type: string
                enum: ['queued', 'running', 'waiting']
              example: ['queued', 'running', 'waiting']
            workflowId:
              type: string
              description: Optional workflow ID to filter executions. If not provided, will stop executions across all accessible workflows.
              example: '2tUt1wbLX592XDdX'
            startedAfter:
              type: string
              format: date-time
              description: Only stop executions that started after this time.
              example: '2024-01-01T00:00:00.000Z'
            startedBefore:
              type: string
              format: date-time
              description: Only stop executions that started before this time.
              example: '2024-12-31T23:59:59.999Z'
  responses:
    '200':
      description: Operation successful.
      content:
        application/json:
          schema:
            type: object
            properties:
              stopped:
                type: number
                description: The number of executions that were successfully stopped.
                example: 5
    '400':
      $ref: '../../../../shared/spec/responses/badRequest.yml'
    '401':
      $ref: '../../../../shared/spec/responses/unauthorized.yml'
