Event Audit API v1 Ensure compliance with your data governance policies.
RudderStack’s Event Audit API gives you full access to your event metadata. This data includes event payload schemas, data types, and event payload versions.
This document describes the available calls in the Event Audit API, as well as request parameters and returned object properties.
Authentication To authenticate with the Event Audit API, you will need your RUDDER_ADMIN_USER
and RUDDER_ADMIN_PASSWORD
. If you are using the RudderStack-managed hosting service, contact support for the necessary credentials.
Use HTTP Basic authentication with your Rudder admin username and password to authenticate requests.
Authorization: Basic <RUDDER_ADMIN_USER>:<RUDDER_ADMIN_PASSWORD>
Anyone with these credentials can use the same Event Audit API. In case it is compromised, please restart your data plane with different credentials.
Base URL Use the data plane URLThe data plane URL is the location where events are routed and sent to the RudderStack backend for processing. You can find this URL in the home page of your RudderStack dashboard. as the base URL for your API requests.
List event models Get the event models for your data plane.
Query parameters
string
Optionally include your write key as a query parameter to get event models for only one source. Example Request :
GET /schemas/event-models HTTP / 1.1
Host : <YOUR_DATA_PLANE_URL>
Authorization : Basic UlVEREVSX0FETUlOX1VTRVI6UlVEREVSX0FETUlOX1BBU1M=
curl -u <RUDDER_ADMIN_USER>:<RUDDER_ADMIN_PASSWORD> https://<DATA_PLANE_URL>/schemas/event-models
Example Response :
[
{
"ID" : 40 ,
"EventID" : "1b02d5ec-83b9-405e-ba86-7693d0a2b52b" ,
"WriteKey" : "1Xbp2IIhsZcwqENLgSEJusU70GH" ,
"EventType" : "track" ,
"EventIdentifier" : "Product Purchased" ,
"CreatedAt" : "2020-12-07T22:10:13.945156Z" ,
"Schema" : {
"type" : "string" ,
"event" : "string" ,
"sentAt" : "string" ,
"userId" : "string" ,
"rudderId" : "string" ,
"messageId" : "string" ,
"timestamp" : "string" ,
"context.ip" : "string" ,
"anonymousId" : "string" ,
"properties.name" : "string" ,
"originalTimestamp" : "string" ,
"properties.revenue" : "float64" ,
"context.library.name" : "string"
},
"LastSeen" : "2020-12-07T22:10:09.247534Z" ,
"TotalCount" : 5
},
{
"ID" : 41 ,
"EventID" : "96f10d53-3a94-47a2-95e7-6cca99daed1e" ,
"WriteKey" : "1cUFbgdRJj8LYpA6zGV3O5dGpAq" ,
"EventType" : "page" ,
"EventIdentifier" : "Product Viewed" ,
"CreatedAt" : "2020-12-06T20:17:43.945156Z" ,
"Schema" : {
"type" : "string" ,
"name" : "string" ,
"sentAt" : "string" ,
"userId" : "string" ,
"rudderId" : "string" ,
"messageId" : "string" ,
"timestamp" : "string" ,
"context.ip" : "string" ,
"anonymousId" : "string" ,
"properties.name" : "string" ,
"originalTimestamp" : "string" ,
"context.library.name" : "string"
},
"LastSeen" : "2020-12-07T22:10:09.247534Z" ,
"TotalCount" : 20
}
]
Get event models for a specific source If you want only event models for a specific source, pass the write keyThe write key (or source write key) is a unique identifier for your source. RudderStack uses this key to send events from a source to the specified destination. as a query parameter.
Example Request :
GET /schemas/event-models?WriteKey=1Xbp2IIhsZcwqENLgSEJusU70GH HTTP / 1.1
Host : https://<DATA_PLANE_URL>
Authorization : Basic UlVEREVSX0FETUlOX1VTRVI6UlVEREVSX0FETUlOX1BBU1M=
curl -u <RUDDER_ADMIN_USER>:<RUDDER_ADMIN_PASSWORD> https://<DATA_PLANE_URL>/schemas/event-models?WriteKey= 1Xbp2IIhsZcwqENLgSEJusU70GH
Example Response :
[
{
"ID" : 40 ,
"EventID" : "1b02d5ec-83b9-405e-ba86-7693d0a2b52b" ,
"WriteKey" : "1Xbp2IIhsZcwqENLgSEJusU70GH" ,
"EventType" : "track" ,
"EventIdentifier" : "Product Purchased" ,
"CreatedAt" : "2020-12-07T22:10:13.945156Z" ,
"Schema" : {
"type" : "string" ,
"event" : "string" ,
"sentAt" : "string" ,
"userId" : "string" ,
"rudderId" : "string" ,
"messageId" : "string" ,
"timestamp" : "string" ,
"context.ip" : "string" ,
"anonymousId" : "string" ,
"properties.name" : "string" ,
"originalTimestamp" : "string" ,
"properties.revenue" : "float64" ,
"context.library.name" : "string"
},
"LastSeen" : "2020-12-07T22:10:09.247534Z" ,
"TotalCount" : 5
}
]
List event versions Get the schema versions for an event type.
GET
/schemas/event-versions
Query parameters
string
Mandatory parameter to get the schema versions for an event model. Obtain the EventID
from GET /schemas/event-models
. Example Request :
GET /schemas/event-versions?EventID=1b02d5ec-83b9-405e-ba86-7693d0a2b52b HTTP / 1.1
Host : https://<DATA_PLANE_URL>
Authorization : Basic UlVEREVSX0FETUlOX1VTRVI6UlVEREVSX0FETUlOX1BBU1M=
curl -u <RUDDER_ADMIN_USER>:<RUDDER_ADMIN_PASSWORD> https://<DATA_PLANE_URL>/schemas/event-versions?EventID= 1b02d5ec-83b9-405e-ba86-7693d0a2b52b
Example Response :
[
{
"ID" : 39 ,
"VersionID" : "9e9e6da4-24b7-4cf9-a194-8acb040d7422" ,
"EventModelID" : "1b02d5ec-83b9-405e-ba86-7693d0a2b52b" ,
"Schema" : {
"type" : "string" ,
"event" : "string" ,
"sentAt" : "string" ,
"userId" : "string" ,
"rudderId" : "string" ,
"messageId" : "string" ,
"context.ip" : "string" ,
"anonymousId" : "string" ,
"properties.name" : "string" ,
"originalTimestamp" : "string" ,
"properties.revenue" : "float64" ,
"context.library.name" : "string"
},
"FirstSeen" : "2020-12-07T22:00:38.437051Z" ,
"LastSeen" : "2020-12-07T22:08:04.036091Z" ,
"TotalCount" : 4
},
{
"ID" : 40 ,
"VersionID" : "b39800d9-55d5-4163-b859-1bca04c4003b" ,
"EventModelID" : "1b02d5ec-83b9-405e-ba86-7693d0a2b52b" ,
"Schema" : {
"type" : "string" ,
"event" : "string" ,
"userId" : "string" ,
"rudderId" : "string" ,
"messageId" : "string" ,
"timestamp" : "string" ,
"context.ip" : "string" ,
"anonymousId" : "string" ,
"properties.name" : "string" ,
"properties.revenue" : "float64" ,
"context.library.name" : "string"
},
"FirstSeen" : "2020-12-07T22:10:09.247629Z" ,
"LastSeen" : "2020-12-07T22:10:09.247698Z" ,
"TotalCount" : 1
}
]
Retrieve metadata for an event model.
GET
/schemas/event-model/{EventID}/metadata
Path parameters
string
Mandatory path parameter to get metadata for an event model. Obtain the EventID
from GET /schemas/event-models
. Response object parameters :
array
The sample events belonging to the event model. number
The number of events collected for the event model. object
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 :
GET /schemas/event-model/96f10d53-3a94-47a2-95e7-6cca99daed1e/metadata HTTP / 1.1
Host : https://<DATA_PLANE_URL>
Authorization : Basic UlVEREVSX0FETUlOX1VTRVI6UlVEREVSX0FETUlOX1BBU1M=
curl -u <RUDDER_ADMIN_USER>:<RUDDER_ADMIN_PASSWORD> https://<DATA_PLANE_URL>/schemas/event-model/96f10d53-3a94-47a2-95e7-6cca99daed1e/metadata
Example Response :
{
"SampledEvents" : [
{
"anonymousId" : "1hg89d6hvskmygt83nst" ,
"context" : {
"ip" : "1.2.3.4" ,
"library" : {
"name" : "http"
}
},
"event" : "Product Purchased" ,
"messageId" : "messageID" ,
"originalTimestamp" : "2020-02-02T00:23:09.544Z" ,
"properties" : {
"name" : "Shirt" ,
"revenue" : 14.99
},
"rudderId" : "d2c78239-ffb7-46b9-9bf9-e995465873b1" ,
"sentAt" : "2020-02-02T00:23:09.544Z" ,
"type" : "track" ,
"userId" : "user12345"
},
{
"anonymousId" : "1hg89d6hvskmygt83nst" ,
"context" : {
"ip" : "1.2.3.4" ,
"library" : {
"name" : "http"
}
},
"event" : "Product Purchased" ,
"messageId" : "messageID" ,
"properties" : {
"name" : "Shirt" ,
"revenue" : 14.99
},
"rudderId" : "d2c78239-ffb7-46b9-9bf9-e995465873b1" ,
"timestamp" : "2020-02-02T00:23:09.544Z" ,
"type" : "track" ,
"userId" : "user12345"
}
],
"TotalCount" : 5 ,
"FrequentValues" : {
"anonymousId" : [
{
"Value" : "1hg89d6hvskmygt83nst" ,
"Frequency" : 1
}
],
"context.ip" : [
{
"Value" : "1.2.3.4" ,
"Frequency" : 1
}
],
"context.library.name" : [
{
"Value" : "http" ,
"Frequency" : 1
}
],
"event" : [
{
"Value" : "Product Purchased" ,
"Frequency" : 1
}
],
"messageId" : [
{
"Value" : "messageID" ,
"Frequency" : 1
}
],
"originalTimestamp" : [
{
"Value" : "2020-02-02T00:23:09.544Z" ,
"Frequency" : 1
}
],
"properties.name" : [
{
"Value" : "Shirt" ,
"Frequency" : 1
}
],
"properties.revenue" : [
{
"Value" : "14.99" ,
"Frequency" : 1
}
],
"rudderId" : [
{
"Value" : "d2c78239-ffb7-46b9-9bf9-e995465873b1" ,
"Frequency" : 1
}
],
"sentAt" : [
{
"Value" : "2020-02-02T00:23:09.544Z" ,
"Frequency" : 1
}
],
"timestamp" : [
{
"Value" : "2020-02-02T00:23:09.544Z" ,
"Frequency" : 1
}
],
"type" : [
{
"Value" : "track" ,
"Frequency" : 1
}
],
"userId" : [
{
"Value" : "user12345" ,
"Frequency" : 1
}
]
}
}
Retrieve a listing of the metadata for a specific schema version.
GET
/schemas/event-version/{VersionID}/metadata
Path parameters
string
Mandatory path parameter to get metadata for a schema version. Obtain the VersionID
from GET /schemas/event-models
. Response object parameters :
array
The sample events belonging to the given schema version. number
The number of events collected for the given schema version. object
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 :
GET /schemas/event-version/96f10d53-3a94-47a2-95e7-6cca99daed1e/metadata HTTP / 1.1
Host : https://<DATA_PLANE_URL>
Authorization : Basic UlVEREVSX0FETUlOX1VTRVI6UlVEREVSX0FETUlOX1BBU1M=
curl -u <RUDDER_ADMIN_USER>:<RUDDER_ADMIN_PASSWORD> https://<DATA_PLANE_URL>/schemas/event-version/96f10d53-3a94-47a2-95e7-6cca99daed1e/metadata
Example Response :
{
"SampledEvents" : [
{
"anonymousId" : "1hg89d6hvskmygt83nst" ,
"context" : {
"ip" : "1.2.3.4" ,
"library" : {
"name" : "http"
}
},
"event" : "Product Purchased" ,
"messageId" : "messageID" ,
"originalTimestamp" : "2020-02-02T00:23:09.544Z" ,
"properties" : {
"name" : "Shirt" ,
"revenue" : 14.99
},
"rudderId" : "d2c78239-ffb7-46b9-9bf9-e995465873b1" ,
"sentAt" : "2020-02-02T00:23:09.544Z" ,
"type" : "track" ,
"userId" : "user12345"
}
],
"TotalCount" : 4 ,
"FrequentValues" : {
"anonymousId" : [
{
"Value" : "1hg89d6hvskmygt83nst" ,
"Frequency" : 1
}
],
"context.ip" : [
{
"Value" : "1.2.3.4" ,
"Frequency" : 1
}
],
"context.library.name" : [
{
"Value" : "http" ,
"Frequency" : 1
}
],
"event" : [
{
"Value" : "Product Purchased" ,
"Frequency" : 1
}
],
"messageId" : [
{
"Value" : "messageID" ,
"Frequency" : 1
}
],
"originalTimestamp" : [
{
"Value" : "2020-02-02T00:23:09.544Z" ,
"Frequency" : 1
}
],
"properties.name" : [
{
"Value" : "Shirt" ,
"Frequency" : 1
}
],
"properties.revenue" : [
{
"Value" : "14.99" ,
"Frequency" : 1
}
],
"rudderId" : [
{
"Value" : "d2c78239-ffb7-46b9-9bf9-e995465873b1" ,
"Frequency" : 1
}
],
"sentAt" : [
{
"Value" : "2020-02-02T00:23:09.544Z" ,
"Frequency" : 1
}
],
"type" : [
{
"Value" : "track" ,
"Frequency" : 1
}
],
"userId" : [
{
"Value" : "user12345" ,
"Frequency" : 1
}
]
}
}
Get key counts for an event model Gets the key-wise counts for an event model.
GET
/schemas/event-model/{EventID}/key-counts
Path parameters
string
Mandatory path parameter to get key counts for the given event model. Obtain the EventID
from GET /schemas/event-models
. Example Request :
GET /schemas/event-model/ad00285b-f49f-4d4f-88e0-8ec293bbd5c7/key-counts HTTP / 1.1
Host : https://<DATA_PLANE_URL>
Authorization : Basic UlVEREVSX0FETUlOX1VTRVI6UlVEREVSX0FETUlOX1BBU1M=
curl -u <RUDDER_ADMIN_USER>:<DATA_PLANE_URL> https://<your-data-plane-url>/schemas/event-model/ad00285b-f49f-4d4f-88e0-8ec293bbd5c7/key-counts
Example Response :
{
"anonymousId" : 1234 ,
"channel" : 1372 ,
"context.app.build" : 607 ,
"context.app.name" : 607 ,
"context.app.namespace" : 607 ,
"context.app.version" : 607 ,
"context.device.id" : 1372 ,
"context.device.manufacturer" : 1372 ,
"context.device.model" : 1372 ,
"context.device.name" : 1372 ,
"context.library.name" : 1372 ,
"context.locale" : 1372 ,
"context.network.carrier" : 1372 ,
"context.screen.density" : 1372 ,
"context.screen.height" : 1372 ,
"context.screen.width" : 1372 ,
"context.traits.anonymousId" : 1372 ,
"context.user_agent" : 1372 ,
"event" : 1372 ,
"integrations.All" : 1372 ,
"messageId" : 1372 ,
"originalTimestamp" : 1372 ,
"properties.category" : 607 ,
"properties.label" : 607 ,
"properties.value" : 607 ,
"sentAt" : 1372 ,
"type" : 1372
}
Get missing keys for a schema version GET
/schemas/event-version/{VersionID}/missing-keys
Path parameters
string
Mandatory path parameter to get missing keys for the given schema version. Obtain the VersionID
from GET /schemas/event-versions
. Example Request :
GET /schemas/event-version/ad00285b-f49f-4d4f-88e0-8ec293bbd5c7/missing-keys HTTP / 1.1
Host : https://<DATA_PLANE_URL>
Authorization : Basic UlVEREVSX0FETUlOX1VTRVI6UlVEREVSX0FETUlOX1BBU1M=
curl -u <RUDDER_ADMIN_USER>:<RUDDER_ADMIN_PASSWORD> https://<DATA_PLANE_URL>/schemas/ad00285b-f49f-4d4f-88e0-8ec293bbd5c7/missing-keys
Example Response :
[
"properties.testProp222" ,
"properties.keyB" ,
"properties.keyA" ,
"properties.webhookurl" ,
"properties.governanceTest"
]
API responses The API responds with a 200
HTTP status code for all successful requests. If the authentication fails, you will get a 400
HTTP status code with the appropriate error message.
Questions? Contact us by email or on
Slack