Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GET media/config #1189

Merged
merged 18 commits into from
Jul 6, 2018
Merged
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions api/client-server/content-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -269,3 +269,42 @@ paths:
"$ref": "definitions/error.yaml"
tags:
- Media
"/config":
get:
summary: Get the configuration for the content repository.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh dear, yes. good catch.

Clients SHOULD use this as a guide when using content endpoints.
All values are intentionally left optional. Clients SHOULD follow
the advice given in the field description when the field is not available.

**NOTE:** Both clients and server administrators should be aware that proxies
between the client and the server may affect the apparent behaviour of content
repository APIs, for example, proxies may enforce a lower upload size limit
than is advertised by the server on this endpoint. Clients should handle such
situations gracefully.
operationId: getConfig
produces: ["application/json"]
security:
- accessToken: []
responses:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a 429 should be added to indicate rate limiting:

         429:
           description: This request was rate-limited.
           schema:
             "$ref": "definitions/error.yaml"

200:
description: The public content repository configuration for the matrix server.
schema:
type: object
properties:
m.upload.size:
type: number
description: |-
The maximum size an upload can be in bytes.
Clients SHOULD use this as a guide when uploading content.
If not listed or null, the size limit should be treated as unknown.
examples:
application/json: {
"m.upload.size": 50000000
}
429:
description: This request was rate-limited.
schema:
"$ref": "definitions/error.yaml"

tags:
- Media