Merge remote-tracking branch 'matrix-org/master' into travis/s2s/transactions-swagger
commit
e226b60c7f
@ -0,0 +1,49 @@
|
|||||||
|
gendoc: &gendoc
|
||||||
|
name: Generate the docs
|
||||||
|
command: |
|
||||||
|
source /env/bin/activate
|
||||||
|
scripts/gendoc.py
|
||||||
|
|
||||||
|
gendoc: &genswagger
|
||||||
|
name: Generate the swagger
|
||||||
|
command: |
|
||||||
|
source /env/bin/activate
|
||||||
|
scripts/dump-swagger.py
|
||||||
|
|
||||||
|
version: 2
|
||||||
|
jobs:
|
||||||
|
build-docs:
|
||||||
|
docker:
|
||||||
|
- image: uhoreg/matrix-doc-build
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: *gendoc
|
||||||
|
- store_artifacts:
|
||||||
|
path: scripts/gen
|
||||||
|
- run:
|
||||||
|
name: "Doc build is available at:"
|
||||||
|
command: DOCS_URL="${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/scripts/gen/index.html"; echo $DOCS_URL
|
||||||
|
|
||||||
|
build-swagger:
|
||||||
|
docker:
|
||||||
|
- image: uhoreg/matrix-doc-build
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run: *genswagger
|
||||||
|
- store_artifacts:
|
||||||
|
path: scripts/swagger/api-docs.json
|
||||||
|
- run:
|
||||||
|
name: "Swagger UI is available at:"
|
||||||
|
command: SWAGGER_URL="${CIRCLE_BUILD_URL}/artifacts/${CIRCLE_NODE_INDEX}/${CIRCLE_WORKING_DIRECTORY/#\~/$HOME}/scripts/swagger/api-docs.json"; echo "https://matrix.org/docs/api/client-server/?url="$SWAGGER_URL
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
|
||||||
|
build-spec:
|
||||||
|
jobs:
|
||||||
|
- build-docs
|
||||||
|
- build-swagger
|
||||||
|
|
||||||
|
notify:
|
||||||
|
webhooks:
|
||||||
|
- url: https://giles.cadair.com/circleci
|
@ -0,0 +1,30 @@
|
|||||||
|
# Copyright 2018 New Vector 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.
|
||||||
|
properties:
|
||||||
|
alias:
|
||||||
|
description: An alias for a matrix room.
|
||||||
|
type: string
|
||||||
|
example: "#freenode_#matrix:matrix.org"
|
||||||
|
protocol:
|
||||||
|
description: The protocol ID that the third party location is a part of.
|
||||||
|
type: string
|
||||||
|
example: irc
|
||||||
|
fields:
|
||||||
|
description: Information used to identify this third party location.
|
||||||
|
type: object
|
||||||
|
example:
|
||||||
|
"network": "freenode"
|
||||||
|
"channel": "#matrix"
|
||||||
|
title: Location
|
||||||
|
type: object
|
@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2018 New Vector 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.
|
||||||
|
type: array
|
||||||
|
description: List of matched third party locations.
|
||||||
|
items:
|
||||||
|
$ref: location.yaml
|
@ -0,0 +1,79 @@
|
|||||||
|
# Copyright 2018 New Vector 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.
|
||||||
|
properties:
|
||||||
|
user_fields:
|
||||||
|
description: Fields used to identify a third party user.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
description: Field used to identify a third party user.
|
||||||
|
example: ["network", "nickname"]
|
||||||
|
location_fields:
|
||||||
|
description: Fields used to identify a third party location.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: string
|
||||||
|
description: Field used to identify a third party location.
|
||||||
|
example: ["network", "channel"]
|
||||||
|
icon:
|
||||||
|
description: An icon representing the third party protocol.
|
||||||
|
type: string
|
||||||
|
example: "mxc://example.org/aBcDeFgH"
|
||||||
|
field_types:
|
||||||
|
title: Field Types
|
||||||
|
description: All location or user fields should have an entry here.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
fieldname:
|
||||||
|
title: Field Type
|
||||||
|
description: Definition of valid values for a field.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
regexp:
|
||||||
|
description: A regular expression for validation of a field's value.
|
||||||
|
type: string
|
||||||
|
placeholder:
|
||||||
|
description: An placeholder serving as a valid example of the field value.
|
||||||
|
type: string
|
||||||
|
example: {
|
||||||
|
"network": {
|
||||||
|
"regexp": "([a-z0-9]+\\.)*[a-z0-9]+",
|
||||||
|
"placeholder": "irc.example.org"
|
||||||
|
},
|
||||||
|
"nickname": {
|
||||||
|
"regexp": "[^\\s#]+",
|
||||||
|
"placeholder": "username"
|
||||||
|
},
|
||||||
|
"channel": {
|
||||||
|
"regexp": "#[^\\s]+",
|
||||||
|
"placeholder": "#foobar"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
instances:
|
||||||
|
description: |-
|
||||||
|
A list of objects representing independent instances of configuration.
|
||||||
|
For instance multiple networks on IRC if multiple are bridged by the
|
||||||
|
same bridge.
|
||||||
|
type: array
|
||||||
|
items:
|
||||||
|
type: object
|
||||||
|
example: {
|
||||||
|
"desc": "Freenode",
|
||||||
|
"icon": "mxc://example.org/JkLmNoPq",
|
||||||
|
"fields": {
|
||||||
|
"network": "freenode.net",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
title: Protocol
|
||||||
|
type: object
|
@ -0,0 +1,66 @@
|
|||||||
|
# Copyright 2018 New Vector 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.
|
||||||
|
type: object
|
||||||
|
description: Dictionary of supported third party protocols.
|
||||||
|
example: {
|
||||||
|
"irc": {
|
||||||
|
"user_fields": ["network", "nickname"],
|
||||||
|
"location_fields": ["network", "channel"],
|
||||||
|
"icon": "mxc://example.org/aBcDeFgH",
|
||||||
|
"field_types": {
|
||||||
|
"network": {
|
||||||
|
"regexp": "([a-z0-9]+\\.)*[a-z0-9]+",
|
||||||
|
"placeholder": "irc.example.org"
|
||||||
|
},
|
||||||
|
"nickname": {
|
||||||
|
"regexp": "[^\\s]+",
|
||||||
|
"placeholder": "username"
|
||||||
|
},
|
||||||
|
"channel": {
|
||||||
|
"regexp": "#[^\\s]+",
|
||||||
|
"placeholder": "#foobar"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"instances": [
|
||||||
|
{
|
||||||
|
"desc": "Freenode",
|
||||||
|
"icon": "mxc://example.org/JkLmNoPq",
|
||||||
|
"fields": {
|
||||||
|
"network": "freenode.net",
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"gitter": {
|
||||||
|
"user_fields": ["username"],
|
||||||
|
"location_fields": ["room"],
|
||||||
|
"field_types": {
|
||||||
|
"username": {
|
||||||
|
"regexp": "@[^\\s]+",
|
||||||
|
"placeholder": "@username"
|
||||||
|
},
|
||||||
|
"room": {
|
||||||
|
"regexp": "[^\\s]+\\/[^\\s]+",
|
||||||
|
"placeholder": "matrix-org/matrix-doc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"instances": [
|
||||||
|
{
|
||||||
|
"desc": "Gitter",
|
||||||
|
"icon": "mxc://example.org/zXyWvUt",
|
||||||
|
"fields": {}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
# Copyright 2018 New Vector 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.
|
||||||
|
|
||||||
|
# TODO: Change userid to user_id as a breaking change
|
||||||
|
properties:
|
||||||
|
userid:
|
||||||
|
description: A Matrix User ID represting a third party user.
|
||||||
|
type: string
|
||||||
|
example: "@_gitter_jim:matrix.org"
|
||||||
|
protocol:
|
||||||
|
description: The protocol ID that the third party location is a part of.
|
||||||
|
type: string
|
||||||
|
example: gitter
|
||||||
|
fields:
|
||||||
|
description: Information used to identify this third party location.
|
||||||
|
type: object
|
||||||
|
example:
|
||||||
|
"user": "jim"
|
||||||
|
title: Location
|
||||||
|
type: object
|
@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2018 New Vector 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.
|
||||||
|
type: array
|
||||||
|
description: List of matched third party users.
|
||||||
|
items:
|
||||||
|
$ref: user.yaml
|
@ -0,0 +1,32 @@
|
|||||||
|
# Copyright 2018 New Vector 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.
|
||||||
|
$ref: error.yaml
|
||||||
|
type: object
|
||||||
|
description: The rate limit was reached for this request
|
||||||
|
properties:
|
||||||
|
errcode:
|
||||||
|
type: string
|
||||||
|
description: The M_LIMIT_EXCEEDED error code
|
||||||
|
example: M_LIMIT_EXCEEDED
|
||||||
|
error:
|
||||||
|
type: string
|
||||||
|
description: A human-readable error message.
|
||||||
|
example: Too many requests
|
||||||
|
retry_after_ms:
|
||||||
|
type: integer
|
||||||
|
description: |-
|
||||||
|
The amount of time in milliseconds the client should wait
|
||||||
|
before trying the request again.
|
||||||
|
example: 2000
|
||||||
|
required: ["errcode"]
|
@ -0,0 +1,194 @@
|
|||||||
|
# Copyright 2018 New Vector 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.
|
||||||
|
swagger: '2.0'
|
||||||
|
info:
|
||||||
|
title: "Matrix Client-Server Third Party Lookup API"
|
||||||
|
version: "1.0.0"
|
||||||
|
host: localhost:8008
|
||||||
|
schemes:
|
||||||
|
- https
|
||||||
|
- http
|
||||||
|
basePath: /_matrix/client/%CLIENT_MAJOR_VERSION%
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
securityDefinitions:
|
||||||
|
$ref: definitions/security.yaml
|
||||||
|
paths:
|
||||||
|
"/thirdparty/protocols":
|
||||||
|
get:
|
||||||
|
summary: Retrieve metadata about all protocols that a homeserver supports.
|
||||||
|
description: |-
|
||||||
|
Fetches the overall metadata about protocols supported by the
|
||||||
|
homeserver. Includes both the available protocols and all fields
|
||||||
|
required for queries against each protocol.
|
||||||
|
operationId: queryMetadata
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: The protocols supported by the homeserver.
|
||||||
|
schema:
|
||||||
|
$ref: ../application-service/definitions/protocol_metadata.yaml
|
||||||
|
"/thirdparty/protocol/{protocol}":
|
||||||
|
get:
|
||||||
|
summary: Retrieve metadata about a specific protocol that the homeserver supports.
|
||||||
|
description: |-
|
||||||
|
Fetches the metadata from the homeserver about a particular third party protocol.
|
||||||
|
operationId: queryMetadata
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: protocol
|
||||||
|
type: string
|
||||||
|
description: |-
|
||||||
|
The name of the protocol.
|
||||||
|
required: true
|
||||||
|
x-example: "irc"
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: The protocol was found and metadata returned.
|
||||||
|
schema:
|
||||||
|
$ref: ../application-service/definitions/protocol.yaml
|
||||||
|
404:
|
||||||
|
description: The protocol is unknown.
|
||||||
|
examples:
|
||||||
|
application/json: {
|
||||||
|
"errcode": "M_NOT_FOUND"
|
||||||
|
}
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
"/thirdparty/location/{protocol}":
|
||||||
|
get:
|
||||||
|
summary: Retreive Matrix-side portals rooms leading to a third party location.
|
||||||
|
description: |-
|
||||||
|
Requesting this endpoint with a valid protocol name results in a list
|
||||||
|
of successful mapping results in a JSON array. Each result contains
|
||||||
|
objects to represent the Matrix room or rooms that represent a portal
|
||||||
|
to this third party network. Each has the Matrix room alias string,
|
||||||
|
an identifier for the particular third party network protocol, and an
|
||||||
|
object containing the network-specific fields that comprise this
|
||||||
|
identifier. It should attempt to canonicalise the identifier as much
|
||||||
|
as reasonably possible given the network type.
|
||||||
|
operationId: queryLocationByProtocol
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: protocol
|
||||||
|
type: string
|
||||||
|
description: The protocol used to communicate to the third party network.
|
||||||
|
required: true
|
||||||
|
x-example: irc
|
||||||
|
- in: query
|
||||||
|
name: searchFields
|
||||||
|
type: string
|
||||||
|
description: |-
|
||||||
|
One or more custom fields to help identify the third party
|
||||||
|
location.
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: At least one portal room was found.
|
||||||
|
schema:
|
||||||
|
$ref: ../application-service/definitions/location_batch.yaml
|
||||||
|
404:
|
||||||
|
description: No portal rooms were found.
|
||||||
|
examples:
|
||||||
|
application/json: {
|
||||||
|
"errcode": "M_NOT_FOUND"
|
||||||
|
}
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
"/thirdparty/user/{protocol}":
|
||||||
|
get:
|
||||||
|
summary: Retrieve the Matrix User ID of a corresponding third party user.
|
||||||
|
description: |-
|
||||||
|
Retrieve a Matrix User ID linked to a user on the third party service, given
|
||||||
|
a set of user parameters.
|
||||||
|
operationId: queryUserByProtocol
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: protocol
|
||||||
|
type: string
|
||||||
|
description: |-
|
||||||
|
The name of the protocol.
|
||||||
|
required: true
|
||||||
|
x-example: irc
|
||||||
|
- in: query
|
||||||
|
name: field1, field2...
|
||||||
|
type: string
|
||||||
|
description: |-
|
||||||
|
One or more custom fields that are passed to the AS to help identify the user.
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: The Matrix User IDs found with the given parameters.
|
||||||
|
schema:
|
||||||
|
$ref: ../application-service/definitions/user_batch.yaml
|
||||||
|
404:
|
||||||
|
description: The Matrix User ID was not found
|
||||||
|
examples:
|
||||||
|
application/json: {
|
||||||
|
"errcode": "M_NOT_FOUND"
|
||||||
|
}
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
"/thirdparty/location":
|
||||||
|
get:
|
||||||
|
summary: Reverse-lookup third party locations given a Matrix room alias.
|
||||||
|
description: |-
|
||||||
|
Retreive an array of third party network locations from a Matrix room
|
||||||
|
alias.
|
||||||
|
operationId: queryLocationByAlias
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: alias
|
||||||
|
type: string
|
||||||
|
description: The Matrix room alias to look up.
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: |-
|
||||||
|
All found third party locations.
|
||||||
|
schema:
|
||||||
|
$ref: ../application-service/definitions/location_batch.yaml
|
||||||
|
404:
|
||||||
|
description: The Matrix room alias was not found
|
||||||
|
examples:
|
||||||
|
application/json: {
|
||||||
|
"errcode": "M_NOT_FOUND"
|
||||||
|
}
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
||||||
|
"/thirdparty/user":
|
||||||
|
get:
|
||||||
|
summary: Reverse-lookup third party users given a Matrix User ID.
|
||||||
|
description: |-
|
||||||
|
Retreive an array of third party users from a Matrix User ID.
|
||||||
|
operationId: queryUserByID
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: userid
|
||||||
|
type: string
|
||||||
|
description: The Matrix User ID to look up.
|
||||||
|
required: true
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: |-
|
||||||
|
An array of third party users.
|
||||||
|
schema:
|
||||||
|
$ref: ../application-service/definitions/user_batch.yaml
|
||||||
|
404:
|
||||||
|
description: The Matrix User ID was not found
|
||||||
|
examples:
|
||||||
|
application/json: {
|
||||||
|
"errcode": "M_NOT_FOUND"
|
||||||
|
}
|
||||||
|
schema:
|
||||||
|
$ref: definitions/errors/error.yaml
|
@ -0,0 +1,44 @@
|
|||||||
|
# Copyright 2018 New Vector 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.
|
||||||
|
|
||||||
|
swagger: '2.0'
|
||||||
|
info:
|
||||||
|
title: "Matrix Federation Query API"
|
||||||
|
version: "1.0.0"
|
||||||
|
host: localhost:8448
|
||||||
|
schemes:
|
||||||
|
- https
|
||||||
|
basePath: /_matrix/federation/v1
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
paths:
|
||||||
|
"/query/{queryType}":
|
||||||
|
get:
|
||||||
|
summary: Query for information
|
||||||
|
description: |-
|
||||||
|
Performs a single query request on the receiving homeserver. The query string
|
||||||
|
arguments are dependent on which type of query is being made. Known query types
|
||||||
|
are specified as their own endpoints as an extension to this definition.
|
||||||
|
operationId: queryInfo
|
||||||
|
parameters:
|
||||||
|
- in: path
|
||||||
|
name: queryType
|
||||||
|
type: string
|
||||||
|
description: The type of query to make
|
||||||
|
required: true
|
||||||
|
x-example: profile
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: |-
|
||||||
|
The query response. The schema varies depending on the query being made.
|
@ -0,0 +1,55 @@
|
|||||||
|
<!-- Note: This is a markdown file so the build script's RST processing doesn't grab it -->
|
||||||
|
|
||||||
|
# Changelogs
|
||||||
|
|
||||||
|
[Towncrier](https://github.com/hawkowl/towncrier) is used to manage the changelog and
|
||||||
|
keep it up to date. Because of this, updating a changelog is really easy.
|
||||||
|
|
||||||
|
## How to update a changelog when releasing an API
|
||||||
|
|
||||||
|
1. Ensure you're in your Python 3 virtual environment
|
||||||
|
2. `cd` your way to the API you're releasing (eg: `cd changelogs/client_server`)
|
||||||
|
3. Run `towncrier --version "r0.4.0" --name "client-server" --yes` substituting the
|
||||||
|
variables as approprite. Note that `--name` is required although the value is ignored.
|
||||||
|
4. Commit the changes and finish the release process.
|
||||||
|
|
||||||
|
## How to prepare a changelog for a new API
|
||||||
|
|
||||||
|
For this example, we're going to pretend that the `server_server` API doesn't exist.
|
||||||
|
|
||||||
|
1. Create the file `changelogs/server_server.rst`
|
||||||
|
2. Create the folder `changelogs/server_server`
|
||||||
|
3. In the new folder, create a `pyproject.toml` file with these contents:
|
||||||
|
```toml
|
||||||
|
[tool.towncrier]
|
||||||
|
filename = "../server_server.rst"
|
||||||
|
directory = "newsfragments"
|
||||||
|
issue_format = "`#{issue} <https://github.com/matrix-org/matrix-doc/issues/{issue}>`_"
|
||||||
|
title_format = "{version}"
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "breaking"
|
||||||
|
name = "Breaking Changes"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "deprecation"
|
||||||
|
name = "Deprecations"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "new"
|
||||||
|
name = "New Endpoints"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "feature"
|
||||||
|
name = "Backwards Compatible Changes"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "clarification"
|
||||||
|
name = "Spec Clarifications"
|
||||||
|
showcontent = true
|
||||||
|
```
|
||||||
|
4. Create a `.gitignore` in `changelogs/server_server/newsfragments` with the contents `!.gitignore`
|
@ -0,0 +1 @@
|
|||||||
|
!.gitignore
|
@ -0,0 +1 @@
|
|||||||
|
``POST /user_directory/search``
|
@ -0,0 +1 @@
|
|||||||
|
Mark ``home_server`` return field for ``/login`` and ``/register`` endpoints as deprecated
|
@ -0,0 +1 @@
|
|||||||
|
Add ``token`` parameter to the ``/keys/query`` endpoint
|
@ -0,0 +1 @@
|
|||||||
|
Fix response format of ``/keys/changes`` endpoint
|
@ -0,0 +1 @@
|
|||||||
|
Clarify default values for some fields on the ``/search`` API
|
@ -0,0 +1 @@
|
|||||||
|
``GET /rooms/{roomId}/event/{eventId}``
|
@ -0,0 +1 @@
|
|||||||
|
Fix the representation of ``m.presence`` events
|
@ -0,0 +1 @@
|
|||||||
|
Clarify that ``m.tag`` ordering is done with numbers, not strings
|
@ -0,0 +1 @@
|
|||||||
|
Add the room visibility options for the room directory
|
@ -0,0 +1 @@
|
|||||||
|
Add spec for ignoring users
|
@ -0,0 +1 @@
|
|||||||
|
Add the ``/register/available`` endpoint for username availability
|
@ -0,0 +1 @@
|
|||||||
|
Clarify that ``/account/whoami`` should consider application services
|
@ -0,0 +1,3 @@
|
|||||||
|
Update ``ImageInfo`` and ``ThumbnailInfo`` dimension schema descriptions
|
||||||
|
to clarify that they relate to intended display size, as opposed to the
|
||||||
|
intrinsic size of the image file.
|
@ -0,0 +1 @@
|
|||||||
|
Add sticker messages
|
@ -0,0 +1 @@
|
|||||||
|
``POST /delete_devices``
|
@ -0,0 +1 @@
|
|||||||
|
Mark ``GET /rooms/{roomId}/members`` as requiring authentication
|
@ -0,0 +1 @@
|
|||||||
|
Document ``/logout/all`` endpoint
|
@ -0,0 +1 @@
|
|||||||
|
Add report content API
|
@ -0,0 +1 @@
|
|||||||
|
Add ``allow_remote`` to the content repo to avoid routing loops
|
@ -0,0 +1 @@
|
|||||||
|
Document `highlights` field in /search response
|
@ -0,0 +1 @@
|
|||||||
|
Describe ``StateEvent`` for ``/createRoom``
|
@ -0,0 +1 @@
|
|||||||
|
``GET /thirdparty/*`` Endpoints
|
@ -0,0 +1 @@
|
|||||||
|
Document the GET version of ``/login``
|
@ -0,0 +1 @@
|
|||||||
|
Describe how the ``reason`` is handled for kicks/bans
|
@ -0,0 +1 @@
|
|||||||
|
Document the ``server_name`` parameter on ``/join/{roomIdOrAlias}``
|
@ -0,0 +1 @@
|
|||||||
|
Document the CORS/preflight headers
|
@ -0,0 +1 @@
|
|||||||
|
Mark ``GET /presence/{userId}/status`` as requiring authentication
|
@ -0,0 +1 @@
|
|||||||
|
Describe the rate limit error response schema
|
@ -0,0 +1 @@
|
|||||||
|
Clarify that clients must leave rooms before forgetting them
|
@ -0,0 +1 @@
|
|||||||
|
Document guest access in ``/createRoom`` presets
|
@ -0,0 +1 @@
|
|||||||
|
Define what a ``RoomEvent`` is on ``/rooms/{roomId}/messages``
|
@ -0,0 +1 @@
|
|||||||
|
Clarify the request and result types on ``/search``
|
@ -0,0 +1 @@
|
|||||||
|
Clarify some of the properties on the search result
|
@ -0,0 +1,30 @@
|
|||||||
|
[tool.towncrier]
|
||||||
|
filename = "../client_server.rst"
|
||||||
|
directory = "newsfragments"
|
||||||
|
issue_format = "`#{issue} <https://github.com/matrix-org/matrix-doc/issues/{issue}>`_"
|
||||||
|
title_format = "{version}"
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "breaking"
|
||||||
|
name = "Breaking Changes"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "deprecation"
|
||||||
|
name = "Deprecations"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "new"
|
||||||
|
name = "New Endpoints"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "feature"
|
||||||
|
name = "Backwards Compatible Changes"
|
||||||
|
showcontent = true
|
||||||
|
|
||||||
|
[[tool.towncrier.type]]
|
||||||
|
directory = "clarification"
|
||||||
|
name = "Spec Clarifications"
|
||||||
|
showcontent = true
|
@ -0,0 +1,20 @@
|
|||||||
|
Third Party Networks
|
||||||
|
====================
|
||||||
|
|
||||||
|
.. _module:third-party-networks:
|
||||||
|
|
||||||
|
Application services can provide access to third party networks via bridging.
|
||||||
|
This allows Matrix users to communicate with users on other communication
|
||||||
|
platforms, with messages ferried back and forth by the application service. A
|
||||||
|
single application service may bridge multiple third party networks, and many
|
||||||
|
individual locations within those networks. A single third party network
|
||||||
|
location may be bridged to multiple Matrix rooms.
|
||||||
|
|
||||||
|
Third Party Lookups
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
A client may wish to provide a rich interface for joining third party
|
||||||
|
locations and connecting with third party users. Information necessary for
|
||||||
|
such an interface is provided by third party lookups.
|
||||||
|
|
||||||
|
{{third_party_lookup_cs_http_api}}
|
Loading…
Reference in New Issue