1
0
mirror of https://github.com/mastodon/documentation synced 2025-04-11 22:56:17 +02:00
documentation/content/en/entities/Admin_EmailDomainBlock.md
Nik Clayton 49868155b9
feat: Document datetime and date formats (#1565)
Add a new document that precisely describes the string representation of
datetime and date types.

The previous description of them as "ISO 8601 Datetime" was very
imprecise, as ISO 8601 describes many different ways of representing a
datetime and date.

Specify the datetime format precisely as the ISO 8601 profile described
in RFC 3339, and the date format precisely as the "Complete date" format
from the W3C note on date and time formats.

Adjust all the references to ISO 8601 datetimes or dates to link back
to the definition.

Fixes #1420
2024-11-27 15:08:51 +00:00

2.8 KiB

title description menu aliases
Admin::EmailDomainBlock Represents an email domain that cannot be used to sign up.
docs
parent
entities
/entities/admin-emaildomainblock
/entities/Admin-EmailDomainBlock
/entities/admin_emaildomainblock
/entities/Admin_EmailDomainBlock
/api/entities/admin-emaildomainblock
/api/entities/Admin-EmailDomainBlock
/api/entities/admin_emaildomainblock
/api/entities/Admin_EmailDomainBlock

Example

{
  "id": "1",
  "domain": "foo",
  "created_at": "2022-11-16T06:09:36.176Z",
  "history": [
    {
      "day": "1668556800",
      "accounts": "0",
      "uses": "0"
    },
    {
      "day": "1668470400",
      "accounts": "0",
      "uses": "0"
    },
    {
      "day": "1668384000",
      "accounts": "0",
      "uses": "0"
    },
    {
      "day": "1668297600",
      "accounts": "0",
      "uses": "0"
    },
    {
      "day": "1668211200",
      "accounts": "0",
      "uses": "0"
    },
    {
      "day": "1668124800",
      "accounts": "0",
      "uses": "0"
    },
    {
      "day": "1668038400",
      "accounts": "0",
      "uses": "0"
    }
  ]
}

Attributes

id

Description: The ID of the EmailDomainBlock in the database.
Type: String (cast from an integer, but not guaranteed to be a number)
Version history:
4.0.0 - added

domain

Description: The email domain that is not allowed to be used for signups.
Type: String
Version history:
4.0.0 - added

created_at

Description: When the email domain was disallowed from signups.
Type: String (Datetime)
Version history:
4.0.0 - added

history

Description: Usage statistics for given days (typically the past week).
Type: Array of Hash
Version history:
4.0.0 - added

history[][day]

Description: UNIX timestamp on midnight of the given day.
Type: String (UNIX timestamp)
Version history:
4.0.0 - added

history[][accounts]

Description: The counted accounts signup attempts using that email domain within that day.
Type: String (cast from an integer)
Version history:
4.0.0 - added

history[][uses]

Description: The counted IP signup attempts of that email domain within that day.
Type: String (cast from an integer)
Version history:
4.0.0 - added

See also

{{< page-relref page="methods/admin/email_domain_blocks" caption="admin/email_domain_blocks API methods" >}}

{{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/serializers/rest/admin/email_domain_block_serializer.rb" caption="app/serializers/rest/admin/email_domain_block_serializer.rb" >}}