turbot/mastodon
steampipe plugin install mastodon

Table: mastodon_rule - Query Mastodon Rules using SQL

Mastodon is a decentralized, open-source social network. A Mastodon Rule represents a moderation policy defined by the administrators of a Mastodon instance. These rules provide guidelines to the users about what is and isn't allowed on that particular instance.

Table Usage Guide

The mastodon_rule table provides insights into the moderation rules within a Mastodon instance. As a community manager or administrator, explore rule-specific details through this table, including the rule text, creation date, and associated metadata. Utilize it to uncover information about rules, such as those concerning specific user behavior, content restrictions, and the overall moderation policy of the instance.

Examples

Query rules for the home server

Assess the elements within your home server's rule set to better understand its configuration and identify areas for potential optimization or troubleshooting.

select
id as "#",
rule
from
mastodon_rule
order by
id :: int;

Schema for mastodon_rule

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
account_idtext=, !=, ~~, ~~*, !~~, !~~*The account ID.
idtextID of the rule.
ruletextText of the rule.
servertext=Server to which rules apply.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe 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_rule