{"name":"Product Viewed","description":"User viewed a product.","eventType":"track","categoryId":null,"workspaceId":"1hitizAoFT91DD6rfFhBjiTex3e","createdBy":"2KDKycoVHAOLttVvzBiqw12O3Hr","id":"ev_2gqmsfib1Zl6n6QL0mjCi9PJbDS","createdAt":"2024-05-23T03:08:09.972Z","updatedAt":"2024-05-23T03:08:09.972Z"}
Response codes
Code
Description
200
Event is created successfully.
400
Invalid request.
List all events
GET
/catalog/events
Query parameters
orderBy
Optional
String
Order the events list by a specific field.
Allowed fields are name, createdAt, updatedAt. For example, name:asc.
page
Optional
Number
In a paginated view, all the response entries are divided into pages. Use this field to specify which page of results to return. Default value is 1.
{"data":[{"id":"ev_2g60ZQeit5D54rBHUUh0oK3IxzH","name":"Order Placed","description":"User placed an order.","eventType":"track","categoryId":null,"workspaceId":"1hitizAoFT91DD6rfFhBjiTex3e","createdBy":"1zirfVbEQN0zIImR235a1JivVYU","updatedBy":null,"createdAt":"2024-05-06T13:39:34.294Z","updatedAt":"2024-05-06T13:39:34.294Z"},....{"id":"ev_2dJfRK8t0hOmmAaCTc0VvMB36e1","name":"Product Added to Cart","description":"User added product to cart.","eventType":"track","categoryId":null,"workspaceId":"1hitizAoFT91DD6rfFhBjiTex3e","createdBy":"1zirfVbEQN0zIImR235a1JivVYU","updatedBy":"1zirfVbEQN0zIImR235a1JivVYU","createdAt":"2024-03-06T13:18:12.044Z","updatedAt":"2024-05-13T11:39:40.115Z"},],"total":3563,"currentPage":1,"pageSize":50}
Response codes
Code
Description
200
All events in the data catalog are retrieved successfully.
{"id":"ev_2dJfRQIZLrBhqdLoLoxywHpicLp","name":"Product Viewed","description":"User viewed a product.","eventType":"track","categoryId":null,"workspaceId":"1hitizAoFT91DD6rfFhBjiTex3e","createdBy":"1zirfVbEQN0zIImR235a1JivVYU","updatedBy":"2KDKycoVHAOLttVvzBiqw12O3Hr","createdAt":"2024-03-06T13:18:12.044Z","updatedAt":"2024-05-22T14:57:50.265Z","category":null}
Response codes
Code
Description
200
All events in the data catalog are retrieved successfully.
404
Event not found for the specified event ID.
Update event
PUT
/catalog/events/{eventId}
Path parameters
eventId
Required
String
The event ID.
Request body
To update an event in the data catalog, at least one of the following parameters is required:
name
String
Name of the event.
Note that:
The name must be between 3 and 65 characters and should start with a letter.
It must contain only letters, numbers, underscores, commas, spaces, dashes, and dots.
For non-track events, the name should be an empty string.
description
String
Event description.
categoryId
String
Category ID of the event. It should be a valid, non-empty string.
Example request
PUT/v2/catalog/events/ev_2dJfRQIZLrBhqdLoLoxywHpicLpHTTP/1.1Host:api.rudderstack.comContent-Type:application/jsonAuthorization:Bearer <SERVICE_ACCESS_TOKEN>Content-Length:98{"name":"Product Viewed Again","description":"User viewed a product again.","categoryId":null}
{"name":"Product Viewed Again","description":"User revisited a product on the website.","categoryId":null}
Response codes
Code
Description
200
Event is updated successfully.
404
Event not found for the specified event ID.
Delete event
You cannot delete an event that is connected to a tracking plan. Use the Delete event from tracking plan API to disconnect the event and then try deleting it.
{"name":"Product Purchased","description":"User purchased a product on the website.","eventType":"track","categoryId":null,"workspaceId":"1hitizAoFT91DD6rfFhBjiTex3e","createdBy":"2KDKycoVHAOLttVvzBiqw12O3Hr","updatedBy":null,"createdAt":"2024-05-22T14:59:14.287Z","updatedAt":"2024-05-22T14:59:14.287Z"}
Response codes
Code
Description
200
Event is deleted from the catalog successfully.
404
Event not found for the specified event ID.
Manage data catalog properties
This section covers the API endpoints for creating and managing properties in your data catalog.
Create new property
POST
/catalog/properties
Request body
name
Required
String
Property name.
Note that:
The name must be of at least one character and should start with a letter.
It must contain only letters, numbers, underscores, and spaces.
description
Optional
String
Property description.
type
Required
String
Data type of the property.
Note that:
The data type must be either string, integer, number, object, array, boolean, null, or multi data type.
If not explicitly set, RudderStack allows all the above data types for the property, by default.
propConfig
Optional
Object
Advanced rules for the property. See JSON Schema for the complete list of supported keywords.
RudderStack supports multi data type for the type parameter. An example is shown:
{"type":["string","integer","boolean","null"]}
Example request
POST/v2/catalog/propertiesHTTP/1.1Host:api.rudderstack.comContent-Type:application/jsonAuthorization:Bearer <SERVICE_ACCESS_TOKEN>Content-Length:117{"name":"amount","description":"Amount for the product","type":"number","propConfig":{"multipleOf":2},}
{"name":"amount","description":"Amount for the product","type":"number","propConfig":{"multipleOf":2},"workspaceId":"1hitizAoFT91DD6rfFhBjiTex3e","createdBy":"2KDKycoVHAOLttVvzBiqw12O3Hr","id":"prop_2gqpkKg1GtHWKR8JtNChoKsqhIK","createdAt":"2024-05-23T03:31:43.297Z","updatedAt":"2024-05-23T03:31:43.297Z"}
Response codes
Code
Description
200
Property is created successfully.
400
Invalid request.
List all properties
GET
/catalog/properties
Path parameters
orderBy
Optional
String
Order the properties list by a specific field.
Allowed fields are name, createdAt, updatedAt. For example, name:asc.
page
Optional
Number
In a paginated view, all the response entries are divided into pages. Use this field to specify which page of results to return. Default value is 1.
Property is deleted from the catalog successfully.
400
Property not found for the specified event ID.
Manage data catalog categories
This section covers the API endpoints for creating and managing categories in your data catalog. Go to Govern > Data Catalog > Events tab in your RudderStack dashboard to view the categories and associate them to your events.
Create new category
POST
/catalog/categories
Request body
name
Required
String
Category name.
Note that:
The name must be between 3 and 65 characters and should start with a letter.
It must contain only letters, numbers, underscores, commas, spaces, dashes, and dots.
Category is deleted from the catalog successfully.
400
Category not found for the specified event ID.
Manage custom data types
The endpoints covered in this section are in beta as part of RudderStack’s Early Access Program, where we work with early users and customers to test new features and get feedback.
Note that these features are functional but can change as we improve them. Contact the RudderStack team to get access.
This section covers the API endpoints for creating and managing custom data types in your data catalog.
Create custom type
POST
/catalog/custom-types
Request body
The request body must not be empty. Otherwise, you will encounter an error.
name
Required
String
Custom type name.
Note that:
The custom type name must be between 2 and 65 characters long.
it must start with a capital letter and contain only letters, numbers, underscores and dashes.
You cannot change the custom type name later.
description
Optional
String
Custom type description.
type
Required
String
Valid data type. Acceptable values are string, number, integer, boolean, null, array, and object.
config
Required
Object
Custom type configuration. See Config object for more details.
properties
Required for object type
Array
Array of properties. See Properties structure for more information on passing this array in the request body.
This parameter is ignored for non-object data types.
Config object
You must include the config object to create a new custom type successfully. You can also pass an empty object to accept any values.
The config object can take the below parameters depending on type (data type of the custom type) specified in the request body:
Custom data type
Acceptable fields
String
Field
Description
enum
Array of acceptable values for the custom type.
minLength
Number defining the minimum string length for the custom type.
maxLength
Number defining the maximum string length for the custom type.
pattern
Regular expression that defining the constraints for the property, for example, email, datetime, URL, ipv4/ipv6, etc.
You can also define a custom pattern.
format
Defines the accepted format.
Acceptable values are datetime, date, time, email, uuid, hostname, ipv4, and ipv6.
Number / Integer
Field
Description
enum
Array of acceptable values for the custom type.
minimum
Minimum acceptable value for the custom type.
maximum
Minimum acceptable value for the custom type.
exclusiveMinimum
Minimum exclusive value for the custom type.
exclusiveMaximum
Maximum exclusive value for the custom type.
multipleOf
Number that is a multiple of a factor.
Array
Field
Description
itemTypes
List of valid data types (including custom type).
If you specify a custom type, note that:
You can include only one custom type, for example, itemTypes: ["CustomType1"].
You cannot include multiple custom types, for example, itemTypes: ["CustomType1", "CustomType2"].
Properties structure
You must include the properties array if your custom type is of the object data type. Note that the properties array must contain a list of objects, with each object containing the following details:
Parameter
Description
id Required
Property ID.
required
Boolean that determines if the property is required or optional.
A sample properties array is shown below:
"properties":[{"id":"prop_<id1>",// Property ID
"required":true/false// Determines whether the property is required or optional
},....{"id":"prop_<id2>","required":true/false}]
The request body must not be empty. Otherwise, you will encounter an error.
config
Required
Object
Updated configuration for the custom type. See Config object for more details.
type
Required
String
New data type for the custom type. Acceptable values are string, number, integer, boolean, null, array, and object.
properties
Required for object type
Array
Array of properties. See Properties structure for more information on passing this array in the request body.
Note: This parameter is ignored for non-object data types.
Config object
You must include the config object to create a new custom type successfully. You can also pass an empty object to accept any values.
The config object can take the below parameters depending on type (data type of the custom type) specified in the request body:
Custom data type
Acceptable fields
String
Field
Description
enum
Array of acceptable values for the custom type.
minLength
Number defining the minimum string length for the custom type.
maxLength
Number defining the maximum string length for the custom type.
pattern
Regular expression that defining the constraints for the property, for example, email, datetime, URL, ipv4/ipv6, etc.
You can also define a custom pattern.
format
Defines the accepted format.
Acceptable values are datetime, date, time, email, uuid, hostname, ipv4, and ipv6.
Number / Integer
Field
Description
enum
Array of acceptable values for the custom type.
minimum
Minimum acceptable value for the custom type.
maximum
Minimum acceptable value for the custom type.
exclusiveMinimum
Minimum exclusive value for the custom type.
exclusiveMaximum
Maximum exclusive value for the custom type.
multipleOf
Number that is a multiple of a factor.
Array
Field
Description
itemTypes
List of valid data types (including custom type).
If you specify a custom type, note that:
You can include only one custom type, for example, itemTypes: ["CustomType1"].
You cannot include multiple custom types, for example, itemTypes: ["CustomType1", "CustomType2"].
Properties structure
You must include the properties array if your custom type is of the object data type. Note that the properties array must contain a list of objects, with each object containing the following details:
Parameter
Description
id Required
Property ID.
required
Boolean that determines if the property is required or optional.
A sample properties array is shown below:
"properties":[{"id":"prop_<id1>",// Property ID
"required":true/false// Determines whether the property is required or optional
},....{"id":"prop_<id2>","required":true/false}]
Step 3: Create a new property of custom array type
Create a new property and set the data type to the custom array type created in the above step. The request body looks as follows:
{"name":"NewPropertyOS",// Replace with the desired name
"description":"Sample property of array custom type","type":"CustomTypeArray","propConfig":{}}
The corresponding request and response looks as follows:
This site uses cookies to improve your experience while you navigate through the website. Out of
these
cookies, the cookies that are categorized as necessary are stored on your browser as they are as
essential
for the working of basic functionalities of the website. We also use third-party cookies that
help
us
analyze and understand how you use this website. These cookies will be stored in your browser
only
with
your
consent. You also have the option to opt-out of these cookies. But opting out of some of these
cookies
may
have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This
category only includes cookies that ensures basic functionalities and security
features of the website. These cookies do not store any personal information.
This site uses cookies to improve your experience. If you want to
learn more about cookies and why we use them, visit our cookie
policy. We'll assume you're ok with this, but you can opt-out if you wish Cookie Settings.