### Measure Sample Value Examples Source: https://docs.omni.co/modeling/measures/parameters/sample-values Practical examples showing how to apply sample values for revenue and count metrics to guide AI model optimization. ```yaml total_revenue: sample_values: [1250.50, 5430.75, 890.25, 12500.00] ``` ```yaml order_count: sample_values: [5, 12, 3, 45, 2] ``` -------------------------------- ### Verify MCP Server Connection Logs Source: https://docs.omni.co/ai/mcp/vscode These are example logs indicating a successful connection and startup of the Omni MCP server. They show the server starting, connection state changes, and discovered tools. ```shell [info] Starting server Omni [info] Connection state: Starting [info] Starting server from LocalProcess extension host [info] Connection state: Running [info] Discovered 3 tools ``` -------------------------------- ### Get Query Execution Plan Source: https://docs.omni.co/api/queries/run-query This example shows how to request only the query execution plan without running the actual query. This is useful for understanding how the API will process the request and what SQL will be generated. The `planOnly` parameter should be set to `true`, and it cannot be used with `resultType`. ```json { "query": { "modelId": "bcf0cffd-ec1b-44d5-945a-a261ebe407fc", "table": "order_items", "fields": [ "inventory_items.product_department", "inventory_items.product_category", "inventory_items.count" ], "limit": 10, "sorts": [ { "column_name": "inventory_items.product_department", "sort_descending": false } ], "join_paths_from_topic_name": "order_items" }, "planOnly": true } ``` -------------------------------- ### Example Joins Configuration Source: https://docs.omni.co/modeling/topics/parameters/joins A practical example demonstrating how to join inventory items to products and distribution centers, while also including a separate users view. ```yaml joins: inventory_items: # Includes inventory_items in the topic products: # Joins products to inventory_items distribution_centers: {} # Joins distribution_centers to products users: {} # Includes users in the topic ``` -------------------------------- ### Cron Schedule Examples Source: https://docs.omni.co/share/deliveries/email Illustrates how to create cron schedules for specific use cases. Examples cover daily, monthly, and weekday scheduling. These examples use standard cron syntax. ```markdown 0 9 ? * * * // At 9:00 AM every day ``` ```markdown 30 6 L * ? * // At 6:30 AM on the last day of the month ``` ```markdown 45 8 ? * MON-FRI * // At 8:45 AM every day, Monday through Friday ``` -------------------------------- ### Example Sample Query Implementation Source: https://docs.omni.co/modeling/models/sample-queries A practical example of a 'Summary Stats' query definition, demonstrating the use of fields, calculations, and AI context metadata. ```yaml sample_queries: Summary Stats: query: fields: [ order_items.sale_price_sum, users.count, calc_1 ] base_view: order_items calculations: calc_1: sql: OMNI_FX_SAFE_DIVIDE(${order_items.sale_price_sum}, ${users.count}) limit: 1000 sorts: - field: order_items.sale_price_sum topic: order_items description: Total Revenue, Users and Revenue per User hidden: false prompt: show me total revenue, count of users and revenue per user ai_context: uses a calculation to compute avg. revenue per user exclude_from_ai_context: false ``` -------------------------------- ### Visualization Showcase Examples Source: https://docs.omni.co/api/user-model-roles Examples demonstrating various visualization types possible in Omni. ```APIDOC ## Visualization Showcase - Calendar Heatmaps ### Description The code for these examples can be used in the Markdown visualization to create different styles of calendars with cells colored by a value. ### Endpoint /showcase/visualizations/calendar-heatmaps ### Usage Refer to the Markdown visualization editor for implementation details. ``` ```APIDOC ## Visualization Showcase - Card with Criteria Checklist ### Description The code for this example can be used in the Markdown visualization to create a card with a list of criteria. ### Endpoint /showcase/visualizations/card-criteria-checklist ### Usage Refer to the Markdown visualization editor for implementation details. ``` ```APIDOC ## Visualization Showcase - Card Grid ### Description The code for this example can be used in the Markdown visualization to create a grid of responsive cards with metrics and images. ### Endpoint /showcase/visualizations/card-grid ### Usage Refer to the Markdown visualization editor for implementation details. ``` ```APIDOC ## Visualization Showcase - Card with Target Candlesticks ### Description The code for this example can be used in the Markdown visualization to create cards with conditional coloring, based on the current value versus the target. ### Endpoint /showcase/visualizations/card-target-candlesticks ### Usage Refer to the Markdown visualization editor for implementation details. ``` ```APIDOC ## Visualization Showcase - Card with Strip Plot ### Description The code for this example can be used in the Markdown visualization to create a card with a strip plot. ### Endpoint /showcase/visualizations/card-with-strip-plot ### Usage Refer to the Markdown visualization editor for implementation details. ``` ```APIDOC ## Visualization Showcase - Cohort Table ### Description The code for this example can be used in the Markdown visualization to create a more condensed and styled cohort table for a year's worth of monthly cohorts. ### Endpoint /showcase/visualizations/cohort-table ### Usage Refer to the Markdown visualization editor for implementation details. ``` ```APIDOC ## Visualization Showcase - Colored Progress Bars ### Description The code for these examples can be used in the Markdown visualization to create colored progress bars. ### Endpoint /showcase/visualizations/colored-progress-bars ### Usage Refer to the Markdown visualization editor for implementation details. ``` -------------------------------- ### Folder API Response Example Source: https://docs.omni.co/api/folders/list-folders This JSON example illustrates the structure of a successful 200 OK response from the folder retrieval endpoint. It includes a list of folder records and pagination metadata. ```json { "records": [ { "id": "21db26b3-466c-4791-90e7-b9ce9375426d", "name": "Blob Sales", "path": "/blob-sales", "scope": "organization", "url": "https://blobsrus.omni.co/f/blob-sales-reports", "owner": { "id": "f4df8d6e-7f69-4d54-b23b-7abfe5c4da74", "name": "Blob Ross" }, "labels": ["important", "archived"], "_count": { "documents": 15, "favorites": 3 } } ], "pageInfo": { "hasNextPage": true, "nextCursor": "eyJpZCI6ImZvbGRlcjEyMyJ9", "pageSize": 20, "totalRecords": 45 } } ``` -------------------------------- ### AI Context Example: Behavioral Prompting (YAML) Source: https://docs.omni.co/modeling/models/ai-context An example of setting AI context for behavioral prompting. This specific example instructs the AI to act as an analyst for an eCommerce retailer and provide summaries in both English and Brazilian Portuguese. ```yaml ai_context: | You are an analyst for an eCommerce retailer called BlobsRUs. After generating a query, always provide a summary of the data both English and Brazilian Portugese. ``` -------------------------------- ### Example Usage: Successful Document Update Response Source: https://docs.omni.co/api/openapi.yaml This example shows a successful response from the `updateDocument` API operation. It confirms the document was updated and provides its identifier and name. ```json { "identifier": "my-dashboard", "name": "Q4 Sales Dashboard" } ``` -------------------------------- ### Example: Behavioral Prompting for AI Context Source: https://docs.omni.co/modeling/views/parameters/ai-context This example illustrates how to use the ai_context parameter for behavioral prompting. It sets a persona for the AI, guiding its responses based on a specific role and concerns. ```yaml ai_context: | you are the head of finance. you are concerned with the status of customer payments. you often need to project into the future how many invoices are due and for how much. you also need to know if any invoices are late so you can reach out to those customers. ``` -------------------------------- ### Measure Naming Example Source: https://docs.omni.co/modeling/measures/index This snippet shows an example of naming a measure according to Omni's conventions. Measure names must be unique, use lowercase letters, numbers, or underscores, and start with a letter. ```yaml measures: total_revenue: sql: ${orders.sale_price} aggregate_type: sum format: usdcurrency ``` -------------------------------- ### POST /v1/query/run Source: https://docs.omni.co/content/develop/drafts Executes a query and returns results as a base64 encoded Apache Arrow table. ```APIDOC ## POST /v1/query/run ### Description Runs the query specified in the request body. Successful requests return data as a base64 encoded Apache Arrow table. ### Method POST ### Endpoint /v1/query/run ### Request Body - **query** (string) - Required - The SQL or analytical query to execute. ### Response #### Success Response (200) - **data** (string) - Base64 encoded Apache Arrow table. - **remaining_job_ids** (array) - Optional - List of job IDs if the request times out. #### Response Example { "data": "base64_encoded_string_here" } ``` -------------------------------- ### GET /embed (contentPath parameter) Source: https://docs.omni.co/embed/setup/url-parameters/contentPath Defines the starting page for the Omni iframe embed session. This parameter is required for all embed requests. ```APIDOC ## GET /embed (contentPath) ### Description Defines the starting page when the embed user logs into the iframe. This parameter is required to create valid embed requests. ### Method GET ### Endpoint /embed?contentPath= ### Parameters #### Query Parameters - **contentPath** (string) - Required - The URL-encoded path to the starting page (e.g., %2Fdashboards%2Fa6908f35). ### Request Example https://embed.omni.co/embed?contentPath=%2Fdashboards%2Fa6908f35 ### Response #### Success Response (200) - **iframe_content** (html) - Renders the Omni interface starting at the specified content path. #### Response Example { "status": "success", "message": "Embed session initialized at specified contentPath" } ``` -------------------------------- ### POST /v1/connection-environments Source: https://docs.omni.co/content/develop/drafts Creates connection environments by associating environment-specific connections with a base connection. ```APIDOC ## POST /v1/connection-environments ### Description Creates connection environments by associating environment-specific connections with a base connection. ### Method POST ### Endpoint /v1/connection-environments ### Request Example { "base_connection_id": "base-123", "environment_name": "production" } ### Response #### Success Response (200) - **id** (string) - The ID of the created connection environment. ``` -------------------------------- ### POST /v1/models Source: https://docs.omni.co/content/develop/drafts Create a new schema model. ```APIDOC ## POST /v1/models ### Description Create a new model. Follow up with a refresh schema call to load data. ### Method POST ### Endpoint /v1/models ### Request Body - **name** (string) - Required - Name of the model. ### Response #### Success Response (200) - **id** (string) - The ID of the created model. #### Response Example { "id": "model_abc_123" } ``` -------------------------------- ### Example Order Transactions Topic YAML Source: https://docs.omni.co/modeling/topics/setup This YAML defines the 'Order Transactions' topic, specifying its base view, label, group label, AI context, joins, and fields. It's used for configuring data topics in the IDE. ```yaml base_view: ecomm__order_items label: Order Transactions group_label: Orders & Fulfillment ai_context: | You are an expert data analyst, who has a vast amount of experience analyzing ecommerce data to find useful insights and trends. Our data has information about orders at the line item level in the order items table, users in our user table, inventory in our inventory items table, and products in the products table. joins: ecomm__users: {} ecomm__inventory_items: ecomm__products: ecomm__distribution_centers: {} fields: [ all_views.* -ecomm__users.email, -ecomm__users.first_name, -ecomm__users.last_name ] ``` -------------------------------- ### GET /embed/setup/url-parameters/{parameter} Source: https://docs.omni.co/api/users/list-users Configures specific settings for embedded Omni content using URL query parameters. ```APIDOC ## GET /embed/setup/url-parameters/{parameter} ### Description Applies specific configuration settings to an embedded dashboard or content via URL parameters. ### Method GET ### Endpoint /embed/setup/url-parameters/{parameter} ### Parameters #### Path Parameters - **parameter** (string) - Required - The specific configuration key (e.g., accessBoost, customThemeId, externalId). ### Request Example https://your-omni-instance.com/embed?externalId=user_123&customThemeId=theme_abc ### Response #### Success Response (200) - **status** (string) - Indicates successful application of the embed configuration. #### Response Example { "status": "success", "applied_parameters": ["externalId", "customThemeId"] } ``` -------------------------------- ### Define Topic Metadata and AI Context in YAML Source: https://docs.omni.co/modeling/topics/setup Configures core topic parameters including the base view, display labels, grouping, and descriptive context for AI models. This setup helps improve AI-driven insights by providing domain-specific information. ```yaml base_view: ecomm__order_items label: Order Transactions group_label: Orders & Fulfillment ai_context: | You are an expert data analyst, who has a vast amount of experience analyzing ecommerce data to find useful insights and trends. Our data has information about orders at the line item level in the order items table, users in our user table, inventory in our inventory items table, and products in the products table. ``` -------------------------------- ### Create Document Source: https://docs.omni.co/content/develop/drafts Creates a new document. ```APIDOC ## POST /v1/documents ### Description Creates a new document. ### Method POST ### Endpoint /v1/documents ### Parameters #### Request Body - **title** (string) - Required - The title of the new document. - **content** (object) - Optional - The initial content of the document. ### Request Example ```json { "example": "{\"title\": \"New Document\", \"content\": {}}" } ``` ### Response #### Success Response (201) - **id** (string) - The unique identifier of the newly created document. - **title** (string) - The title of the document. - **createdAt** (string) - The timestamp when the document was created. #### Response Example ```json { "example": "{\"id\": \"doc-456\", \"title\": \"New Document\", \"createdAt\": \"2023-10-27T10:05:00Z\"}" } ``` ``` -------------------------------- ### OpenAPI Specification for Listing Labels (YAML) Source: https://docs.omni.co/api/labels/list-labels This YAML snippet defines the OpenAPI 3.1.0 specification for the GET /v1/labels endpoint. It outlines the request, response structure for listing all labels in an organization, including their properties and example data. It also specifies potential error responses like 'TooManyRequests'. ```yaml openapi: 3.1.0 info: title: Omni API description: > The Omni REST API provides programmatic access to your Omni instance for managing users, documents, queries, schedules, and more. version: 1.0.0 contact: name: Omni Support url: https://docs.omni.co servers: - url: https://{instance}.omniapp.co/api description: Production variables: instance: default: blobsrus description: Your production Omni instance subdomain - url: https://{instance}.playground.exploreomni.dev/api description: Playground variables: instance: default: blobsrus description: Your playground Omni instance subdomain security: - bearerAuth: [] - orgApiKey: [] tags: - name: AI description: AI-powered query generation - name: Connections description: Manage database connections - name: Schema refresh schedules description: Manage automated schema refresh schedules for connections - name: Connection environments description: Manage connection environments database connections - name: Content description: Unified content retrieval (documents and folders) - name: Content migration description: Export and import dashboards - name: Content validator description: Validate content against models and perform find/replace operations - name: Dashboard downloads description: Download dashboards and tiles as PDF, PNG, XLSX, CSV, or JSON files - name: Documents description: Create, retrieve, and manage documents - name: Document permissions description: Manage document-level access - name: Document labels description: Apply and manage labels on documents - name: Document favorites description: Favorite and unfavorite documents - name: Dashboard filters and controls description: Read and update dashboard filter and control default values - name: Labels description: > Manage labels in an organization. Labels can be applied to documents and folders to help organize and categorize content. **Label types:** - **Basic labels**: Can be created and managed by any user - **Verified labels**: Indicate curated or officially sanctioned content. Admin-only. - **Homepage labels**: Appear on the organization homepage. Admin-only. - name: Folders description: Create and organize content folders - name: Folder permissions description: Manage folder-level access - name: Jobs description: Check status of asynchronous jobs - name: Models description: Create and manage data models - name: Model branches description: Manage model branches and merge changes - name: Model git configuration description: Manage git configuration for shared models - name: Queries description: Execute workbook queries - name: Schedules description: Create and manage scheduled tasks - name: Schedule recipients description: Manage schedule recipients - name: Topics description: Retrieve topic information from models - name: Uploads description: Manage file uploads - name: Users description: Manage users - name: User attributes description: Manage user attribute definitions - name: User groups description: Manage user groups - name: User model roles description: Manage model and connection role assignments for users - name: User group model roles description: Manage model and connection role assignments for user groups - name: Uploads description: Manage CSV and spreadsheet uploads paths: /v1/labels: get: tags: - Labels summary: List labels description: Retrieve all labels in the organization. operationId: listLabels responses: '200': description: List of all labels in the organization content: application/json: schema: type: object properties: labels: type: array items: $ref: '#/components/schemas/Label' example: labels: - name: Production verified: true homepage: true usage_count: 12 - name: In Review verified: true homepage: false usage_count: 5 - name: Draft verified: false homepage: false usage_count: 3 '429': $ref: '#/components/responses/TooManyRequests' security: - bearerAuth: [] components: schemas: Label: type: object description: A label for organizing and categorizing documents and folders properties: name: type: string description: > ``` -------------------------------- ### GET /v1/models/{modelId}/query Source: https://docs.omni.co/api/labels/create-label Runs the query specified in the request body. Successful requests will return the data as a base64 encoded Apache Arrow table, allowing you to extract query results from Omni and use them elsewhere. For example, piping data to Google Sheets or leveraging data in a Python notebook. ```APIDOC ## GET /v1/models/{modelId}/query ### Description Runs the query specified in the request body. Successful requests will return the data as a base64 encoded Apache Arrow table, allowing you to extract query results from Omni and use them elsewhere. For example, piping data to Google Sheets or leveraging data in a Python notebook. ### Method GET ### Endpoint /v1/models/{modelId}/query ### Parameters #### Path Parameters - **modelId** (string) - Required - The ID of the model. #### Query Parameters - **query** (string) - Required - The query to execute. ### Response #### Success Response (200) - **data** (string) - The query results as a base64 encoded Apache Arrow table. #### Response Example ```json { "data": "JVBERi0xLjQKJcOkw7zDtsOkCjEgMCBvYmoKPDwvVHlwZS9QYWdlL0tpZHNbMiAwIFJdL0NvdW50IDE+PgpzdHJlYW0gCkJUCi8gVEV4dCBhbmQgdGhlbiB0byB0aGUgYmFzZTY0IGVuY29kZWQgQXBhY2hlIEFycm93IHRhYmxlLCBhbGxvd2luZyB5b3UgdG8gZXh0cmFjdCBxdWVyeSByZXN1bHRzIGZyb20gT21uaSBhbmQgdXNlIHRoZW0gZWxzZXdoZXJlLiBGb3IgZXhhbXBsZSwgcGlwaW5nIGRhdGEgdG8gR29vZ2xlIFNoZWV0cyBvciBsZXZlcmFnaW5nIGRhdGEgaW4gYSBQeXRob24gbm90ZWJvb2suCgplbmRzdHJlYW0KZW5kb2JqCgoyIDAgb2JqCjw8L1R5cGUvUGFnZS9QYXJlbnQzIDAgUi9SZXNvdXJjZXM8PC9Qcm9jU2V0L0FjY3JvbmltZW50L0ZvbnQ8PC9GMTEgNSAwIFI+Pj4+L01lZGlhWzAgMCA1OTUgNzkyXSA+PgplbmRzdHJlYW0KZW5kb2JqCgozIDAgb2JqCjw8L1R5cGUvUGFnZXMvQ291bnQgMS9LaWRzWzEgMCBSXT4+CnN0cmVhbQplbmRzdHJlYW0KZW5kb2JqCgo0IDAgb2JqCjw8L1R5cGUvQ2F0YWxvZy9QYWdlcyAyIDAgUj4+CnN0cmVhbQplbmRzdHJlYW0KZW5kb2JqCgo1IDAgb2JqCjw8L1R5cGUvRm9udC9TdWJ0eXBlL0ZvbnQxL0Jhc2VGb250L0hlbHZldGljYS9FbmNvZGluZy9XaW5BbnNpRW5jb2Rpbmc+PgplbmRzdHJlYW0KZW5kb2JqCgp4cmVmCjAgNgowMDAwMDAwMDAwIDY1NTM1IGYKMDAwMDAwMDAxNSAwMDAwMCBuCjAwMDAwMDAwNjcgMDAwMDAgbi ``` ``` -------------------------------- ### Visualization Showcase Source: https://docs.omni.co/content/develop/drafts Explore examples and code snippets for creating various visualizations within Omni. ```APIDOC ## Showcase Examples ### Description This section provides links and descriptions for various visualization examples available in Omni. ### Examples - **Calendar heatmaps**: Create different styles of calendars with cells colored by a value. - **Card with criteria checklist**: Create a card with a list of criteria. - **Card grid**: Create a grid of responsive cards with metrics and images. - **Card with target candlesticks**: Create cards with conditional coloring, based on the current value versus the target. - **Card with strip plot**: Create a card with a strip plot. - **Cohort table**: Create a more condensed and styled cohort table for a year's worth of monthly cohorts. - **Colored progress bars**: Create progress bars that are sectioned by color to reinforce the meaning of the current progress state. - **Dashboard tabs**: Use Markdown tiles to create tabs in dashboards, allowing users to jump from one dashboard to another. ``` -------------------------------- ### Examples of Duration Dimension Configurations Source: https://docs.omni.co/modeling/dimensions/parameters/duration Practical examples showing how to calculate order fulfillment time, user account age, and project duration using specific interval sets. ```yaml order_fulfillment_time: duration: sql_start: ${orders.created_at} sql_end: ${orders.shipped_at} intervals: [hours, days, weeks] ``` ```yaml account_age: duration: sql_start: ${users.created_at} sql_end: ${users.last_login_at} intervals: [days, months, years] ``` ```yaml project_length: duration: sql_start: ${projects.start_date} sql_end: ${projects.end_date} intervals: [days, weeks, months, quarters, years] ``` -------------------------------- ### Guides Page Structure (HTML) Source: https://docs.omni.co/guides/index The main HTML structure for the Guides page, including a title, description, and the GuidesFilter component. This serves as the entry point for users to access and interact with the guides. ```html

Guides

Step-by-step tutorials and best practices for getting the most out of Omni.

``` -------------------------------- ### Guides Filtering Component (React) Source: https://docs.omni.co/guides/index A React component that filters and displays a list of guides based on search queries and selected tags. It manages search input, tag selection, and dynamically filters the guide list, rendering cards for each guide with icons and descriptions. Dependencies include React and an 'Icon' component. ```javascript export const GuidesFilter = ({guides, categoryIcons}) => { const getIconForGuide = guide => { const category = guide.tags.find(tag => categoryIcons[tag.toLowerCase()]); return category ? categoryIcons[category.toLowerCase()] : 'book'; }; const allTags = [...new Set(guides.flatMap(g => g.tags))].sort(); const [search, setSearch] = React.useState(''); const [selectedTags, setSelectedTags] = React.useState([]); const toggleTag = tag => { setSelectedTags(prev => prev.includes(tag) ? prev.filter(t => t !== tag) : [...prev, tag]); }; const filteredGuides = React.useMemo(() => { return guides.filter(guide => { if (search) { const searchLower = search.toLowerCase(); const matchesSearch = guide.title.toLowerCase().includes(searchLower) || guide.description.toLowerCase().includes(searchLower) || guide.tags.some(tag => tag.toLowerCase().includes(searchLower)); if (!matchesSearch) return false; } if (selectedTags.length > 0 && !selectedTags.some(tag => guide.tags.includes(tag))) return false; return true; }); }, [search, selectedTags]); const hasActiveFilters = search || selectedTags.length > 0; const clearFilters = () => { setSearch(''); setSelectedTags([]); }; return
{} {}
{filteredGuides.length} {filteredGuides.length === 1 ? 'guide' : 'guides'}
{filteredGuides.length > 0 ?
{filteredGuides.map(guide =>

{guide.title}

{guide.description &&

{guide.description}

} {guide.tags.length > 0 &&
{guide.tags.slice(0, 3).map(tag => {tag})}
}
)}
:

No guides match your filters.

}
; }; ``` -------------------------------- ### Guides Landing Page Layout and Styling (CSS) Source: https://docs.omni.co/api/users/list-embed-users Styles the main landing page for guides, including the overall container, titles, descriptions, and a two-column layout with a sidebar for filters and a content area for guide results. It also defines styles for the guide cards. ```css /* Guides landing page */ .guides-container { max-width: 1200px; margin: 0 auto; padding: 48px 24px; } .guides-title { font-size: 2.5rem; font-weight: 700; color: #1e191a; margin-bottom: 16px; } .dark .guides-title { color: #e6e1e2; } .guides-description { font-size: 1.125rem; color: #1e191a; margin-bottom: 32px; } .dark .guides-description { color: #cbd5e1; } /* Two-column layout */ .guides-layout { display: flex; gap: 48px; } /* Left sidebar */ .guides-sidebar { width: 220px; flex-shrink: 0; } .guides-filters { position: sticky; top: 100px; } .guides-filter-group { margin-bottom: 24px; } .guides-filter-label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #1e191a; margin-bottom: 8px; } .dark .guides-filter-label { color: #cbd5e1; } .guides-filter-input { width: 100%; padding: 8px 12px; border-top-left-radius: 9999px; border-top-right-radius: 9999px; border-bottom-left-radius: 9999px; border-bottom-right-radius: 9999px; border-color: rgb(230, 225, 226); font-size: 14px; box-sizing: border-box; background-color: rgba(17, 12, 14, 0.03); color: rgb(119, 114, 116); } .dark .guides-filter-input { background-color: rgba(255, 255, 255, 0.03); border-color: #334155; color: rgba(255, 255, 255, 0.5); } .guides-filter-input:focus { outline: none; border-color: #FF5789; } .dark .guides-filter-input::placeholder { color: rgba(255, 255, 255, 0.5); } .guides-filter-button { display: block; width: 100%; padding: 8px 12px; margin-bottom: 4px; border-radius: 16px; border: 1px solid #e2e8f0; background: transparent; font-size: 14px; text-align: left; cursor: pointer; transition: all 0.15s ease; color: #334155; } .dark .guides-filter-button { color: #cbd5e1; border-color: rgba(255, 255, 255, 0.1); border-style: solid; border-width: 1.5px; } .guides-filter-button:hover { background-color: #f8fafc; } .dark .guides-filter-button:hover { background-color: #0e0b0e; border-color: #FF5789; } .guides-filter-button.active { border-color: #FF5789; background-color: #fff1f4; color: #FF5789; } .dark .guides-filter-button.active { background-color: rgba(255, 87, 137, 0.15); } .guides-clear-button { width: 100%; padding: 10px 12px; margin-bottom: 16px; border: 1px solid #e2e8f0; border-radius: 16px; background: #f8fafc; color: #334155; font-size: 14px; font-weight: 500; cursor: pointer; transition: all 0.15s ease; } .dark .guides-clear-button { background: #0e0b0e; color: #e2e8f0; border-color: rgba(255, 255, 255, 0.1); border-style: solid; border-width: 1.5px; } .guides-clear-button:hover { background: #f1f5f9; border-color: #cbd5e1; } .dark .guides-clear-button:hover { background: #0e0b0e; border-color: #FF5789; } /* Right content area */ .guides-content { flex: 1; min-width: 0; } .guides-results-count { font-size: 14px; color: #1e191a; margin-bottom: 16px; } .dark .guides-results-count { color: #cbd5e1; } .guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; } /* Guide cards */ .guides-card { border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; transition: border-color 0.15s ease, box-shadow 0.15s ease; background-color: white; } .dark .guides-card { border-color: rgba(255, 255, 255, 0.1); border-style: solid; border-width: 1.5px; background-color: #0e0b0e; } .guides-card:hover { border-color: #FF5789; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } .dark .guides-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); } .guides-card-icon { margin-bottom: 4px; } .guides-card-title { font-size: 16px; font-weight: 600; color: #1e191a; margin: 0; line-height: 1.3; } .dark .guides-card-title { color: #ffffff; } .guides-card-description { font-size: 16px; color: #575254; margin: 0; line-height: 1.5; flex-grow: 1; } .dark .guides-card-description { color: #a6a1a2; } .guides-card-meta { display: flex; align-items: center; gap: 8px; flex } ``` -------------------------------- ### Example: Age Group Binning Source: https://docs.omni.co/modeling/dimensions/parameters/bin-boundaries Demonstrates how to bin age data into three categories: under 21, 21 to 64, and 65 or older using bin_boundaries. ```yaml age_bin: sql: ${users.age} bin_boundaries: [21, 65] label: Age Bins ``` -------------------------------- ### Example: Simple Color Mapping for Priority (YAML) Source: https://docs.omni.co/modeling/dimensions/parameters/colors A simple example showing how to map 'High' priority to red and 'Low' priority to green, with a default 'gray' color for any other priority values. ```yaml priority: colors: conditions: - condition: is: High color: red - condition: is: Low color: green else: gray ``` -------------------------------- ### Category Icons Mapping (JavaScript) Source: https://docs.omni.co/guides/index Defines a mapping between guide categories (e.g., 'administration', 'api') and corresponding icon names. This object is used to visually represent guide categories within the UI. ```javascript export const categoryIcons = { 'administration': 'lock', 'api': 'terminal', 'connections': 'database', 'dashboards': 'table-columns', 'embed': 'code', 'errors': 'exclamation', 'modeling': 'wrench', 'patterns': 'plus', 'schedules & alerts': 'envelope', 'visualizations': 'chart-column', 'workbooks': 'book' }; ``` -------------------------------- ### GET /llms.txt Source: https://docs.omni.co/api/users/list-embed-users Retrieves the complete documentation index for the project. ```APIDOC ## GET /llms.txt ### Description Fetches the complete documentation index. Use this file to discover all available pages before exploring further. ### Method GET ### Endpoint https://docs.omni.co/llms.txt ### Parameters None ### Request Example GET https://docs.omni.co/llms.txt ### Response #### Success Response (200) - **content** (string) - The raw text content of the documentation index. #### Response Example # Documentation Index - /api/embed-users - /api/users/list-users ``` -------------------------------- ### Query Example with Fields, Base View, and Sorts (YAML) Source: https://docs.omni.co/modeling/query-views/parameters/query An example demonstrating how to define fields, specify the base view, and set sorting parameters for a query. This illustrates a common use case for configuring query views. ```yaml query: fields: users.age: age users.created_at[year]: created_at_year base_view: users sorts: - field: users.created_at[year] ``` -------------------------------- ### Status Embed Event Example Source: https://docs.omni.co/embed/events/status An example of the JSON payload for the status embed event, demonstrating how the status and dashboard ID are represented. This example shows a dashboard in a 'loading' state with a specific ID. ```json { "status": "loading", "dashboardId": "dashboard-123abc" } ``` -------------------------------- ### GET /api/connections/list-connections Source: https://docs.omni.co/content/develop/drafts Retrieves a list of all configured data connections in the workspace. ```APIDOC ## GET /api/connections/list-connections ### Description Fetches a list of all data connections currently available to the authenticated user. ### Method GET ### Endpoint /api/connections/list-connections ### Parameters #### Query Parameters - **limit** (integer) - Optional - Number of results to return. ### Request Example GET /api/connections/list-connections?limit=10 ### Response #### Success Response (200) - **connections** (array) - List of connection objects. #### Response Example { "connections": [ { "id": "conn_1", "name": "Production DB" }, { "id": "conn_2", "name": "Analytics Warehouse" } ] } ``` -------------------------------- ### Custom Cron Schedule Examples (Markdown) Source: https://docs.omni.co/share/deliveries/email Provides examples of cron expressions for scheduling email deliveries. These examples demonstrate how to set specific times and frequencies for automated content delivery, adhering to AWS cron syntax. ```markdown ```markdown title="At 9:00 AM every day" theme={null} 0 9 ? * * * ``` ``` ```markdown ```markdown title="At 6:30AM on the last day of the month" theme={null} 30 6 L * ? * ``` ``` ```markdown ```markdown title="At 8:45 AM every day, Monday through Friday" theme={null} 45 8 ? * MON-FRI * ``` ``` -------------------------------- ### POST /v1/connection-environments Source: https://docs.omni.co/api/openapi.yaml Creates new connection environments by associating a base connection with multiple environment-specific connections. ```APIDOC ## POST /v1/connection-environments ### Description Creates connection environments by associating environment-specific connections with a base connection. ### Method POST ### Endpoint /v1/connection-environments ### Parameters #### Request Body - **baseConnectionId** (string, uuid) - Required - The UUID of the base connection. - **environmentConnectionIds** (string) - Required - A comma-separated list of connection UUIDs. ### Request Example { "baseConnectionId": "123e4567-e89b-12d3-a456-426614174000", "environmentConnectionIds": "223e4567-e89b-12d3-a456-426614174001,323e4567-e89b-12d3-a456-426614174002" } ### Response #### Success Response (201) - **success** (boolean) - Operation status - **data** (array) - List of created connection environment objects #### Response Example { "success": true, "data": [ { "id": "...", "environmentConnectionId": "..." } ] } ``` -------------------------------- ### CSS: Styles for Guides Content Area and Results Count Source: https://docs.omni.co/api/labels/create-label Styles the main content area of the guides section, allowing it to grow and take available space. It also styles the results count display and the grid layout for guide cards. ```css .guides-content { flex: 1; min-width: 0; } .guides-results-count { font-size: 14px; color: #1e191a; margin-bottom: 16px; } .dark .guides-results-count { color: #cbd5e1; } .guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; } ``` -------------------------------- ### CSS Styles for Guides Content and Cards Source: https://docs.omni.co/analyze-explore/data-input-csvs Styles the main content area, results count, and the grid layout for guide cards. Includes styling for individual guide cards, their titles, descriptions, and metadata tags, with dark mode variations. ```css /* Right content area */ .guides-content { flex: 1; min-width: 0; } .guides-results-count { font-size: 14px; color: #1e191a; margin-bottom: 16px; } .dark .guides-results-count { color: #cbd5e1; } .guides-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; } /* Guide cards */ .guides-card { border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 12px; transition: border-color 0.15s ease, box-shadow 0.15s ease; background-color: white; } .dark .guides-card { border-color: rgba(255, 255, 255, 0.1); border-style: solid; border-width: 1.5px; background-color: #0e0b0e; } .guides-card:hover { border-color: #FF5789; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); } .dark .guides-card:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); } .guides-card-icon { margin-bottom: 4px; } .guides-card-title { font-size: 16px; font-weight: 600; color: #1e191a; margin: 0; line-height: 1.3; } .dark .guides-card-title { color: #ffffff; } .guides-card-description { font-size: 16px; color: #575254; margin: 0; line-height: 1.5; flex-grow: 1; } .dark .guides-card-description { color: #a6a1a2; } .guides-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .guides-card-tag { font-size: 12px; padding: 2px 8px; border-radius: 4px; background-color: #f1f5f9; color: #1e191a; } .dark .guides-card-tag { background-color: rgba(255, 255, 255, 0.03); color: rgb(250, 245, 247); } .guides-no-results { text-align: center; padding: 48px 24px; color: #1e191a; } .dark .guides-no-results { color: #cbd5e1; } ```