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

# Retrieve all triggers

> Retrieves all triggers matching a specific subject pattern. This endpoint provides a comprehensive view of all available triggers that match the given pattern, including their configurations, types, and associated metadata.

**Usage Notes:**
- Use wildcards in the subject pattern to match multiple triggers
- Results include all trigger types (gateway, stream, subject)
- Each trigger includes its complete configuration
- The subject pattern forms part of the unique identifier for triggers
- The response includes total count of matching triggers



## OpenAPI

````yaml /api-reference/endpoint/trigger/openapi.json get /trigger/triggers
openapi: 3.0.3
info:
  title: quiva.ai Gateway
  description: >-
    # Bellerophon Trigger Service API


    The Trigger Service is a Bellerophon API service that provides an interface
    for managing various types of triggers through a subject-based messaging
    system.


    This API allows you to create, retrieve, and delete different types of
    triggers including gateway and stream triggers.


    ## Core Concepts


    ### Triggers

    Triggers are the foundation of the Bellerophon platform's event-driven
    architecture. A trigger connects different parts of the system, allowing
    events in one component to initiate actions in another. Each trigger has a
    unique subject identifier that follows a specific naming pattern.


    ### Gateway Triggers

    Gateway triggers create API endpoints that can be accessed from outside the
    system. They define HTTP methods, paths, rate limits, and connect incoming
    requests to processing functions.


    ### Stream Triggers

    Stream triggers connect data sources to targets, enabling real-time data
    flow between components. They define how data should be processed,
    transformed, and routed within the system.


    ## Subject Structure


    The service follows a subject naming pattern which typically expands to:

    ```

    ms.trigger.[trigger_type].[resource_name]

    ```


    All API endpoints use the /trigger/ prefix in their paths for consistency
    and to clearly identify the trigger service.
  contact:
    name: Bellerophon Support
  version: '1.0'
servers:
  - url: https://api.quiva.ai
    description: Production API server
security:
  - bearer_auth: []
paths:
  /trigger/triggers:
    get:
      tags:
        - Triggers
      summary: Retrieve all triggers
      description: >-
        Retrieves all triggers matching a specific subject pattern. This
        endpoint provides a comprehensive view of all available triggers that
        match the given pattern, including their configurations, types, and
        associated metadata.


        **Usage Notes:**

        - Use wildcards in the subject pattern to match multiple triggers

        - Results include all trigger types (gateway, stream, subject)

        - Each trigger includes its complete configuration

        - The subject pattern forms part of the unique identifier for triggers

        - The response includes total count of matching triggers
      operationId: getTriggers
      parameters:
        - name: subject_pattern
          in: query
          description: >-
            The subject pattern to match triggers. Can include wildcards (e.g.,
            'ms.trigger.*' to match all triggers, or 'ms.trigger.gateway.*' to
            match only gateway triggers).
          required: true
          schema:
            type: string
            example: ms.trigger.subject_pattern
      responses:
        '200':
          description: Successfully retrieved triggers
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TriggerListResponse'
              example:
                body:
                  results:
                    - name: my-gateway-trigger
                      collection: my-collection
                      description: Trigger for API gateway endpoint
                      gateway_mapping_subject: ms.trigger.gateway.123456
                      stream: quiva-trigger-config
                      subject: ms.trigger.gateway.my-gateway-trigger
                      trigger_type: gateway
                      type: created
                    - name: my-stream-trigger
                      collection: my-collection
                      description: Stream data processing trigger
                      stream: quiva-trigger-config
                      subject: ms.trigger.stream.my-stream-trigger
                      trigger_type: stream
                      type: created
                  results_total: 2
                metadata:
                  subject: ms.trigger.subject_pattern
                status_code: 200
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    TriggerListResponse:
      type: object
      properties:
        body:
          type: object
          properties:
            results:
              type: array
              items:
                $ref: '#/components/schemas/TriggerData'
              description: Array of trigger data objects matching the query criteria.
            results_total:
              type: integer
              description: Total count of triggers matching the query criteria.
              example: 2
        metadata:
          type: object
          properties:
            subject:
              type: string
              description: Subject pattern used for the query. May contain wildcards.
              example: ms.trigger.subject_pattern
        status_code:
          type: integer
          description: HTTP status code indicating the result of the operation.
          example: 200
    TriggerData:
      type: object
      required:
        - name
        - trigger_type
      properties:
        name:
          type: string
          description: >-
            Unique name identifier for the trigger. Used to construct the
            trigger's topic and subject.
        collection:
          type: string
          description: >-
            Logical grouping the trigger belongs to. Used for organizing and
            filtering triggers.
        description:
          type: string
          description: >-
            Human-readable description explaining the trigger's purpose and
            function.
        gateway_mapping_subject:
          type: string
          description: >-
            Full subject identifier assigned to the gateway mapping. Only
            present for gateway triggers.
        stream:
          type: string
          description: >-
            Stream identifier where the trigger configuration is stored,
            typically "quiva-trigger-config".
        subject:
          type: string
          description: >-
            Full subject identifier for the trigger, following the pattern
            "ms.trigger.[type].[name]".
        trigger_type:
          type: string
          enum:
            - gateway
            - stream
            - subject
          description: >-
            Category of trigger determining its behavior and available
            properties.
        type:
          type: string
          description: >-
            Specific type identifier providing additional classification
            information.
        source:
          $ref: '#/components/schemas/TriggerSource'
        target:
          $ref: '#/components/schemas/TriggerTarget'
    Error:
      type: object
      properties:
        error:
          type: string
          description: >-
            Detailed error message explaining what went wrong and potential
            solutions.
          example: 'Invalid request: Missing required field'
        status_code:
          type: integer
          description: HTTP status code indicating the specific error type.
          example: 400
    TriggerSource:
      type: object
      properties:
        advertise:
          type: boolean
          description: >-
            Whether to advertise this trigger source to other services. When
            true, allows other services to discover this source.
        allow_trace:
          type: boolean
          description: >-
            Whether to allow request tracing. When true, enables debugging and
            performance monitoring.
        name:
          type: string
          description: >-
            Human-readable name for the source. Used for identification in logs
            and monitoring.
        response_type:
          type: string
          enum:
            - Singleton
            - Stream
            - Chunked
          description: |-
            Format of response data from this source:
            * Singleton - Returns a single response and closes
            * Stream - Continuously streams data until connection closes
            * Chunked - Returns paginated data in multiple responses
        subject:
          type: string
          description: >-
            Subject identifier for the source. Used for routing messages to/from
            this source.
        type:
          type: string
          enum:
            - stream
            - service
          description: |-
            Export type categorizing how this source behaves:
            * stream - Emits a continuous flow of data
            * service - Provides request/response functionality
        description:
          type: string
          description: >-
            Detailed information about the source including its purpose and data
            format.
        info_url:
          type: string
          description: >-
            URL pointing to additional documentation or information about this
            source.
    TriggerTarget:
      type: object
      properties:
        name:
          type: string
          description: >-
            Human-readable name for the target. Used for identification in logs
            and monitoring.
        subject:
          type: string
          description: >-
            Subject identifier for the target. Used for routing messages to this
            target.
        account:
          type: string
          description: >-
            Account identifier owning or associated with this target. Used for
            access control.
        local_subject:
          type: string
          description: Alternative subject for local routing within the same account.
        type:
          type: string
          enum:
            - stream
            - service
          description: |-
            Export type categorizing how this target behaves:
            * stream - Consumes a continuous flow of data
            * service - Provides request/response functionality
        share:
          type: boolean
          description: >-
            Whether this target is shareable with other accounts. When true,
            allows cross-account access.
        allow_trace:
          type: boolean
          description: >-
            Whether to allow request tracing to this target. When true, enables
            debugging and performance monitoring.
  responses:
    BadRequest:
      description: >-
        Invalid request. Occurs when required parameters are missing, validation
        fails, or the request format is incorrect.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: >-
              Invalid request: Missing required field 'name' in trigger
              definition
            status_code: 400
    Unauthorized:
      description: >-
        Unauthorized access. Occurs when authentication is missing or invalid,
        or when the authenticated user lacks permission.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'Unauthorized: Invalid or missing authentication token'
            status_code: 401
    InternalServerError:
      description: >-
        Internal server error. Occurs when an unexpected condition prevents the
        server from fulfilling the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: 'Internal server error: Unable to process request at this time'
            status_code: 500
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT token for authentication. Required for all API operations to verify
        identity and access permissions.

````