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.5 KiB
YAML
78 lines
2.5 KiB
YAML
6 years ago
|
# Copyright 2016 OpenMarket Ltd
|
||
|
# 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 Application Service API"
|
||
|
version: "1.0.0"
|
||
|
host: localhost:8008
|
||
|
schemes:
|
||
|
- https
|
||
|
- http
|
||
6 years ago
|
basePath: /_matrix/app/v1
|
||
6 years ago
|
produces:
|
||
|
- application/json
|
||
6 years ago
|
securityDefinitions:
|
||
|
$ref: definitions/security.yaml
|
||
6 years ago
|
paths:
|
||
|
"/transactions/{txnId}":
|
||
|
put:
|
||
|
summary: Send some events to the application service.
|
||
|
description: |-
|
||
|
This API is called by the homeserver when it wants to push an event
|
||
|
(or batch of events) to the application service.
|
||
|
|
||
|
Note that the application service should distinguish state events
|
||
|
from message events via the presence of a ``state_key``, rather than
|
||
|
via the event type.
|
||
|
operationId: sendTransaction
|
||
6 years ago
|
security:
|
||
|
- homeserverAccessToken: []
|
||
6 years ago
|
parameters:
|
||
|
- in: path
|
||
|
name: txnId
|
||
|
type: string
|
||
|
description: |-
|
||
|
The transaction ID for this set of events. Homeservers generate
|
||
|
these IDs and they are used to ensure idempotency of requests.
|
||
|
required: true
|
||
|
x-example: "35"
|
||
|
- in: body
|
||
|
name: body
|
||
4 years ago
|
description: Transaction information
|
||
6 years ago
|
schema:
|
||
|
type: object
|
||
|
example: {
|
||
|
"events": [
|
||
3 years ago
|
{"$ref": "../../event-schemas/examples/m.room.member.yaml"},
|
||
|
{"$ref": "../../event-schemas/examples/m.room.message$m.text.yaml"}
|
||
6 years ago
|
]
|
||
|
}
|
||
|
properties:
|
||
|
events:
|
||
|
type: array
|
||
6 years ago
|
description: |-
|
||
|
A list of events, formatted as per the Client-Server API.
|
||
6 years ago
|
items:
|
||
|
type: object
|
||
|
title: Event
|
||
|
required: ["events"]
|
||
|
responses:
|
||
|
200:
|
||
|
description: The transaction was processed successfully.
|
||
|
examples:
|
||
6 years ago
|
application/json: {}
|
||
6 years ago
|
schema:
|
||
6 years ago
|
type: object
|