Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Timo Ley
synapse
Commits
0b90fc6e
Unverified
Commit
0b90fc6e
authored
5 years ago
by
Andrew Morgan
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Document Shutdown Room admin API (#6541)
parent
1da15f05
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changelog.d/6541.doc
+1
-0
1 addition, 0 deletions
changelog.d/6541.doc
docs/admin_api/shutdown_room.md
+72
-0
72 additions, 0 deletions
docs/admin_api/shutdown_room.md
with
73 additions
and
0 deletions
changelog.d/6541.doc
0 → 100644
+
1
−
0
View file @
0b90fc6e
Document the Room Shutdown Admin API.
\ No newline at end of file
This diff is collapsed.
Click to expand it.
docs/admin_api/shutdown_room.md
0 → 100644
+
72
−
0
View file @
0b90fc6e
# Shutdown room API
Shuts down a room, preventing new joins and moves local users and room aliases automatically
to a new room. The new room will be created with the user specified by the
`new_room_user_id`
parameter as room administrator and will contain a message
explaining what happened. Users invited to the new room will have power level
-10 by default, and thus be unable to speak. The old room's power levels will be changed to
disallow any further invites or joins.
The local server will only have the power to move local user and room aliases to
the new room. Users on other servers will be unaffected.
## API
You will need to authenticate with an access token for an admin user.
### URL
`POST /_synapse/admin/v1/shutdown_room/{room_id}`
### URL Parameters
*
`room_id`
- The ID of the room (e.g
`!someroom:example.com`
)
### JSON Body Parameters
*
`new_room_user_id`
- Required. A string representing the user ID of the user that will admin
the new room that all users in the old room will be moved to.
*
`room_name`
- Optional. A string representing the name of the room that new users will be
invited to.
*
`message`
- Optional. A string containing the first message that will be sent as
`new_room_user_id`
in the new room. Ideally this will clearly convey why the
original room was shut down.
If not specified, the default value of
`room_name`
is "Content Violation
Notification". The default value of
`message`
is "Sharing illegal content on
othis server is not permitted and rooms in violation will be blocked."
### Response Parameters
*
`kicked_users`
- An integer number representing the number of users that
were kicked.
*
`failed_to_kick_users`
- An integer number representing the number of users
that were not kicked.
*
`local_aliases`
- An array of strings representing the local aliases that were migrated from
the old room to the new.
*
`new_room_id`
- A string representing the room ID of the new room.
## Example
Request:
```
POST /_synapse/admin/v1/shutdown_room/!somebadroom%3Aexample.com
{
"new_room_user_id": "@someuser:example.com",
"room_name": "Content Violation Notification",
"message": "Bad Room has been shutdown due to content violations on this server. Please review our Terms of Service."
}
```
Response:
```
{
"kicked_users": 5,
"failed_to_kick_users": 0,
"local_aliases": ["#badroom:example.com", "#evilsaloon:example.com],
"new_room_id": "!newroomid:example.com",
},
```
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment