> ## Documentation Index
> Fetch the complete documentation index at: https://trigger.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List bulk actions

> List bulk actions in the current environment. Bulk actions are returned newest first and can be paginated with cursor pagination.



## OpenAPI

````yaml v3-openapi GET /api/v1/bulk-actions
openapi: 3.1.0
info:
  title: Trigger.dev v3 REST API
  description: >-
    The REST API lets you trigger and manage runs on Trigger.dev. You can
    trigger a run, get the status of a run, and get the results of a run. 
  version: 2024-04
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://api.trigger.dev
    description: Trigger.dev API
security: []
paths:
  /api/v1/bulk-actions:
    get:
      tags:
        - bulk-actions
      summary: List bulk actions
      description: >-
        List bulk actions in the current environment. Bulk actions are returned
        newest first and can be paginated with cursor pagination.
      operationId: list_bulk_actions_v1
      parameters:
        - $ref: '#/components/parameters/bulkActionsCursorPagination'
      responses:
        '200':
          description: Successful request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBulkActionsResult'
        '400':
          description: Invalid query parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized request
      security:
        - secretKey: []
      x-codeSamples:
        - lang: typescript
          label: List bulk actions
          source: |-
            import { runs } from "@trigger.dev/sdk";

            let page = await runs.bulk.list({ limit: 20 });

            for (const action of page.data) {
              console.log(action.id, action.type, action.status);
            }
components:
  parameters:
    bulkActionsCursorPagination:
      in: query
      name: page
      style: deepObject
      explode: true
      description: >
        Use this parameter to paginate bulk actions. Pass `page[after]` or
        `page[before]` using the cursor returned in the previous response.
      schema:
        type: object
        properties:
          size:
            type: integer
            maximum: 100
            minimum: 1
            default: 25
            description: Number of bulk actions per page. Maximum is 100.
          after:
            type: string
            description: The cursor to start the page after.
          before:
            type: string
            description: The cursor to start the page before.
  schemas:
    ListBulkActionsResult:
      type: object
      required:
        - data
        - pagination
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BulkActionObject'
        pagination:
          type: object
          properties:
            next:
              type: string
              description: Pass this cursor as `page[after]` to retrieve the next page.
            previous:
              type: string
              description: >-
                Pass this cursor as `page[before]` to retrieve the previous
                page.
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          example: Something went wrong
      required:
        - error
    BulkActionObject:
      type: object
      required:
        - id
        - type
        - status
        - counts
        - createdAt
      properties:
        id:
          type: string
          description: The bulk action ID, prefixed with `bulk_`.
          example: bulk_1234
        name:
          type: string
          description: The name provided when the bulk action was created.
        type:
          type: string
          enum:
            - CANCEL
            - REPLAY
        status:
          type: string
          enum:
            - PENDING
            - COMPLETED
            - ABORTED
        counts:
          type: object
          required:
            - total
            - success
            - failure
          properties:
            total:
              type: integer
              description: The number of runs selected when the bulk action was created.
            success:
              type: integer
              description: The number of runs processed successfully.
            failure:
              type: integer
              description: The number of runs that could not be processed.
        createdAt:
          type: string
          format: date-time
        completedAt:
          type: string
          format: date-time
  securitySchemes:
    secretKey:
      type: http
      scheme: bearer
      description: >
        Use a named environment API key. It starts with `tr_dev_sk_`,
        `tr_prod_sk_`, `tr_stg_sk_`, etc.


        Create a named API key in the API Keys section of your Trigger.dev
        project dashboard. Choose the narrowest access preset that supports your
        integration.


        Our TypeScript SDK will default to using the value of the
        `TRIGGER_SECRET_KEY` environment variable if it is set. If you are using
        the SDK in a different environment, you can set the key using the
        `configure` function.


        ```typescript

        import { configure } from "@trigger.dev/sdk";


        configure({ accessToken: "tr_dev_sk_1234" });

        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.