summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/admin/domain_permission_subscriptions.md21
-rw-r--r--docs/api/swagger.yaml116
2 files changed, 135 insertions, 2 deletions
diff --git a/docs/admin/domain_permission_subscriptions.md b/docs/admin/domain_permission_subscriptions.md
index 77ec831e1..78518e187 100644
--- a/docs/admin/domain_permission_subscriptions.md
+++ b/docs/admin/domain_permission_subscriptions.md
@@ -118,6 +118,27 @@ JSON lists use content type `application/json`.
{
"domain": "bumfaces.net",
"suspended_at": "2020-05-13T13:29:12.000Z",
+ "comment": "big jerks"
+ },
+ {
+ "domain": "peepee.poopoo",
+ "suspended_at": "2020-05-13T13:29:12.000Z",
+ "comment": "harassment"
+ },
+ {
+ "domain": "nothanks.com",
+ "suspended_at": "2020-05-13T13:29:12.000Z"
+ }
+]
+```
+
+As an alternative to `"comment"`, `"public_comment"` will also work:
+
+```json
+[
+ {
+ "domain": "bumfaces.net",
+ "suspended_at": "2020-05-13T13:29:12.000Z",
"public_comment": "big jerks"
},
{
diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml
index e1c1c14e9..778b1c843 100644
--- a/docs/api/swagger.yaml
+++ b/docs/api/swagger.yaml
@@ -1099,13 +1099,22 @@ definitions:
domain:
description: Domain represents a remote domain
properties:
+ comment:
+ description: |-
+ If the domain is blocked, what's the publicly-stated reason for the block.
+ Alternative to `public_comment` to be used when serializing/deserializing via /api/v1/instance.
+ example: they smell
+ type: string
+ x-go-name: Comment
domain:
description: The hostname of the domain.
example: example.org
type: string
x-go-name: Domain
public_comment:
- description: If the domain is blocked, what's the publicly-stated reason for the block.
+ description: |-
+ If the domain is blocked, what's the publicly-stated reason for the block.
+ Alternative to `comment` to be used when serializing/deserializing NOT via /api/v1/instance.
example: they smell
type: string
x-go-name: PublicComment
@@ -1124,6 +1133,13 @@ definitions:
x-go-package: github.com/superseriousbusiness/gotosocial/internal/api/model
domainPermission:
properties:
+ comment:
+ description: |-
+ If the domain is blocked, what's the publicly-stated reason for the block.
+ Alternative to `public_comment` to be used when serializing/deserializing via /api/v1/instance.
+ example: they smell
+ type: string
+ x-go-name: Comment
created_at:
description: Time at which the permission entry was created (ISO 8601 Datetime).
example: "2021-07-30T09:20:25+00:00"
@@ -1162,7 +1178,9 @@ definitions:
type: string
x-go-name: PrivateComment
public_comment:
- description: If the domain is blocked, what's the publicly-stated reason for the block.
+ description: |-
+ If the domain is blocked, what's the publicly-stated reason for the block.
+ Alternative to `comment` to be used when serializing/deserializing NOT via /api/v1/instance.
example: they smell
type: string
x-go-name: PublicComment
@@ -5823,6 +5841,53 @@ paths:
summary: View domain allow with the given ID.
tags:
- admin
+ put:
+ consumes:
+ - multipart/form-data
+ operationId: domainAllowUpdate
+ parameters:
+ - description: The id of the domain allow.
+ in: path
+ name: id
+ required: true
+ type: string
+ - description: Obfuscate the name of the domain when serving it publicly. Eg., `example.org` becomes something like `ex***e.org`.
+ in: formData
+ name: obfuscate
+ type: boolean
+ - description: Public comment about this domain allow. This will be displayed alongside the domain allow if you choose to share allows.
+ in: formData
+ name: public_comment
+ type: string
+ - description: Private comment about this domain allow. Will only be shown to other admins, so this is a useful way of internally keeping track of why a certain domain ended up allowed.
+ in: formData
+ name: private_comment
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: The updated domain allow.
+ schema:
+ $ref: '#/definitions/domainPermission'
+ "400":
+ description: bad request
+ "401":
+ description: unauthorized
+ "403":
+ description: forbidden
+ "404":
+ description: not found
+ "406":
+ description: not acceptable
+ "500":
+ description: internal server error
+ security:
+ - OAuth2 Bearer:
+ - admin:write:domain_allows
+ summary: Update a single domain allow.
+ tags:
+ - admin
/api/v1/admin/domain_blocks:
get:
operationId: domainBlocksGet
@@ -5990,6 +6055,53 @@ paths:
summary: View domain block with the given ID.
tags:
- admin
+ put:
+ consumes:
+ - multipart/form-data
+ operationId: domainBlockUpdate
+ parameters:
+ - description: The id of the domain block.
+ in: path
+ name: id
+ required: true
+ type: string
+ - description: Obfuscate the name of the domain when serving it publicly. Eg., `example.org` becomes something like `ex***e.org`.
+ in: formData
+ name: obfuscate
+ type: boolean
+ - description: Public comment about this domain block. This will be displayed alongside the domain block if you choose to share blocks.
+ in: formData
+ name: public_comment
+ type: string
+ - description: Private comment about this domain block. Will only be shown to other admins, so this is a useful way of internally keeping track of why a certain domain ended up blocked.
+ in: formData
+ name: private_comment
+ type: string
+ produces:
+ - application/json
+ responses:
+ "200":
+ description: The updated domain block.
+ schema:
+ $ref: '#/definitions/domainPermission'
+ "400":
+ description: bad request
+ "401":
+ description: unauthorized
+ "403":
+ description: forbidden
+ "404":
+ description: not found
+ "406":
+ description: not acceptable
+ "500":
+ description: internal server error
+ security:
+ - OAuth2 Bearer:
+ - admin:write:domain_blocks
+ summary: Update a single domain block.
+ tags:
+ - admin
/api/v1/admin/domain_keys_expire:
post:
consumes: