1
0
mirror of https://github.com/mastodon/documentation synced 2025-04-11 22:56:17 +02:00
documentation/content/en/entities/Admin_IpBlock.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.1 KiB

title description menu aliases
Admin::IpBlock Represents an IP address range that cannot be used to sign up.
docs
parent
entities
/entities/admin-ipblock
/entities/Admin-IpBlock
/entities/admin_ipblock
/entities/Admin_IpBlock
/api/entities/admin-ipblock
/api/entities/Admin-IpBlock
/api/entities/admin_ipblock
/api/entities/Admin_IpBlock

Example

{
  "id": "1",
  "ip": "8.8.8.8/32",
  "severity": "no_access",
  "comment": "",
  "created_at": "2022-11-16T07:22:00.501Z",
  "expires_at": null
}

Attributes

id

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

ip

Description: The IP address range that is not allowed to federate.
Type: String (IP address and prefix)
Version history:
4.0.0 - added

severity

Description: The associated policy with this IP block.
Type: String (Enumerable, oneOf)
sign_up_requires_approval = Any signup from this IP range will create a pending account
sign_up_block = Any signup from this IP range will be rejected
no_access = Any activity from this IP range will be rejected entirely
Version history:
4.0.0 - added

comment

Description: The recorded reason for this IP block.
Type: String
Version history:
4.0.0 - added

created_at

Description: When the IP block was created.
Type: String (Datetime)
Version history:
4.0.0 - added

expires_at

Description: When the IP block will expire.
Type: {{}} String (Datetime)
Version history:
4.0.0 - added

See also

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

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