60
60
{
61
61
"id" : " 1" ,
62
62
"domain" : " example.com" ,
63
+ "digest" : " a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947" ,
63
64
"created_at" : " 2022-11-16T08:15:34.238Z" ,
64
65
"severity" : " noop" ,
65
66
"reject_media" : false ,
@@ -120,6 +121,7 @@ Authorization
120
121
{
121
122
"id" : " 1" ,
122
123
"domain" : " example.com" ,
124
+ "digest" : " a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947" ,
123
125
"created_at" : " 2022-11-16T08:15:34.238Z" ,
124
126
"severity" : " noop" ,
125
127
"reject_media" : false ,
@@ -146,7 +148,7 @@ DomainBlock with the given ID does not exist
146
148
147
149
``` json
148
150
{
149
- "error" : " Record not found"
151
+ "error" : " Record not found"
150
152
}
151
153
```
152
154
@@ -205,6 +207,7 @@ Domain has been blocked from federating.
205
207
{
206
208
"id" : " 1" ,
207
209
"domain" : " example.com" ,
210
+ "digest" : " a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947" ,
208
211
"created_at" : " 2022-11-16T08:15:34.238Z" ,
209
212
"severity" : " noop" ,
210
213
"reject_media" : false ,
@@ -225,13 +228,35 @@ Authorized user is not allowed to perform this action, or invalid or missing Aut
225
228
}
226
229
```
227
230
228
- ##### 422: Unprocessable entity
231
+ ##### 422: Unprocessable entity - Missing Parameter
229
232
230
233
The domain parameter was not provided
231
234
232
235
``` json
233
236
{
234
- "error" : " Validation failed: Domain can't be blank"
237
+ "error" : " Validation failed: Domain can't be blank"
238
+ }
239
+ ```
240
+
241
+ ##### 422: Unprocessable entity - Existing Domain Block
242
+
243
+ The domain parameter already is covered by an existing domain block.
244
+
245
+ ``` json
246
+ {
247
+ "error" : " You have already imposed stricter limits on example.com."
248
+ "existing_domain_block" : {
249
+ "id" : " 1" ,
250
+ "domain" : " example.com" ,
251
+ "digest" : " a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947" ,
252
+ "created_at" : " 2022-11-16T08:15:34.238Z" ,
253
+ "severity" : " noop" ,
254
+ "reject_media" : false ,
255
+ "reject_reports" : false ,
256
+ "private_comment" : null ,
257
+ "public_comment" : null ,
258
+ "obfuscate" : false
259
+ }
235
260
}
236
261
```
237
262
@@ -292,6 +317,7 @@ Domain block has been updated
292
317
{
293
318
"id" : " 1" ,
294
319
"domain" : " example.com" ,
320
+ "digest" : " a379a6f6eeafb9a55e378c118034e2751e682fab9f2d30ab13d2125586ce1947" ,
295
321
"created_at" : " 2022-11-16T08:15:34.238Z" ,
296
322
"severity" : " noop" ,
297
323
"reject_media" : false ,
@@ -368,12 +394,12 @@ DomainBlock with the given ID does not exist
368
394
369
395
``` json
370
396
{
371
- "error" : " Record not found"
397
+ "error" : " Record not found"
372
398
}
373
399
```
374
400
375
401
---
376
402
377
403
## See also
378
404
379
- {{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/admin/domain_blocks_controller.rb " caption="app/controllers/api/v1/admin/domain_blocks_controller.rb" >}}
405
+ {{< caption-link url="https://github.com/mastodon/mastodon/blob/main/app/controllers/api/v1/admin/domain_blocks_controller.rb " caption="app/controllers/api/v1/admin/domain_blocks_controller.rb" >}}
0 commit comments