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.
75 lines
2.5 KiB
YAML
75 lines
2.5 KiB
YAML
# 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 Event Authorization API"
|
|
version: "1.0.0"
|
|
host: localhost:8448
|
|
schemes:
|
|
- https
|
|
basePath: /_matrix/federation/v1
|
|
consumes:
|
|
- application/json
|
|
produces:
|
|
- application/json
|
|
securityDefinitions:
|
|
$ref: definitions/security.yaml
|
|
paths:
|
|
"/event_auth/{roomId}/{eventId}":
|
|
get:
|
|
summary: Get the auth chain for a given event
|
|
description: |-
|
|
Retrieves the complete auth chain for a given event.
|
|
operationId: getEventAuth
|
|
security:
|
|
- signedRequest: []
|
|
parameters:
|
|
- in: path
|
|
name: roomId
|
|
type: string
|
|
description: The room ID to get the auth chain for.
|
|
required: true
|
|
x-example: "!abc123:matrix.org"
|
|
- in: path
|
|
name: eventId
|
|
type: string
|
|
description: The event ID to get the auth chain of.
|
|
required: true
|
|
x-example: "$helloworld:example.org"
|
|
responses:
|
|
200:
|
|
description: The auth chain for the event.
|
|
schema:
|
|
type: object
|
|
properties:
|
|
auth_chain:
|
|
type: array
|
|
description: |-
|
|
The full set of authorization events that make up the state of
|
|
the room, and their authorization events, recursively. Note that
|
|
events have a different format depending on the room version -
|
|
check the `room version specification`_ for precise event formats.
|
|
items:
|
|
type: object
|
|
title: PDU
|
|
description: |-
|
|
The `PDUs <#pdus>`_ contained in the auth chain. The event format
|
|
varies depending on the room version - check the `room version specification`_
|
|
for precise event formats.
|
|
properties: []
|
|
example:
|
|
$ref: "examples/minimal_pdu.json"
|
|
required: ['auth_chain']
|