Last updated
Was this helpful?
Last updated
Was this helpful?
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.
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, 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.
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.
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.
Please note that the base URL for all the API requests will be your RudderStack data plane URL.
To get all event models for your data plane, run the following command:
Example Response
To get all event models for a specific source, pass the write key as a query parameter, as shown:
Example Response
Example Request
To get the schema versions for your event type, run the following command:
Example Response
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:
Example Response
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:
Example Response
Example Request
To get the key-wise counts for any given event-model, run the following command:
Example Response
Example Request
To get the missing keys for an event-version, run the following command:
Example Response
For more information on the RudderStack Data Governance API, please feel free to . You can also start a conversation in our community, and we will be happy to help you.
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
Description
Arguments
Supported Method Types
Gets the schema versions for an event type.
EventID
is a mandatory query parameter to get the schema
versions for an event model. This is obtained from the above API
(event-models).
GET
Description
Arguments
Supported Method Types
Gets the metadata for an event-model
**EventID
**is a mandatory url parameter to get metadata for an event-model. This is obtained from the above API.
GET
Description
Arguments
Supported Method Types
Gets the metadata for a schema-version
**VersionID
**a mandatory url parameter to get metadata for a schema-version. This is obtained from the above API.
GET
Description
Arguments
Supported Method Types
Gets the key-wise counts for an event-model
EventID
is a mandatory url parameter to get the keys count for an event-model. This is obtained from the above API.
GET
Description
Arguments
Supported Method Types
Gets the missing keys for an event-version
VersionID
is a mandatory url parameter to get the missing keys for a schema-version. This is obtained from the above API.
GET
Detailed technical documentation of the RudderStack Data Governance API calls and properties of the returned objects.