org. atgrp. mod. submitReport
Report an account or record in a group, opening or reopening it in the moderation queue. The caller must be able to read the subject's space. Requires service auth.
- Kind
- A method (procedure)
- Part of
- The spec
- Named in
- File
lexicons/org/atgrp/mod/submitReport.on tangledjson - Published
- On the network, the same as the spec has it.
main procedure
Input
Encoding: application/json
| Field | Type | Description |
|---|---|---|
group (required) | string (did) | |
subject (required) | string (uri) | An account DID or record URI. |
cid | string (cid) | If set, a specific version of the record. |
reasonType (required) | org. | For reasonViolation, cite the broken rule in rule. |
reason | string
| |
rule | string (at-uri) | The group rule the subject breaks. |
Output
Encoding: application/json
| Field | Type | Description |
|---|---|---|
eventId (required) | string
| |
createdAt (required) | string (datetime) |
Errors
GroupNotFoundInvalidSubject: The subject isn't in this group.
The schema in the spec
{
"lexicon": 1,
"id": "org.atgrp.mod.submitReport",
"defs": {
"main": {
"type": "procedure",
"description": "Report an account or record in a group, opening or reopening it in the moderation queue. The caller must be able to read the subject's space. Requires service auth.",
"input": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": [
"group",
"subject",
"reasonType"
],
"properties": {
"group": {
"type": "string",
"format": "did"
},
"subject": {
"type": "string",
"format": "uri",
"description": "An account DID or record URI."
},
"cid": {
"type": "string",
"format": "cid",
"description": "If set, a specific version of the record."
},
"reasonType": {
"type": "ref",
"ref": "org.atgrp.mod.defs#reasonType",
"description": "For reasonViolation, cite the broken rule in rule."
},
"reason": {
"type": "string",
"maxGraphemes": 2000,
"maxLength": 20000
},
"rule": {
"type": "string",
"format": "at-uri",
"description": "The group rule the subject breaks."
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "object",
"required": [
"eventId",
"createdAt"
],
"properties": {
"eventId": {
"type": "string",
"minLength": 1,
"maxLength": 512
},
"createdAt": {
"type": "string",
"format": "datetime"
}
}
}
},
"errors": [
{
"name": "GroupNotFound"
},
{
"name": "InvalidSubject",
"description": "The subject isn't in this group."
}
]
}
}
}