The RudderStack Data Governance API gives you full access to all your events' metadata. This includes information such as the schema of the event payload, data types, versions of event payload, etc.
This documentation describes all of the available calls in the Data Governance API, as well as the properties of the returned objects as a result.
Getting Started - Obtaining the Credentials
You can start your RudderStack backend (data plane) with the environment variables RUDDER_ADMIN_USER and RUDDER_ADMIN_PASSWORD . If you are using the RudderStack-managed hosting service, contact us for the necessary credentials.
Anyone with these credentials can use the same Data Governance API. In case it is compromised, please restart your data plane with different credentials.
API Authentication
You will need to use HTTP Basic Authentication for authenticating the APIs.
You can send the API calls using CURL/HTTPie from the command line, or with any programming language of your choice.
Understanding API responses
All successful requests will respond with a 200 HTTP status code. If the authentication fails, you will get a 400 HTTP status code with the appropriate error message.
API Reference
Please note that the base URL for all the API requests will be your RudderStack data plane URL.
schemas/event-models
Description
Arguments
Supported Method Types
Gets the event models for your data plane
None required. You may optionally add WriteKey as a query parameter to get event-models for only one source
GET
Example Request
To get all event models for your data plane, run the following command:
**EventID**is a mandatory url parameter to get metadata for an event-model. This is obtained from the above API.
GET
The metadata of given event-model comes with three information points:
SampledEvents: This includes the sample events that belong to the given event-model
TotalCount: Represents the number of events collected for the event-model
FrequentValues: This is a list of all values that frequently appear for each key in the master-schema along with their frequencies. By default, we consider any value that is seen once every hundred samples as a frequent value
Example Request
To get metadata for your event-model, run the following command:
**VersionID**a mandatory url parameter to get metadata for a schema-version. This is obtained from the above API.
GET
The metadata of given schema-version comes with three information points:
SampledEvents: This includes the sample events that follow the given schema-version
TotalCount: Represents the number of events collected with the given schema-version
FrequentValues: This is a list of all values that frequently appear for each key in the schema along with their frequencies. By default, we consider any value that is seen once every hundred samples as a frequent value
Example Request
To get metadata for your schema-versions, run the following command:
For more information on the RudderStack Data Governance API, please feel free to contact us. You can also start a conversation in our Slack community, and we will be happy to help you.