steampipe plugin install twilio

Table: twilio_chat_service_user - Query Twilio Chat Service Users using SQL

Twilio Chat Service Users are entities within Twilio's Chat Service that represent individual participants in a chat. Each user has a unique identity and can be associated with one or more chat services. The user's identity, role, and other attributes can be managed and queried through Twilio's API.

Table Usage Guide

The twilio_chat_service_user table provides insights into users within Twilio's Chat Service. As an application developer or system administrator, you can explore user-specific details through this table, including their roles, identities, and other associated metadata. Utilize it to uncover information about users, such as their participation in different chat services, their roles within these services, and the management of their identities.

Important Notes

  • You must specify the service_sid in the where clause to query this table.

Examples

Basic info

Discover the segments that have been created within a specific chat service, including their status and creation date. This can be particularly useful in identifying active users and understanding the overall usage patterns of the service.

select
sid,
friendly_name,
identity,
service_sid,
date_created,
is_online,
account_sid
from
twilio_chat_service_user
where
service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70';
select
sid,
friendly_name,
identity,
service_sid,
date_created,
is_online,
account_sid
from
twilio_chat_service_user
where
service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70';

List online users

Explore which users are currently online in a particular chat service. This can be particularly useful for real-time user engagement or to monitor active participation within a specific chat service.

select
distinct sid,
friendly_name,
identity,
service_sid,
is_online,
account_sid
from
twilio_chat_service_user
where
service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70'
and is_online;
select
distinct sid,
friendly_name,
identity,
service_sid,
is_online,
account_sid
from
twilio_chat_service_user
where
service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70'
and is_online;

List channel count per user

Analyze the settings to understand the distribution of chat channels for each user within a specific service. This can be useful for identifying user engagement and managing resource allocation.

select
distinct sid,
friendly_name,
identity,
joined_channels_count,
account_sid
from
twilio_chat_service_user
where
service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70';
select
distinct sid,
friendly_name,
identity,
joined_channels_count,
account_sid
from
twilio_chat_service_user
where
service_sid = 'IS69abc66f24de48919638c0a0bfaf2a70';

Schema for twilio_chat_service_user

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
account_sidtextThe SID of the Account that created the resource.
attributestextThe JSON string that stores application-specific data.
date_createdtimestamp with time zoneThe date and time that the resource was created.
date_updatedtimestamp with time zoneThe date and time that the resource was last updated.
friendly_nametextThe string that you assigned to describe the resource.
identitytextThe string that identifies the resource's User.
is_notifiablebooleanIndicates whether the User has a potentially valid Push Notification registration for the Service instance, or not.
is_onlinebooleanIndicates whether the User is actively connected to the Service instance and online, or not.
joined_channels_countbigintThe number of Channels the User is a Member of.
linksjsonbA list of absolute URLs of the Channel and Binding resources related to the user.
role_sidtextThe SID of the Role assigned to the user.
service_sidtext=The SID of the Service that the resource is associated with.
sidtext=The unique string that identifies the resource.
titletextTitle of the resource.
urltextThe absolute URL of the Service resource.

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_user