You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
78 lines
2.3 KiB
YAML
78 lines
2.3 KiB
YAML
9 years ago
|
swagger: '2.0'
|
||
|
info:
|
||
|
title: "Matrix Client-Server Room Kicking API"
|
||
|
version: "1.0.0"
|
||
|
host: localhost:8008
|
||
|
schemes:
|
||
|
- https
|
||
|
- http
|
||
|
basePath: /_matrix/client/%CLIENT_MAJOR_VERSION%
|
||
|
consumes:
|
||
|
- application/json
|
||
|
produces:
|
||
|
- application/json
|
||
|
securityDefinitions:
|
||
|
accessToken:
|
||
|
type: apiKey
|
||
|
description: The user_id or application service access_token
|
||
|
name: access_token
|
||
|
in: query
|
||
|
paths:
|
||
|
"/rooms/{roomId}/kick":
|
||
|
post:
|
||
|
summary: Kick a user from the room.
|
||
|
description: |-
|
||
|
Kick a user from the room.
|
||
|
|
||
|
The caller must have the required power level in order to perform this operation.
|
||
|
security:
|
||
|
- accessToken: []
|
||
|
parameters:
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: roomId
|
||
|
description: The room identifier (not alias) from which the user should be kicked.
|
||
|
required: true
|
||
|
x-example: "!e42d8c:matrix.org"
|
||
|
- in: body
|
||
|
name: body
|
||
|
required: true
|
||
|
schema:
|
||
|
type: object
|
||
|
example: |-
|
||
|
{
|
||
|
"reason": "Telling unfunny jokes",
|
||
|
"user_id": "@cheeky_monkey:matrix.org"
|
||
|
}
|
||
|
properties:
|
||
|
user_id:
|
||
|
type: string
|
||
|
description: The fully qualified user ID of the user being kicked.
|
||
|
reason:
|
||
|
type: string
|
||
|
description: The reason the user has been kicked.
|
||
|
required: ["user_id"]
|
||
|
responses:
|
||
|
200:
|
||
|
description: The user has been kicked from the room.
|
||
|
examples:
|
||
|
application/json: |-
|
||
|
{}
|
||
|
schema:
|
||
|
type: object
|
||
|
403:
|
||
|
description: |-
|
||
|
You do not have permission to kick the user from the room. A meaningful ``errcode`` and description error text will be returned. Example reasons for rejections are:
|
||
|
|
||
|
- The kicker is not currently in the room.
|
||
|
- The kickee is not currently in the room.
|
||
|
- The kicker's power level is insufficient to kick users from the room.
|
||
|
examples:
|
||
|
application/json: |-
|
||
|
{
|
||
|
"errcode": "M_FORBIDDEN",
|
||
|
"error": "You do not have a high enough power level to kick from this room."
|
||
|
}
|
||
|
tags:
|
||
|
- Room membership
|