Data Catalog API

Manage your tracking plans, events, and properties in your data catalog programmatically.

RudderStack’s Data Catalog API lets you:

  • Create and manage your tracking plans programmatically.
  • Add or update events and properties in your data catalog.
  • Create and manage categories for your data catalog events.
success
The Data Catalog API is a part of RudderStack’s Data Governance toolkit that ensures the quality and integrity of your data in a secure and compliant manner.

Prerequisites

Generate a personal access token in the RudderStack dashboard.

Authentication

The Data Catalog API uses Bearer authentication in the following format:

Authorization: Bearer <PERSONAL_ACCESS_TOKEN>

Base URL

Use the base URL for your API requests depending on your region:

Manage tracking plans

This section covers the API endpoints for creating and managing your tracking plans.

Create tracking plan

POST
/catalog/tracking-plans

Request body

name
Required
String
Tracking plan 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.
description
Optional
String
Tracking plan description.

Example request

Example response

{
  "id": "tp_2gopz6tfKxAjpS4TjuqVIeTdm7T",
  "name": "Product Ordered Plan",
  "description": "Tracking plan for users placing an order for the product.",
  "version": 1,
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "creationType": "BackendAPI",
  "createdAt": "2024-05-22T10:34:03.016Z",
  "updatedAt": "2024-05-22T10:34:03.016Z"
}

Response codes

CodeDescription
200Tracking plan is successfully created. RudderStack also returns an ID for the newly created tracking plan.
400Bad or invalid request.

List all tracking plans

GET
/catalog/tracking-plans

Example request

Example response

{
  "trackingPlans": [{
      "id": "tp_2gp8cYq8wYGn6ht5YTUekoiysxL",
      "name": "Product Ordered Plan",
      "description": "Tracking plan for users placing an order for the product.",
      "version": 1,
      "createdAt": "2024-05-22T13:07:18.617Z",
      "updatedAt": "2024-05-22T13:07:18.617Z",
      "creationType": "BackendAPI",
      "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e"
    },
    {
      "id": "tp_2bgGOHm0YH3VWWfO8uMzNP9IINI",
      "name": "Order Completed Plan",
      "description": "Tracking plan for users completing an order for the product.",
      "version": 4,
      "createdAt": "2024-01-30T15:41:14.446Z",
      "updatedAt": "2024-02-01T08:59:15.095Z",
      "creationType": "Event Audit API",
      "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e"
    }
  ]
}

Response codes

CodeDescription
200List of all tracking plans in the associated workspace.

Get tracking plan by ID

GET
/catalog/tracking-plans/{id}

Path parameters

id
Required
String
Tracking plan ID.
version
Optional
String
Tracking plan version. Note that it must be a number.

Example request

Example response

{
  "id": "tp_2gp8cYq8wYGn6ht5YTUekoiysxL",
  "name": "Product Ordered Plan",
  "description": "Tracking plan for users placing an order for the product.",
  "version": 1,
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "creationType": "BackendAPI",
  "createdAt": "2024-05-22T13:07:18.617Z",
  "updatedAt": "2024-05-22T13:07:18.617Z"
}

Response codes

CodeDescription
200Tracking plan is updated successfully.
404Tracking plan not found for the specified ID.

Update tracking plan

PUT
/catalog/tracking-plans/{id}

Path parameters

id
Required
String
Tracking plan ID.

Request body

To update the tracking plan, at least one of the following parameters is required:

name
String
Tracking plan 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.
description
String
Tracking plan description.

Example request

Example response

{
  "id": "tp_2gp8cYq8wYGn6ht5YTUekoiysxL",
  "name": "New Product Ordered Plan",
  "description": "Updated tracking plan for users placing an order for the product.",
  "version": 2,
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "creationType": "BackendAPI",
  "createdAt": "2024-05-22T10:34:03.016Z",
  "updatedAt": "2024-05-22T10:36:49.252Z"
}

Response codes

CodeDescription
200Tracking plan is updated successfully.
400Bad or invalid request.

Delete tracking plan

danger
Deleted tracking plans cannot be recovered or restored.
DELETE
/catalog/tracking-plans/{id}

Path parameters

id
Required
String
Tracking plan ID.

Example request

Example response

{
  "name": "New Product Ordered Plan",
  "version": 1,
  "description": "Updated tracking plan for users placing an order for the product.",
  "creationType": "BackendAPI",
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "updatedBy": null,
  "createdAt": "2024-05-22T13:41:33.057Z",
  "updatedAt": "2024-05-22T13:41:33.057Z",
  "events": []
}

Response codes

CodeDescription
200Tracking plan is deleted successfully.
400Bad or invalid request.

Manage events in tracking plans

This section covers the API endpoints for upserting and managing events in your tracking plans.

warning
The Data Catalog API creates the events and properties in the data catalog only if they do not exist already.

Upsert event to tracking plan

PATCH
/catalog/tracking-plans/{id}/events

Path parameters

id
Required
String
Tracking plan ID.

Request body

name
Required
String
Name of the event to be upserted.

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
Optional
String
Event description.
eventType
Optional
String
Type of event to be upserted.

Note that:
  • Once set, the event type cannot be updated later.
  • Allowed event types are track, identify, group, page, and screen.
categoryId
Optional
String
Category ID of the event. It should be a valid, non-empty string.
rules
Required
Object
JSON schema against which RudderStack validates the event. Note that event rules cannot be empty.
identitySection
Optional
String
Section from which RudderStack extracts the event properties. See Event structure for tracking plans for more information.

Example request

Example response

{
  "id": "tp_2gopz6tfKxAjpS4TjuqVIeTdm7T",
  "name": "Product Viewed Plan",
  "version": 3,
  "description": "User viewed a product.",
  "creationType": "BackendAPI",
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdAt": "2024-05-22T10:34:03.016Z",
  "updatedAt": "2024-05-22T11:01:24.706Z"
}

Response codes

CodeDescription
200Event is upserted to the tracking plan successfully. The API gives the updated tracking plan information as a response.
400Bad or invalid request.

List all events in tracking plan

GET
/catalog/tracking-plans/{id}/events

Path parameters

id
Required
String
Tracking plan ID.
page
Optional
Number
Events shown from given page. Default page size is 50.

Example request

Example response

{
  "data": [{
    "id": "ev_2gotJFKuOtdDY4XbSdKjkwk4qc2",
    "name": "Product Viewed",
    "description": "User viewed a product.",
    "eventType": "track",
    "categoryId": null,
    "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
    "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
    "updatedBy": null,
    "createdAt": "2024-05-22T11:01:24.706Z",
    "updatedAt": "2024-05-22T11:01:24.706Z",
    "identitySection": "properties",
    "additionalProperties": false
  }],
  "total": 1,
  "currentPage": 1,
  "pageSize": 50
}

Response codes

CodeDescription
200All the events in a tracking plan are fetched successfully.

Get tracking plan event by ID

GET
/catalog/tracking-plans/{id}/events/{eventId}

Path parameters

id
Required
String
Tracking plan ID.
eventId
Required
String
Event ID.

Example request

Example response

{
  "id": "ev_2gotJFKuOtdDY4XbSdKjkwk4qc2",
  "name": "Product Viewed",
  "description": "User viewed a product.",
  "eventType": "track",
  "categoryId": null,
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "updatedBy": null,
  "createdAt": "2024-05-22T11:01:24.706Z",
  "updatedAt": "2024-05-22T11:01:24.706Z",
  "identitySection": "properties",
  "rules": {
    "$schema": "http://json-schema.org/draft-07/schema#",
    "type": "object",
    "properties": {
      "properties": {
        "type": "object",
        "required": [
          "amount"
        ],
        "additionalProperties": false,
        "properties": {
          "amount": {
            "type": [
              "number"
            ]
          },
        }
      }
    }
  }
}

Response codes

CodeDescription
200Event specified by the ID is fetched successfully.
404Tracking plan event not found for the specified ID.

Delete event from tracking plan

DELETE
/catalog/tracking-plans/{id}/events/{eventId}

Path parameters

id
Required
String
Tracking plan ID.
eventId
Required
String
Event ID.

Example request

Response codes

CodeDescription
204Event is deleted from tracking plan successfully.
400Bad or invalid request.

Manage events in data catalog

This section covers the API endpoints for creating and managing events in your data catalog.

Create new event

POST
/catalog/events

Request body

name
Required
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
Optional
String
Event description.
eventType
Optional
String
Type of event to be created in the data catalog.

Note that:
  • Once set, the event type cannot be updated later.
  • Allowed event types are track, identify, group, page, and screen.
categoryId
Optional
String
Category ID of the event. It should be a valid, non-empty string.

Example request

Example response

{
  "name": "Product Viewed",
  "description": "User viewed a product.",
  "eventType": "track",
  "categoryId": null,
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "id": "ev_2gqmsfib1Zl6n6QL0mjCi9PJbDS",
  "createdAt": "2024-05-23T03:08:09.972Z",
  "updatedAt": "2024-05-23T03:08:09.972Z"
}

Response codes

CodeDescription
200Event is created successfully.
400Invalid request.

List all events

GET
/catalog/events

Query parameters

page
Optional
String
Page number. The API displays 50 events per page by default.
orderBy
Optional
String

Order the events list by a specific field.

Allowed fields are name, createdAt, updatedAt. For example, name:asc.

Example request

Example response

{
  "data": [{
      "id": "ev_2g60ZQeit5D54rBHUUh0oK3IxzH",
      "name": "Order Placed",
      "description": "User placed an order.",
      "eventType": "track",
      "categoryId": null,
      "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
      "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": "1zitShAoFT91DD6rfFhBjiTex3e",
      "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

CodeDescription
200All events in the data catalog are retrieved successfully.

Get event by ID

GET
/catalog/events/{id}

Path parameters

id
Required
String
The event ID.

Example request

Example response

{
  "id": "ev_2dJfRQIZLrBhqdLoLoxywHpicLp",
  "name": "Product Viewed",
  "description": "User viewed a product.",
  "eventType": "track",
  "categoryId": null,
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "1zirfVbEQN0zIImR235a1JivVYU",
  "updatedBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "createdAt": "2024-03-06T13:18:12.044Z",
  "updatedAt": "2024-05-22T14:57:50.265Z",
  "category": null
}

Response codes

CodeDescription
200All events in the data catalog are retrieved successfully.
404Event not found for the specified event ID.

Update event

PUT
/catalog/events/{id}

Path parameters

id
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

Example response

{
  "name": "Product Viewed Again",
  "description": "User revisited a product on the website.",
  "categoryId": null
}

Response codes

CodeDescription
200Event is updated successfully.
404Event not found for the specified event ID.

Delete event

warning
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.
DELETE
/catalog/events/{id}

Path parameters

id
Required
String
Event ID.

Example request

Example response

{
  "name": "Product Purchased",
  "description": "User purchased a product on the website.",
  "eventType": "track",
  "categoryId": null,
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "updatedBy": null,
  "createdAt": "2024-05-22T14:59:14.287Z",
  "updatedAt": "2024-05-22T14:59:14.287Z"
}

Response codes

CodeDescription
200Event is deleted from the catalog successfully.
404Event not found for the specified event ID.

Manage properties in data catalog

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.
info

RudderStack supports multi data type for the type parameter. An example is shown:

{
  "type": ["string", "integer", "boolean", "null"]
}

Example request

Example response

{
  "name": "Sample Property",
  "description": "A sample property",
  "type": "integer,object,string",
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "id": "prop_2gqpkKg1GtHWKR8JtNChoKsqhIK",
  "createdAt": "2024-05-23T03:31:43.297Z",
  "updatedAt": "2024-05-23T03:31:43.297Z"
}

Response codes

CodeDescription
200Property is created successfully.
400Invalid request.

List all properties

GET
/catalog/properties

Path parameters

page
Optional
Number
Page number.
orderBy
Optional
String

Order the properties list by a specific field.

Allowed fields are name, createdAt, updatedAt. For example, name:asc.

Example request

Example response

{
  "data": [{
      "id": "prop_2dJfRQ233WrPRpWBPqbF4PuiMc0",
      "name": "affiliation",
      "description": "Product affiliation",
      "type": "string",
      "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
      "createdBy": "1zirfVbEQN0zIImR235a1JivVYU",
      "updatedBy": null,
      "createdAt": "2024-03-06T13:18:12.044Z",
      "updatedAt": "2024-03-06T13:18:12.044Z"
    },

    ...

    {
      "id": "prop_2bfXbQgjn4298XzqlyxmktRAX9d",
      "name": "Email",
      "description": "User's email",
      "type": "string",
      "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
      "createdBy": "1zirfVbEQN0zIImR235a1JivVYU",
      "updatedBy": "1zirfVbEQN0zIImR235a1JivVYU",
      "createdAt": "2024-01-30T09:32:57.983Z",
      "updatedAt": "2024-01-30T09:33:18.885Z"
    }
  ],
  "total": 450,
  "currentPage": 1,
  "pageSize": 50
}

Response codes

CodeDescription
200All properties in the data catalog are retrieved successfully.

Get property by ID

GET
/catalog/properties/{id}

Path parameters

id
Required
String
Property ID.

Example request

Example response

{
  "id": "prop_2bfXbQgjn4298XzqlyxmktRAX9d",
  "name": "Email",
  "description": "User's email",
  "type": "string",
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "1zirfVbEQN0zIImR235a1JivVYU",
  "updatedBy": "1zirfVbEQN0zIImR235a1JivVYU",
  "createdAt": "2024-01-30T09:32:57.983Z",
  "updatedAt": "2024-01-30T09:33:18.885Z"
}

Response codes

CodeDescription
200All properties in the data catalog are retrieved successfully.
404Property not found for the specified event ID.

Update property

PUT
/catalog/properties/{id}

Path parameters

id
Required
String
Property ID.

Request body

To update the event property in the data catalog, at least one of the following parameters is required:

name
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
String
Property description.
type
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.
info

RudderStack supports multi data type for the type parameter. An example is shown:

{
  "type": ["string", "integer", "boolean", "null"]
}

Example request

Example response

{
  "id": "prop_2bfXbQgjn4298XzqlyxmktRAX9d",
  "name": "Email",
  "description": "User's email address",
  "type": "number",
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "1zirfVbEQN0zIImR235a1JivVYU",
  "updatedBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "createdAt": "2024-01-30T09:32:57.983Z",
  "updatedAt": "2024-05-23T03:41:10.715Z"
}

Response codes

CodeDescription
200Property is updated successfully.
400Property not found for the specified event ID.

Delete property

DELETE
/catalog/properties/{id}

Path parameters

id
Required
String
Property ID.

Example request

Example response

{
  "name": "Email",
  "description": "User's email address",
  "type": "number",
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "1zirfVbEQN0zIImR235a1JivVYU",
  "updatedBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "createdAt": "2024-01-30T09:32:57.983Z",
  "updatedAt": "2024-05-23T03:41:10.715Z"
}

Response codes

CodeDescription
200Property is deleted from the catalog successfully.
400Property not found for the specified event ID.

Manage categories in data catalog

This section covers the API endpoints for creating and managing categories in your data catalog. Go to Monitor > Data Catalog > Events tab in your RudderStack dashboard to view the categories and associate them to your events.

Data catalog categories

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.
description
Optional
String
Category description.

Example request

Example response

{
  "name": "Onboarding",
  "description": "Customer onboarding",
  "icon": "star",
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "id": "cat_2gqs1Yzy1VpUIewm69meqc6d8zH",
  "createdAt": "2024-05-23T03:50:27.416Z",
  "updatedAt": "2024-05-23T03:50:27.416Z"
}

Response codes

CodeDescription
200Category is created successfully.
400Invalid Request.

List all categories

GET
/catalog/categories

Path parameters

page
Optional
String
Page number.
orderBy
Optional
String

Order the categories list by a specific field.

Allowed fields are name, createdAt, updatedAt. For example, name:asc.

Example request

Example response

{
  "data": [{
      "id": "cat_2gqs1Yzy1VpUIewm69meqc6d8zH",
      "name": "Onboarding",
      "description": "Customer onboarding",
      "icon": "star",
      "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
      "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
      "updatedBy": null,
      "createdAt": "2024-05-23T03:50:27.416Z",
      "updatedAt": "2024-05-23T03:50:27.416Z"
    },

    ...

    {
      "id": "cat_2fpA1YOrdbVgIuvu7n6J5eza5ri",
      "name": "Product Experience",
      "description": "Enhance overall product and customer experience",
      "icon": "star",
      "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
      "createdBy": "1zirfVbEQN0zIImR235a1JivVYU",
      "updatedBy": null,
      "createdAt": "2024-04-30T14:30:30.254Z",
      "updatedAt": "2024-04-30T14:30:30.254Z"
    }
  ],
  "total": 10,
  "currentPage": 1,
  "pageSize": 1000
}

Response codes

CodeDescription
200All the categories in a tracking plan are fetched successfully.

Get category by ID

GET
/catalog/categories/{id}

Path parameters

id
Required
String
Category ID.

Example request

Example response

{
  "id": "cat_2gqs1Yzy1VpUIewm69meqc6d8zH",
  "name": "Onboarding",
  "description": "Customer onboarding",
  "icon": "star",
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "updatedBy": null,
  "createdAt": "2024-05-23T03:50:27.416Z",
  "updatedAt": "2024-05-23T03:50:27.416Z"
}

Response codes

CodeDescription
200All categories in the data catalog are retrieved successfully.
404Category not found for the specified ID.

Delete category

DELETE
/catalog/categories/{id}

Path parameters

id
Required
String
Category ID.

Example request

Example response

{
  "name": "Onboarding",
  "description": "Customer onboarding",
  "icon": "star",
  "workspaceId": "1zitShAoFT91DD6rfFhBjiTex3e",
  "createdBy": "2KDKycoVHAOLttVvzBiqw12O3Hr",
  "updatedBy": null,
  "createdAt": "2024-05-23T03:50:27.416Z",
  "updatedAt": "2024-05-23T03:50:27.416Z"
}

Response codes

CodeDescription
200Category is deleted from the catalog successfully.
400Category not found for the specified event ID.

FAQ

How to generate a personal access token to use the Data Catalog API?

To generate your personal access token, go to Settings > Your Profile > Account tab. Scroll down to Personal access tokens and click Generate new token.

New personal access token in RudderStack dashboard

Enter the token name and choose Admin role from the dropdown:

New personal access token in RudderStack dashboard

Questions? Contact us by email or on Slack