Table: mastodon_domain_block - Query Mastodon Domain Blocks using SQL
Mastodon is a decentralized social network service that allows users to create their own servers, known as instances. A Domain Block in Mastodon is a feature that allows instance administrators to block entire domains to protect their users from unwanted content. This feature is particularly useful in preventing harassment, spam, and maintaining the overall health and safety of the community on the instance.
Table Usage Guide
The mastodon_domain_block
table provides insights into blocked domains within the Mastodon social network service. As an instance administrator, explore domain-specific details through this table, including reasons for blockage, severity of the block, and associated metadata. Utilize it to uncover information about blocked domains, such as those flagged for harassment or spam, and to manage the overall health and safety of your instance.
Examples
Domains blocked by the home Mastodon server
Analyze the severity level of domains that have been blocked by your home Mastodon server. This can help you understand which domains might be causing issues or unwanted traffic, enabling you to manage your server more effectively.
select domain, severityfrom mastodon_domain_blocklimit 10;
select domain, severityfrom mastodon_domain_blocklimit 10;
Domains blocked by another Mastodon server
Discover the segments that are blocked by a specific Mastodon server. This can be particularly useful for identifying and managing potential sources of spam or harmful content.
select server, domain, severityfrom mastodon_domain_blockwhere server = 'https://nerdculture.de';
select server, domain, severityfrom mastodon_domain_blockwhere server = 'https://nerdculture.de';
Classify block severities for the home Mastodon server
Analyze block severities on your home Mastodon server to understand the frequency of each severity level. This can help in assessing the overall health and safety of your server.
select severity, count(*)from mastodon_domain_blockgroup by severity;
select severity, count(*)from mastodon_domain_blockgroup by severity;
Schema for mastodon_domain_block
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
account_id | text | =, !=, ~~, ~~*, !~~, !~~* | The account ID. |
digest | text | Digest of a domain block. | |
domain | text | Domain of a blocked server. | |
server | text | = | Server that is blocking domains. |
severity | text | Severity of a domain block. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. |
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)" -- mastodon
You can pass the configuration to the command with the --config
argument:
steampipe_export_mastodon --config '<your_config>' mastodon_domain_block