Skip to content

Latest commit

 

History

History
1058 lines (695 loc) · 78.6 KB

File metadata and controls

1058 lines (695 loc) · 78.6 KB

Dashboards

Overview

Available Operations

check_health

CheckDashboardHealth

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.check_health()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_ids List[str] ➖ Batch check multiple dashboards
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceCheckDashboardHealthResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

create_dashboard

CRUD operations

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.create_dashboard()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
name Optional[str] ➖ N/A
description OptionalNullable[str] ➖ N/A
code Optional[str] ➖ N/A
type Optional[models.TextqlRPCPublicDashboardDashboardType] ➖ N/A
html_url OptionalNullable[str] ➖ N/A
chat_id OptionalNullable[str] ➖ N/A
cell_id OptionalNullable[str] ➖ N/A
folder_id OptionalNullable[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceCreateDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

create_folder

Folder management

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.create_folder()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
name Optional[str] ➖ N/A
parent_id OptionalNullable[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceCreateDashboardFolderResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

delete

DeleteDashboard

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.delete()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceDeleteDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

delete_folder

DeleteDashboardFolder

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.delete_folder()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
folder_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceDeleteDashboardFolderResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

discard_changes

DiscardDashboardChanges

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.discard_changes()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceDiscardDashboardChangesResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

duplicate

DuplicateDashboard

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.duplicate()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
name OptionalNullable[str] ➖ Optional new name for the duplicate (defaults to "Copy of [original name]")
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceDuplicateDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get

GetDashboard

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.get()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceGetDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_version

GetDashboardVersion

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.get_version()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
version_number Optional[int] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceGetDashboardVersionResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_dashboard_view_stats

View analytics

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.get_dashboard_view_stats()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceGetDashboardViewStatsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

get_members_with_dashboards

Member management

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.get_members_with_dashboards(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicDashboardGetMembersWithDashboardsRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceGetMembersWithDashboardsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_folders

ListDashboardFolders

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.list_folders(body={})

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
body models.TextqlRPCPublicDashboardListDashboardFoldersRequest ✔️ N/A
connect_timeout_ms Optional[float] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceListDashboardFoldersResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list_versions

Version history

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.list_versions()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
limit Optional[int] ➖ N/A
offset Optional[int] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceListDashboardVersionsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

list

ListDashboards

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.list()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
search_term OptionalNullable[str] ➖ N/A
my_dashboards_only OptionalNullable[bool] ➖ N/A
sort_by Optional[models.TextqlRPCPublicDashboardDashboardSortField] ➖ N/A
sort_direction Optional[models.TextqlRPCPublicCommonSortDirection] ➖ Common enum for sort direction used across multiple services
limit Optional[int] ➖ N/A
offset Optional[int] ➖ N/A
folder_id OptionalNullable[str] ➖ Filter by specific folder
uncategorized_only OptionalNullable[bool] ➖ Only show dashboards with no folder
creator_member_id OptionalNullable[str] ➖ Filter by specific creator member ID (single-select; superseded by creator_member_ids when non-empty)
shared_with_me OptionalNullable[bool] ➖ N/A
creator_member_ids List[str] ➖ Multi-select creator filter (union). Supersedes creator_member_id when non-empty.
status_filter Optional[models.TextqlRPCPublicDashboardDashboardStatus] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceListDashboardsResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

move_to_folder

MoveDashboardToFolder

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.move_to_folder()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
folder_id OptionalNullable[str] ➖ null/empty = move to root (uncategorized)
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceMoveDashboardToFolderResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

preview_config

Config-managed dashboards: render a .dashboard straight from a patch ref before it merges (ADR-0022). Runs as the file's run_as, gated on the previewer being authorized for it; persists nothing.

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.preview_config()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
patch_ref Optional[str] ➖ git ref of the patch to preview from
dashboard_path Optional[str] ➖ Library path of the .dashboard file
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServicePreviewConfigDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

publish

Publishing workflow

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.publish()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
label OptionalNullable[str] ➖ Optional version label/description
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServicePublishDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

regenerate_screenshot

Screenshot management

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.regenerate_screenshot()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceRegenerateScreenshotResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

restore_dashboard_version

RestoreDashboardVersion

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.restore_dashboard_version()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
version_number Optional[int] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceRestoreDashboardVersionResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

run_scheduled_dashboard

RunScheduledDashboard

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.run_scheduled_dashboard()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceRunScheduledDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

spawn

Dashboard execution

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.spawn()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
force_restart Optional[bool] ➖ Force restart even if already running
refresh_data_only Optional[bool] ➖ Re-fetch data sources and reload without restarting the app
refresh_source_names List[str] ➖ If non-empty with refresh_data_only, only refresh these sources by name
refresh_code_only Optional[bool] ➖ Update code in-place via Streamlit's runOnSave without restarting the process
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceSpawnDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

update_dashboard

UpdateDashboard

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.update_dashboard()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
name OptionalNullable[str] ➖ N/A
description OptionalNullable[str] ➖ N/A
code OptionalNullable[str] ➖ N/A
type Optional[models.TextqlRPCPublicDashboardDashboardType] ➖ N/A
html_url OptionalNullable[str] ➖ N/A
data_sources Optional[models.TextqlRPCPublicDashboardDataSourcesPatch] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceUpdateDashboardResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

update_dashboard_folder

UpdateDashboardFolder

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.update_dashboard_folder()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
folder_id Optional[str] ➖ N/A
name OptionalNullable[str] ➖ N/A
parent_id OptionalNullable[str] ➖ Move folder to different parent (empty string = move to root)
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceUpdateDashboardFolderResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*

update_dashboard_schedule

Scheduling

Example Usage

import os
from textql_sdk import Textql


with Textql(
    api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:

    res = textql.dashboards.update_dashboard_schedule()

    # Handle response
    print(res)

Parameters

Parameter Type Required Description
connect_timeout_ms Optional[float] ➖ N/A
dashboard_id Optional[str] ➖ N/A
schedule_enabled Optional[bool] ➖ N/A
cron_string OptionalNullable[str] ➖ N/A
data_sources List[models.TextqlRPCPublicDashboardDataSource] ➖ N/A
retries Optional[utils.RetryConfig] ➖ Configuration to override the default retry behavior of the client.

Response

models.DashboardServiceUpdateDashboardScheduleResponse

Errors

Error Type Status Code Content Type
errors.TextqlDefaultError 4XX, 5XX */*