👋 Welcome to the new Omni docs! We're still migrating, but the old docs are available at docs-legacy.omni.co.
curl --request GET \
--url https://{instance}.omniapp.co/api/v1/models/{modelId}/topic/{topicName} \
--header 'Authorization: Bearer <token>'{
"success": true,
"topic": {
"name": "Customers",
"base_view_name": "main__customers",
"label": "Customers",
"default_filters": {},
"join_via_map": {
"main__orders": [],
"main__order_items": [
"main__orders"
]
},
"join_via_map_key_order": [
"main__orders",
"main__order_items"
],
"ignored_props": [],
"always_where_filters": {},
"extension_model_id": "5da4e30e-45e2-4693-b87d-51c39d69963f",
"has_frozen_join_via_map": true,
"relationships": [
{
"left_view_name": "main__orders",
"right_view_name": "main__customers",
"join_type": "ALWAYS_LEFT",
"sql": "${main__orders.customer_id} = ${main__customers.id}",
"id": "main__orders_main__customers",
"type": "ASSUMED_MANY_TO_ONE",
"ignored": false,
"bidirectional": false
}
],
"ide_file_name": "Customers.topic",
"views": [
{
"name": "main__customers",
"label": "Customers",
"table_name": "customers",
"schema": "main",
"schema_label": "Main",
"extension_model_id": "5da4e30e-45e2-4693-b87d-51c39d69963f",
"ide_file_name": "main/customers.view",
"yaml_path": "main__customers.view",
"filter_only_fields": [],
"is_pseudo_display_view": false,
"primary_key": [
{
"type": "field",
"field_name": "main__customers.id"
}
],
"dimensions": [
{
"field_name": "country",
"view_name": "main__customers",
"data_type": "STRING",
"description": "User's country",
"view_label": "Customers",
"is_dimension": true,
"fully_qualified_name": "main__customers.country"
},
{
"field_name": "created_date",
"view_name": "main__customers",
"data_type": "TIMESTAMP",
"time_frames": [
null,
"DATE",
"WEEK",
"MONTH",
"QUARTER",
"YEAR"
],
"date_type": "DATE",
"description": "Date of user creation",
"parent_field": "created_date",
"parent_label": "Created Date",
"view_label": "Customers",
"group_label": "Created Date",
"is_dimension": true,
"is_group_parent_field": true,
"fully_qualified_name": "main__customers.created_date"
}
],
"measures": [
{
"type": "aggregation",
"field_name": "count",
"view_name": "main__customers",
"aggregate_type": "COUNT",
"data_type": "NUMBER",
"ignored": false,
"label": "Customers Count",
"format": "NUMBER_0",
"view_label": "Customers",
"display_sql": "COUNT(*)",
"dialect_sql": "COUNT(*)",
"fully_qualified_name": "main__customers.count"
}
]
}
]
}
}Retrieves a topic in a model by name.
curl --request GET \
--url https://{instance}.omniapp.co/api/v1/models/{modelId}/topic/{topicName} \
--header 'Authorization: Bearer <token>'{
"success": true,
"topic": {
"name": "Customers",
"base_view_name": "main__customers",
"label": "Customers",
"default_filters": {},
"join_via_map": {
"main__orders": [],
"main__order_items": [
"main__orders"
]
},
"join_via_map_key_order": [
"main__orders",
"main__order_items"
],
"ignored_props": [],
"always_where_filters": {},
"extension_model_id": "5da4e30e-45e2-4693-b87d-51c39d69963f",
"has_frozen_join_via_map": true,
"relationships": [
{
"left_view_name": "main__orders",
"right_view_name": "main__customers",
"join_type": "ALWAYS_LEFT",
"sql": "${main__orders.customer_id} = ${main__customers.id}",
"id": "main__orders_main__customers",
"type": "ASSUMED_MANY_TO_ONE",
"ignored": false,
"bidirectional": false
}
],
"ide_file_name": "Customers.topic",
"views": [
{
"name": "main__customers",
"label": "Customers",
"table_name": "customers",
"schema": "main",
"schema_label": "Main",
"extension_model_id": "5da4e30e-45e2-4693-b87d-51c39d69963f",
"ide_file_name": "main/customers.view",
"yaml_path": "main__customers.view",
"filter_only_fields": [],
"is_pseudo_display_view": false,
"primary_key": [
{
"type": "field",
"field_name": "main__customers.id"
}
],
"dimensions": [
{
"field_name": "country",
"view_name": "main__customers",
"data_type": "STRING",
"description": "User's country",
"view_label": "Customers",
"is_dimension": true,
"fully_qualified_name": "main__customers.country"
},
{
"field_name": "created_date",
"view_name": "main__customers",
"data_type": "TIMESTAMP",
"time_frames": [
null,
"DATE",
"WEEK",
"MONTH",
"QUARTER",
"YEAR"
],
"date_type": "DATE",
"description": "Date of user creation",
"parent_field": "created_date",
"parent_label": "Created Date",
"view_label": "Customers",
"group_label": "Created Date",
"is_dimension": true,
"is_group_parent_field": true,
"fully_qualified_name": "main__customers.created_date"
}
],
"measures": [
{
"type": "aggregation",
"field_name": "count",
"view_name": "main__customers",
"aggregate_type": "COUNT",
"data_type": "NUMBER",
"ignored": false,
"label": "Customers Count",
"format": "NUMBER_0",
"view_label": "Customers",
"display_sql": "COUNT(*)",
"dialect_sql": "COUNT(*)",
"fully_qualified_name": "main__customers.count"
}
]
}
]
}
}Can be either an Organization API Key or Personal Access Token (PAT).
Include in the Authorization header as: Bearer YOUR_TOKEN
The unique identifier of the model that contains the topic.
The name of the topic.
Indicates the request was successful
Details about the topic. The properties included in the response will typically mirror the IDE parameters for topic files.
Show child attributes
Was this page helpful?