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.
116 lines
4.2 KiB
YAML
116 lines
4.2 KiB
YAML
9 years ago
|
# Copyright 2016 OpenMarket Ltd
|
||
|
#
|
||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
# you may not use this file except in compliance with the License.
|
||
|
# You may obtain a copy of the License at
|
||
|
#
|
||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||
|
#
|
||
|
# Unless required by applicable law or agreed to in writing, software
|
||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
# See the License for the specific language governing permissions and
|
||
|
# limitations under the License.
|
||
9 years ago
|
swagger: '2.0'
|
||
|
info:
|
||
|
title: "Matrix Client-Server Administration API"
|
||
|
version: "1.0.0"
|
||
|
host: localhost:8008
|
||
|
schemes:
|
||
|
- https
|
||
|
- http
|
||
|
basePath: /_matrix/client/%CLIENT_MAJOR_VERSION%
|
||
|
consumes:
|
||
|
- application/json
|
||
|
produces:
|
||
|
- application/json
|
||
|
securityDefinitions:
|
||
9 years ago
|
$ref: definitions/security.yaml
|
||
9 years ago
|
paths:
|
||
|
"/admin/whois/{userId}":
|
||
|
get:
|
||
|
summary: Gets information about a particular user.
|
||
|
description: |-
|
||
|
Gets information about a particular user.
|
||
|
|
||
|
This API may be restricted to only be called by the user being looked
|
||
|
up, or by a server admin. Server-local administrator privileges are not
|
||
|
specified in this document.
|
||
7 years ago
|
operationId: getWhoIs
|
||
9 years ago
|
security:
|
||
|
- accessToken: []
|
||
|
parameters:
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: userId
|
||
|
description: The user to look up.
|
||
|
required: true
|
||
|
x-example: "@peter:rabbit.rocks"
|
||
|
responses:
|
||
|
200:
|
||
|
description: The lookup was successful.
|
||
|
examples:
|
||
7 years ago
|
application/json: {
|
||
9 years ago
|
"user_id": "@peter:rabbit.rocks",
|
||
|
"devices": {
|
||
|
"teapot": {
|
||
|
"sessions": [
|
||
|
{
|
||
|
"connections": [
|
||
|
{
|
||
|
"ip": "127.0.0.1",
|
||
|
"last_seen": 1411996332123,
|
||
|
"user_agent": "curl/7.31.0-DEV"
|
||
|
},
|
||
|
{
|
||
|
"ip": "10.0.0.2",
|
||
|
"last_seen": 1411996332123,
|
||
|
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
schema:
|
||
|
type: object
|
||
|
properties:
|
||
|
user_id:
|
||
|
type: string
|
||
|
description: The Matrix user ID of the user.
|
||
|
devices:
|
||
|
type: object
|
||
|
description: |-
|
||
5 years ago
|
Each key is an identifier for one of the user's devices.
|
||
9 years ago
|
additionalProperties:
|
||
|
type: object
|
||
|
title: DeviceInfo
|
||
|
properties:
|
||
|
sessions:
|
||
|
type: array
|
||
|
description: A user's sessions (i.e. what they did with an access token from one login).
|
||
|
items:
|
||
|
type: object
|
||
|
title: SessionInfo
|
||
|
properties:
|
||
|
connections:
|
||
|
type: array
|
||
|
description: Information particular connections in the session.
|
||
|
items:
|
||
|
type: object
|
||
|
title: ConnectionInfo
|
||
|
properties:
|
||
|
ip:
|
||
|
type: string
|
||
|
description: Most recently seen IP address of the session.
|
||
|
last_seen:
|
||
6 years ago
|
type: integer
|
||
|
format: int64
|
||
9 years ago
|
description: Unix timestamp that the session was last active.
|
||
|
user_agent:
|
||
|
type: string
|
||
|
description: User agent string last seen in the session.
|
||
9 years ago
|
tags:
|
||
|
- Server administration
|