Method: projects.locations.channelConnections.publishEvents

messageBuses.publish events to a ChannelConnection in a partner's project.

HTTP request

POST https://eventarcpublishing.googleapis.com/v1/{channelConnection=projects/*/locations/*/channelConnections/*}:publishEvents

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
channelConnection

string

The channelConnection that the events are published from. For example: projects/{partner_project_id}/locations/{location}/channelConnections/{channelConnectionId}.

Request body

The request body contains data with the following structure:

JSON representation
{
  "events": [
    {
      "@type": string,
      field1: ...,
      ...
    }
  ],
  "textEvents": [
    string
  ]
}
Fields
events[]

object

The CloudEvents v1.0 events to publish. No other types are allowed. If this field is set, then the textEvents fields must not be set.

An object containing fields of an arbitrary type. An additional field "@type" contains a URI identifying the type. Example: { "id": 1234, "@type": "types.example.com/standard/id" }.

textEvents[]

string

The text representation of events to publish. CloudEvent v1.0 in JSON format is the only allowed type. Refer to https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md for specification. If this field is set, then the events fields must not be set.

Response body

If successful, the response body is empty.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.