matrix-org / matrix-org/matrix-spec

How should an appservice opt-out of providing an endpoint?

Open
#1,859 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
330
Forks
150
Avg merge
2h 21m
Merged PRs (30d)
3

Description

It's often the case that an appservice does not provide all of the functionality that is in https://spec.matrix.org/v1.10/application-service-api/#querying. For example, very few appservices actually implement the `/_matrix/app/v1/users/{userId}` endpoint. If you're just interested in consuming events, you really don't need the others.

However, there isn't a spec-defined way to opt-out of providing these endpoints. Most developers opt to just let them 404 or 5XX or something to that effect, and hope the homeserver gracefully handles the error. I think we should do better here, and find a way to describe the endpoint as unimplemented.

Given that 404 is already taken as a valid response from some of these endpoints, one idea is just to respond with 501 (Not Implemented) for any valid endpoint that the appservice does not support. This would cause the homeserver to exempt that appservice for the duration the homeserver is up.

Anyway, if this is a reasonable sounding idea this should probably become a spec.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Matrix Application Service API section on querying, especially the /_matrix/app/v1/users/{userId} endpoint, and compare its defined 404 behavior with the proposed 501 response. Done would require an agreed spec-defined opt-out mechanism and corresponding specification text; the issue names no repository files or tests.

Written by the indexing model from the issue text.

Assessment

Domain
api, documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.