Table: twilio_chat_service - Query Twilio Chat Services using SQL
Twilio Chat Services is a feature within Twilio's communication platform that allows the creation and management of chat services for applications. It offers a set of tools to build and scale real-time chat applications, offering features like message history, user identity and status, typing indicators, and more. Twilio Chat Services helps in creating a rich and interactive communication experience in any application.
Table Usage Guide
The twilio_chat_service
table provides insights into each chat service within Twilio's platform. As a developer or system administrator, explore service-specific details through this table, including service ID, friendly name, default service role, and webhook configuration. Utilize it to manage and monitor your chat services, ensuring optimal configuration and performance.
Examples
Basic info
Gain insights into the specific chat services within your Twilio account, including their unique identifiers and associated roles, to better understand and manage your communication services. This could be particularly useful for auditing purposes or for streamlining your chat services.
select sid, friendly_name, default_service_role_sid, typing_indicator_timeout, limits, account_sidfrom twilio_chat_service;
select sid, friendly_name, default_service_role_sid, typing_indicator_timeout, limits, account_sidfrom twilio_chat_service;
List services with reachability indicator enabled
Explore which chat services have the reachability indicator enabled. This can help you identify services where users are notified of their message's delivery status, enhancing communication efficiency.
select sid, friendly_name, reachability_enabled, account_sidfrom twilio_chat_servicewhere reachability_enabled;
select sid, friendly_name, reachability_enabled, account_sidfrom twilio_chat_servicewhere reachability_enabled = 1;
List services with consumption horizon enabled
Explore which chat services have the consumption horizon feature enabled. This query is useful in identifying services that allow users to track the last read message, enhancing user experience by keeping track of conversation progress.
select sid, friendly_name, read_status_enabled, account_sidfrom twilio_chat_servicewhere read_status_enabled;
select sid, friendly_name, read_status_enabled, account_sidfrom twilio_chat_servicewhere read_status_enabled = 1;
Get user count by chat service
Explore which chat services have the most users to understand their popularity and usage trends. This can help in allocating resources effectively or planning targeted promotions.
select s.sid, s.friendly_name, count(u.sid)from twilio_chat_service as s, twilio_chat_service_user as uwhere u.service_sid = s.sidgroup by s.sid, s.friendly_name;
select s.sid, s.friendly_name, count(u.sid)from twilio_chat_service as s join twilio_chat_service_user as u on u.service_sid = s.sidgroup by s.sid, s.friendly_name;
Schema for twilio_chat_service
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_sid | text | =, !=, ~~, ~~*, !~~, !~~* | The SID of the Account that created the resource. |
date_created | timestamp with time zone | The date and time that the resource was created. | |
date_updated | timestamp with time zone | The date and time that the resource was last updated. | |
default_channel_creator_role_sid | text | The channel role assigned to a channel creator when they join a new channel. | |
default_channel_role_sid | text | The channel role assigned to users when they are added to a channel. | |
default_service_role_sid | text | The service role assigned to users when they are added to the service. | |
friendly_name | text | The string that you assigned to describe the resource. | |
limits | jsonb | An object that describes the limits of the service instance. | |
links | jsonb | A list of absolute URLs of the Service's Channels, Roles, and Users. | |
media | jsonb | The properties of the media that the service supports. | |
notifications | jsonb | The notification configuration for the Service instance. | |
post_webhook_retry_count | bigint | The number of times calls to the 'post_webhook_url' will be retried. | |
post_webhook_url | text | The URL for post-event webhooks. | |
pre_webhook_retry_count | bigint | Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses. | |
pre_webhook_url | text | The webhook URL for pre-event webhooks. | |
reachability_enabled | boolean | Indicates whether the Reachability Indicator feature is enabled for this Service instance, or not. | |
read_status_enabled | boolean | Indicates whether the Message Consumption Horizon feature is enabled, or not. | |
sid | text | = | The unique string that identifies the resource. |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. | |
typing_indicator_timeout | bigint | How long in seconds to wait before assuming the user is no longer typing. | |
url | text | The absolute URL of the Service resource. | |
webhook_filters | jsonb | The list of webhook events that are enabled for this Service instance. | |
webhook_method | text | The HTTP method to use for both PRE and POST webhooks. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- twilio
You can pass the configuration to the command with the --config
argument:
steampipe_export_twilio --config '<your_config>' twilio_chat_service