Google Cloud Eventarc API

The Eventarc API enables you to create and manage event triggers, channels, and channel connections for routing events between providers and subscribers. It supports CloudEvents-compliant event delivery to Cloud Run, Cloud Functions, GKE, and Workflows targets.

OpenAPI Specification

openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Google Cloud Eventarc API
  description: >-
    The Eventarc API enables event-driven architecture by allowing you to create
    triggers that route events from providers to target destinations such as
    Cloud Run, Cloud Functions, GKE, and Workflows.
  version: v1
  contact:
    name: Google Cloud
    url: https://cloud.google.com/eventarc/docs
servers:
  - url: https://eventarc.googleapis.com
paths:
  /v1/projects/{project}/locations/{location}/triggers:
    get:
      operationId: listTriggers
      summary: Google Cloud Eventarc List triggers
      description: Lists triggers in a project and location.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTriggersResponse'
      tags:
        - Projects
    post:
      operationId: createTrigger
      summary: Google Cloud Eventarc Create a trigger
      description: Creates a new event trigger.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
        - name: triggerId
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Trigger'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      tags:
        - Projects
  /v1/projects/{project}/locations/{location}/triggers/{trigger}:
    get:
      operationId: getTrigger
      summary: Google Cloud Eventarc Get a trigger
      description: Gets an event trigger.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
        - name: trigger
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Trigger'
      tags:
        - Projects
    patch:
      operationId: updateTrigger
      summary: Google Cloud Eventarc Update a trigger
      description: Updates an event trigger.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
        - name: trigger
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Trigger'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      tags:
        - Projects
    delete:
      operationId: deleteTrigger
      summary: Google Cloud Eventarc Delete a trigger
      description: Deletes an event trigger.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
        - name: trigger
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      tags:
        - Projects
  /v1/projects/{project}/locations/{location}/channels:
    get:
      operationId: listChannels
      summary: Google Cloud Eventarc List channels
      description: Lists channels in a project and location.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListChannelsResponse'
      tags:
        - Projects
    post:
      operationId: createChannel
      summary: Google Cloud Eventarc Create a channel
      description: Creates a new channel for event routing.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
        - name: channelId
          in: query
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Channel'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      tags:
        - Projects
  /v1/projects/{project}/locations/{location}/channels/{channel}:
    get:
      operationId: getChannel
      summary: Google Cloud Eventarc Get a channel
      description: Gets a channel.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
        - name: channel
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Channel'
      tags:
        - Projects
    delete:
      operationId: deleteChannel
      summary: Google Cloud Eventarc Delete a channel
      description: Deletes a channel.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
        - name: channel
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Operation'
      tags:
        - Projects
  /v1/projects/{project}/locations/{location}/providers:
    get:
      operationId: listProviders
      summary: Google Cloud Eventarc List providers
      description: Lists event providers in a project and location.
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
        - name: location
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListProvidersResponse'
      tags:
        - Projects
components:
  schemas:
    Trigger:
      type: object
      properties:
        name:
          type: string
          description: >-
            The trigger name in the format
            projects/{project}/locations/{location}/triggers/{trigger}.
        eventFilters:
          type: array
          items:
            $ref: '#/components/schemas/EventFilter'
        serviceAccount:
          type: string
        destination:
          $ref: '#/components/schemas/Destination'
        transport:
          $ref: '#/components/schemas/Transport'
        channel:
          type: string
        createTime:
          type: string
          format: date-time
        updateTime:
          type: string
          format: date-time
    EventFilter:
      type: object
      properties:
        attribute:
          type: string
          description: The name of the event filter attribute.
        value:
          type: string
          description: The value of the event filter attribute.
        operator:
          type: string
          description: The operator used for matching the event filter.
    Destination:
      type: object
      properties:
        cloudRun:
          $ref: '#/components/schemas/CloudRun'
        cloudFunction:
          type: string
        gke:
          $ref: '#/components/schemas/GKE'
        workflow:
          type: string
    CloudRun:
      type: object
      properties:
        service:
          type: string
        path:
          type: string
        region:
          type: string
    GKE:
      type: object
      properties:
        cluster:
          type: string
        location:
          type: string
        namespace:
          type: string
        service:
          type: string
        path:
          type: string
    Transport:
      type: object
      properties:
        pubsub:
          type: object
          properties:
            topic:
              type: string
            subscription:
              type: string
    Channel:
      type: object
      properties:
        name:
          type: string
        provider:
          type: string
        state:
          type: string
          enum:
            - STATE_UNSPECIFIED
            - PENDING
            - ACTIVE
            - INACTIVE
        createTime:
          type: string
          format: date-time
        updateTime:
          type: string
          format: date-time
    Provider:
      type: object
      properties:
        name:
          type: string
        displayName:
          type: string
        eventTypes:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              description:
                type: string
    Operation:
      type: object
      properties:
        name:
          type: string
        done:
          type: boolean
        metadata:
          type: object
        response:
          type: object
        error:
          type: object
    ListTriggersResponse:
      type: object
      properties:
        triggers:
          type: array
          items:
            $ref: '#/components/schemas/Trigger'
        nextPageToken:
          type: string
    ListChannelsResponse:
      type: object
      properties:
        channels:
          type: array
          items:
            $ref: '#/components/schemas/Channel'
        nextPageToken:
          type: string
    ListProvidersResponse:
      type: object
      properties:
        providers:
          type: array
          items:
            $ref: '#/components/schemas/Provider'
        nextPageToken:
          type: string
tags:
  - name: Projects