Skip to content

Event Registry APIs

Authorization

The X-Environment header is used to indicate the event environment for which you will fetch the schema. To prevent accidental operations within sensitive environments, mutable operations like UPDATE are not allowed on higher environments (Stage and Production). Examples of lower environments to indicate in the X-Environment field are: dev, dev2, qa, pt.

Data

The schema of the data field contents in the payload, published by the publisher application, has to be stored in the Events Registry. The registry URL for the same needs to be mentioned in the dataschema{:target=“_blank”} field of the payload while publishing.

Events service supports the following schema types for data elements:

  • ASYNCAPI
  • AVRO
  • GRAPHQL
  • JSON (use JSON for YAML schema)
  • OPENAPI
  • PROTOBUF
  • WSDL
  • XSD

The version path parameter is the version of the data stored and it does not conform with the Event’s version.

Path parameters

  • The namespace provided by the Events team
  • name of the Event that is published
  • version of the data schema

Headers

  • TID JWT JSON web token (JWT) is a standard for securely transmitting information between parties. For example, id_token is a JWT Token

Endpoints

Environment Endpoint Hosting Location
Stage https://cloud.stage.api.trimblecloud.com/events/registry/1.0/ United States (US)
Production https://cloud.api.trimble.com/events/registry/1.0/ United States (US)
https://eu1.api.trimble.com/events/registry/1.0/ Europe (EU)
https://au.api.trimble.com/events/registry/1.0/ Australia (AU)
https://ap.api.trimble.com/events/registry/1.0/ Asia Pacific (AP)

Examples

Create:

curl --location --request POST 'https://cloud.stage.api.trimblecloud.com/events/registry/1.0/registry/content/schematype/data/namespaces/{namespace}/events/{event}/{version}' \
--header 'Content-Type: */*' \
--header 'Authorization: Bearer {token}' \
--data-raw '//Data Schema'
GET

Get:

curl --location --request GET 'https://cloud.stage.api.trimblecloud.com/events/registry/1.0/registry/content/schematype/data/namespaces/{namespace}/events/{event}/{version}' \
--header 'Content-Type: */*' \
--header 'Authorization: Bearer {token}'

Update:

curl --location --request PUT 'https://cloud.stage.api.trimblecloud.com/events/registry/1.0/registry/content/schematype/data/namespaces/{namespace}/events/{event}/{version}' \
--header 'Content-Type: */*' \
--header 'X-Environment: qa' \
--header 'Authorization: Bearer {token}' \
--data-raw '//Data Schema'