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.
148 lines
3.9 KiB
YAML
148 lines
3.9 KiB
YAML
9 years ago
|
swagger: '2.0'
|
||
|
info:
|
||
|
title: "Matrix Client-Server tag 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:
|
||
|
"/user/{userId}/rooms/{roomId}/tags":
|
||
|
get:
|
||
|
summary: List the tags for a room.
|
||
|
description: |-
|
||
|
List the tags set by a user on a room.
|
||
|
security:
|
||
|
- accessToken: []
|
||
|
parameters:
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: userId
|
||
|
required: true
|
||
|
description: |-
|
||
|
The id of the user to get tags for. The access token must be
|
||
|
authorized to make requests for this user id.
|
||
|
x-example: "@alice:example.com"
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: roomId
|
||
|
required: true
|
||
|
description: |-
|
||
|
The id of the room to get tags for.
|
||
|
x-example: "!726s6s6q:example.com"
|
||
|
responses:
|
||
|
200:
|
||
|
description:
|
||
|
The list of tags for the user for the room.
|
||
|
schema:
|
||
|
type: object
|
||
|
properties:
|
||
|
tags:
|
||
9 years ago
|
title: Tags
|
||
|
type: object
|
||
9 years ago
|
examples:
|
||
|
application/json: |-
|
||
|
{
|
||
9 years ago
|
"tags": {
|
||
9 years ago
|
"work": {"order": "1"},
|
||
9 years ago
|
"pinned": {}
|
||
|
}
|
||
9 years ago
|
}
|
||
|
"/user/{userId}/rooms/{roomId}/tags/{tag}":
|
||
|
put:
|
||
|
summary: Add a tag to a room.
|
||
|
description: |-
|
||
|
Add a tag to the room.
|
||
|
security:
|
||
|
- accessToken: []
|
||
|
parameters:
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: userId
|
||
|
required: true
|
||
|
description: |-
|
||
|
The id of the user to add a tag for. The access token must be
|
||
|
authorized to make requests for this user id.
|
||
|
x-example: "@alice:example.com"
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: roomId
|
||
|
required: true
|
||
|
description: |-
|
||
|
The id of the room to add a tag to.
|
||
|
x-example: "!726s6s6q:example.com"
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: tag
|
||
|
required: true
|
||
|
description: |-
|
||
|
The tag to add.
|
||
|
x-example: "work"
|
||
|
- in: body
|
||
|
name: body
|
||
|
required: true
|
||
|
description: |-
|
||
9 years ago
|
Extra data for the tag, e.g. ordering.
|
||
9 years ago
|
schema:
|
||
|
type: object
|
||
|
example: |-
|
||
9 years ago
|
{"order": "1"}
|
||
9 years ago
|
responses:
|
||
|
200:
|
||
|
description:
|
||
|
The tag was successfully added.
|
||
|
schema:
|
||
|
type: object
|
||
|
examples:
|
||
|
application/json: |-
|
||
|
{}
|
||
|
delete:
|
||
|
summary: Remove a tag from the room.
|
||
|
description: |-
|
||
|
Remove a tag from the room.
|
||
|
security:
|
||
|
- access_token: []
|
||
|
parameters:
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: userId
|
||
|
required: true
|
||
|
description: |-
|
||
|
The id of the user to remove a tag for. The access token must be
|
||
|
authorized to make requests for this user id.
|
||
|
x-example: "@alice:example.com"
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: roomId
|
||
|
required: true
|
||
|
description: |-
|
||
|
The id of the room to remove a tag from.
|
||
|
x-example: "!726s6s6q:example.com"
|
||
|
- in: path
|
||
|
type: string
|
||
|
name: tag
|
||
|
required: true
|
||
|
description: |-
|
||
|
The tag to remove.
|
||
|
x-example: "work"
|
||
|
responses:
|
||
|
200:
|
||
|
description:
|
||
|
The tag was successfully removed
|
||
|
schema:
|
||
|
type: object
|
||
|
examples:
|
||
|
application/json: |-
|
||
|
{}
|