omni.OmniEmbedder
Factory class for building and signing embedding URLs.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
organization_name
|
str | None
|
organization_name: Omni organization name. OMNI_ORGANIZATION_NAME environment variable will be used as a fallback. |
None
|
embed_secret
|
str | None
|
Omni embed secret. OMNI_EMBED_SECRET environment variable will be used as a fallback. |
None
|
vanity_domain
|
str | None
|
Vanity domain configured with Omni. Should not be fully qualified. OMNI_VANITY_DOMAIN environment variable will be used as a fallback. |
None
|
Attributes:
| Name | Type | Description |
|---|---|---|
embed_login_url |
Base url of embedding urls. |
|
embed_secret |
Omni embed secret. |
Source code in src/omni/embed.py
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 | |
AccessMode
Bases: Enum
AccessMode options
Attributes:
| Name | Type | Description |
|---|---|---|
application |
APPLICATION |
|
single_content |
SINGLE_CONTENT |
Source code in src/omni/embed.py
108 109 110 111 112 113 114 115 116 117 | |
ContentRole
Bases: Enum
ContentRole options
Attributes:
| Name | Type | Description |
|---|---|---|
viewer |
VIEWER |
|
editor |
EDITOR |
|
manager |
MANAGER |
|
no_access |
NO_ACCESS |
Source code in src/omni/embed.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 | |
PrefersDark
Bases: Enum
PrefersDark options
Attributes:
| Name | Type | Description |
|---|---|---|
yes |
true |
|
no |
false |
|
system |
system |
Source code in src/omni/embed.py
134 135 136 137 138 139 140 141 142 143 144 145 | |
Theme
Bases: Enum
Theme options
Attributes:
| Name | Type | Description |
|---|---|---|
dawn |
dawn |
|
vibes |
vibes |
|
breeze |
breeze |
|
blank |
blank |
Source code in src/omni/embed.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 | |
build_app_url(content_id, external_id, name, **options)
Builds a signed embedding URL for an app.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content_id
|
str
|
ID of the app to embed, e.g. "da24491e". |
required |
external_id
|
str
|
Unique ID for the embed user. |
required |
name
|
str
|
Name for the embed user's name property. |
required |
**options
|
Any
|
Any of the optional keyword arguments accepted by build_url. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Signed embedding URL. |
Source code in src/omni/embed.py
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | |
build_chat_url(external_id, name, **options)
Builds a signed embedding URL for chat. Chat has no content ID - it always lives at "/chat".
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
external_id
|
str
|
Unique ID for the embed user. |
required |
name
|
str
|
Name for the embed user's name property. |
required |
**options
|
Any
|
Any of the optional keyword arguments accepted by build_url. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Signed embedding URL. |
Source code in src/omni/embed.py
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | |
build_dashboard_url(content_id, external_id, name, page_key=None, **options)
Builds a signed embedding URL for a dashboard.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content_id
|
str
|
ID of the dashboard to embed, e.g. "da24491e". |
required |
external_id
|
str
|
Unique ID for the embed user. |
required |
name
|
str
|
Name for the embed user's name property. |
required |
page_key
|
str | None
|
Key of the page to open on a multi-page dashboard, e.g. "revenue". Omitting it opens the dashboard's first page. |
None
|
**options
|
Any
|
Any of the optional keyword arguments accepted by build_url. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Signed embedding URL. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If page_key is empty or is one of Omni's reserved system values. |
Source code in src/omni/embed.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
build_url(content_path, external_id, name, *, access_boost=None, connection_roles=None, custom_theme=None, custom_theme_id=None, email=None, entity=None, entity_folder_content_role=None, entity_folder_group_content_role=None, entity_folder_label=None, entity_group_label=None, expires_in=None, filter_search_params=None, groups=None, link_access=None, mode=None, model_roles=None, prefers_dark=None, preserve_entity_folder_content_role=None, signing_version='v1', theme=None, ui_settings=None, user_attributes=None)
Builds a signed dashboard embedding URL. For more information on the options see the Omni Docs: https://docs.omni.co/embed/setup/url-parameters
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
access_boost
|
bool
|
Enables AccessBoost for the embedded dashboard. |
None
|
connection_roles
|
dict
|
Level of access for all models in a connection. |
None
|
content_path
|
str
|
Path pointing to the dashboard you wish to embed. |
required |
custom_theme
|
dict
|
Custom theme properties for styling embedded dashboards. |
None
|
custom_theme_id
|
str
|
Theme ID from your Omni instance to stylize embedded dashboards. |
None
|
email
|
str
|
Email for entity users when sharing content or sending deliveries. |
None
|
entity
|
str
|
User group identifier to associate the embed user with a larger group. |
None
|
entity_folder_content_role
|
str
|
Content role for the embed user's shared entity folder. |
None
|
entity_folder_group_content_role
|
str
|
Content role for the embed entity group shared folder. |
None
|
entity_folder_label
|
str
|
Label for the embed user's associated entity folder. |
None
|
entity_group_label
|
str
|
Label for the embed user's associated entity group. |
None
|
expires_in
|
int
|
Lifetime of the URL in seconds. Must be positive and no more than 7 days (604800 seconds). Defaults to 24 hours. Only used by the v1 signing format; ignored for v0, which has nowhere to carry an expiry. |
None
|
external_id
|
str
|
Unique ID for the embed user. |
required |
filter_search_params
|
str | dict
|
Filters to apply for the embedded content. |
None
|
groups
|
list[str]
|
Associate embed user with existing user groups in your Omni instance. |
None
|
link_access
|
bool | list[str]
|
Controls which Omni dashboards can be linked to from the embedded dashboard. |
None
|
mode
|
AccessMode
|
Type of access users will have to Omni in the iframe. |
None
|
model_roles
|
dict
|
Level of access for individual models in a connection. |
None
|
name
|
str
|
Name for the embed user's name property. |
required |
prefers_dark
|
PrefersDark
|
Light or dark mode appearance. |
None
|
preserve_entity_folder_content_role
|
bool
|
Retains the embed user's existing entity folder content role. |
None
|
signing_version
|
str
|
Signing format to use - "v1" (default) or "v0" (legacy). The v0 format is unsupported by Omni after October 1, 2026 and removed by January 1, 2027. |
'v1'
|
theme
|
Theme
|
Built-in Omni application theme. |
None
|
ui_settings
|
dict
|
General settings of the application in embed. |
None
|
user_attributes
|
dict
|
User attributes to apply to the embed user. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Signed dashboard embedding URL. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If an argument is invalid or the generated v1 payload is too large. |
Source code in src/omni/embed.py
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 | |
build_workbook_url(content_id, external_id, name, **options)
Builds a signed embedding URL for a workbook.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
content_id
|
str
|
ID of the workbook to embed, e.g. "da24491e". |
required |
external_id
|
str
|
Unique ID for the embed user. |
required |
name
|
str
|
Name for the embed user's name property. |
required |
**options
|
Any
|
Any of the optional keyword arguments accepted by build_url. |
{}
|
Returns:
| Name | Type | Description |
|---|---|---|
str |
str
|
Signed embedding URL. |
Source code in src/omni/embed.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 | |