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.
106 lines
3.3 KiB
YAML
106 lines
3.3 KiB
YAML
9 years ago
|
swagger: '2.0'
|
||
|
info:
|
||
|
title: "Matrix Client-Server Client Config API"
|
||
|
version: "1.0.0"
|
||
|
host: localhost:8008
|
||
|
schemes:
|
||
|
- https
|
||
|
- http
|
||
|
basePath: /_matrix/client/v2_alpha
|
||
|
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:
|
||
9 years ago
|
"/user/{userId}/account_data/{type}":
|
||
9 years ago
|
put:
|
||
9 years ago
|
summary: Set some account_data for the user.
|
||
9 years ago
|
description: |-
|
||
9 years ago
|
Set some account_data for the client. This config is only visible to the user
|
||
|
that set the account_data. The config will be synced to clients in the
|
||
9 years ago
|
top-level ``account_data``.
|
||
9 years ago
|
security:
|
||
|
- accessToken: []
|
||
|
parameters:
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: userId
|
||
|
required: true
|
||
|
description: |-
|
||
9 years ago
|
The id of the user to set account_data for. The access token must be
|
||
9 years ago
|
authorized to make requests for this user id.
|
||
|
x-example: "@alice:example.com"
|
||
|
- in: path
|
||
|
type: string
|
||
9 years ago
|
name: type
|
||
9 years ago
|
required: true
|
||
|
description: |-
|
||
9 years ago
|
The event type of the account_data to set. Custom types should be
|
||
|
namespaced to avoid clashes.
|
||
9 years ago
|
x-example: "org.example.custom.config"
|
||
|
- in: body
|
||
|
name: content
|
||
|
required: true
|
||
|
description: |-
|
||
9 years ago
|
The content of the account_data
|
||
9 years ago
|
schema:
|
||
|
type: object
|
||
|
example: |-
|
||
9 years ago
|
{"custom_account_data_key": "custom_config_value"}
|
||
9 years ago
|
responses:
|
||
|
200:
|
||
|
description:
|
||
9 years ago
|
The account_data was successfully added.
|
||
|
"/user/{userId}/rooms/{roomId}/account_data/{type}":
|
||
9 years ago
|
put:
|
||
9 years ago
|
summary: Set some account_data for the user.
|
||
9 years ago
|
description: |-
|
||
9 years ago
|
Set some account_data for the client on a given room. This config is only
|
||
|
visible to the user that set the account_data. The config will be synced to
|
||
9 years ago
|
clients in the per-room ``account_data``.
|
||
9 years ago
|
security:
|
||
|
- accessToken: []
|
||
|
parameters:
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: userId
|
||
|
required: true
|
||
|
description: |-
|
||
9 years ago
|
The id of the user to set account_data for. The access token must be
|
||
9 years ago
|
authorized to make requests for this user id.
|
||
|
x-example: "@alice:example.com"
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: roomId
|
||
|
required: true
|
||
|
description: |-
|
||
9 years ago
|
The id of the room to set account_data on.
|
||
9 years ago
|
x-example: "!726s6s6q:example.com"
|
||
|
- in: path
|
||
|
type: string
|
||
9 years ago
|
name: type
|
||
9 years ago
|
required: true
|
||
|
description: |-
|
||
9 years ago
|
The event type of the account_data to set. Custom types should be
|
||
9 years ago
|
namespaced to avoid clashes.
|
||
9 years ago
|
x-example: "org.example.custom.room.config"
|
||
|
- in: body
|
||
|
name: content
|
||
|
required: true
|
||
|
description: |-
|
||
9 years ago
|
The content of the account_data
|
||
9 years ago
|
schema:
|
||
|
type: object
|
||
|
example: |-
|
||
9 years ago
|
{"custom_account_data_key": "custom_account_data_value"}
|
||
9 years ago
|
responses:
|
||
|
200:
|
||
|
description:
|
||
9 years ago
|
The account_data was successfully added.
|