Skip to content

Instantly share code, notes, and snippets.

@qalqi
Created June 12, 2020 16:04
Show Gist options
  • Save qalqi/dd70ef3e9f250b948a5beef39fc758e2 to your computer and use it in GitHub Desktop.
Save qalqi/dd70ef3e9f250b948a5beef39fc758e2 to your computer and use it in GitHub Desktop.
type Query {
"""
Gets a list of the third party identifiers that the homeserver has
associated with the user's account.
This is *not* the same as the list of third party identifiers bound to
the user's Matrix ID in identity servers.
Identifiers in this list may be used by the homeserver as, for example,
identifiers that it will accept to reset the user's account password.
"""
getAccount3PIDs: getAccount3PIDs_response!
"""
Gets information about the owner of a given access token.
Note that, as with the rest of the Client-Server API,
Application Services may masquerade as users within their
namespace by giving a ``user_id`` query parameter. In this
situation, the server should verify that the given ``user_id``
is registered by the appservice, and return it in the response
body.
"""
getTokenOwner: getTokenOwner_response!
"""
Gets information about the server's supported feature set
and other relevant capabilities.
"""
getCapabilities: getCapabilities_response!
"""Gets information about all devices for the current user."""
getDevices: getDevices_response!
"""Gets information on a single device, by device id."""
getDevice(deviceId: String!): JSON!
"""
Requests that the server resolve a room alias to a room ID.
The server will use the federation API to resolve the alias if the
domain part of the alias does not correspond to the server's own
domain.
"""
getRoomIdByAlias(roomAlias: String!): getRoomIdByAlias_response!
"""This API returns a list of the user's current rooms."""
getJoinedRooms: getJoinedRooms_response!
"""
Gets a list of users who have updated their device identity keys since a
previous sync token.
The server should include in the results any users who:
* currently share a room with the calling user (ie, both users have
membership state ``join``); *and*
* added new device identity keys or removed an existing device with
identity keys, between ``from`` and ``to``.
"""
getKeysChanges(from: String!, to: String!): getKeysChanges_response!
"""
Gets the homeserver's supported login types to authenticate users. Clients
should pick one of these and supply it as the ``type`` when logging in.
"""
getLoginFlows: getLoginFlows_response!
"""
This API is used to paginate through the list of events that the
user has been, or would have been notified about.
"""
getNotifications(from: String, limit: Int, only: String): getNotifications_response!
"""Get the given user's presence state."""
getPresence(userId: String!): getPresence_response!
"""
Get the combined profile information for this user. This API may be used
to fetch the user's own profile information or other users; either
locally or on remote homeservers. This API may return keys which are not
limited to ``displayname`` or ``avatar_url``.
"""
getUserProfile(userId: String!): getUserProfile_response!
"""
Get the user's avatar URL. This API may be used to fetch the user's
own avatar URL or to query the URL of other users; either locally or
on remote homeservers.
"""
getAvatarUrl(userId: String!): getAvatarUrl_response!
"""
Get the user's display name. This API may be used to fetch the user's
own displayname or to query the name of other users; either locally or
on remote homeservers.
"""
getDisplayName(userId: String!): getDisplayName_response!
"""
Lists the public rooms on the server.
This API returns paginated responses. The rooms are ordered by the number
of joined members, with the largest rooms first.
"""
getPublicRooms(limit: Int, since: String, server: String): getPublicRooms_response!
"""Gets all currently active pushers for the authenticated user."""
getPushers: getPushers_response!
"""
Retrieve all push rulesets for this user. Clients can "drill-down" on
the rulesets by suffixing a ``scope`` to this path e.g.
``/pushrules/global/``. This will return a subset of this data under the
specified key e.g. the ``global`` key.
"""
getPushRules: getPushRules_response!
"""Retrieve a single specified push rule."""
getPushRule(scope: String!, kind: String!, ruleId: String!): JSON!
"""This endpoint get the actions for the specified push rule."""
getPushRuleActions(scope: String!, kind: String!, ruleId: String!): getPushRuleActions_response!
"""This endpoint gets whether the specified push rule is enabled."""
isPushRuleEnabled(scope: String!, kind: String!, ruleId: String!): isPushRuleEnabled_response!
"""
Checks to see if a username is available, and valid, for the server.
The server should check to ensure that, at the time of the request, the
username requested is available for use. This includes verifying that an
application service has not claimed the username and that the username
fits the server's desired requirements (for example, a server could dictate
that it does not permit usernames with underscores).
Matrix clients may wish to use this API prior to attempting registration,
however the clients must also be aware that using this API does not normally
reserve the username. This can mean that the username becomes unavailable
between checking its availability and attempting to register it.
"""
checkUsernameAvailability(username: String!): checkUsernameAvailability_response!
"""
Get a list of aliases maintained by the local server for the
given room.
This endpoint can be called by users who are in the room (external
users receive an ``M_FORBIDDEN`` error response). If the room's
``m.room.history_visibility`` maps to ``world_readable``, any
user can call this endpoint.
Servers may choose to implement additional access control checks here,
such as allowing server administrators to view aliases regardless of
membership.
.. Note::
Clients are recommended not to display this list of aliases prominently
as they are not curated, unlike those listed in the ``m.room.canonical_alias``
state event.
"""
getLocalAliases(roomId: String!): getLocalAliases_response!
"""
This API returns a map of MXIDs to member info objects for members of the room. The current user must be in the room for it to work, unless it is an Application Service in which case any of the AS's users must be in the room. This API is primarily for Application Services and should be faster to respond than ``/members`` as it can be implemented more efficiently on the server.
"""
getJoinedMembersByRoom(roomId: String!): getJoinedMembersByRoom_response!
"""Get the list of members for this room."""
getMembersByRoom(roomId: String!, at: String, membership: String, not_membership: String): getMembersByRoom_response!
"""
This API returns a list of message and state events for a room. It uses
pagination query parameters to paginate history in the room.
*Note*: This endpoint supports lazy-loading of room member events. See
`Lazy-loading room members <#lazy-loading-room-members>`_ for more information.
"""
getRoomEvents(roomId: String!, from: String!, to: String, dir: String!, limit: Int, filter: String): getRoomEvents_response!
"""Get the state events for the current state of a room."""
getRoomState(roomId: String!): [JSON!]!
"""
.. For backwards compatibility with older links...
.. _`get-matrix-client-unstable-rooms-roomid-state-eventtype`:
Looks up the contents of a state event in a room. If the user is
joined to the room then the state is taken from the current
state of the room. If the user has left the room then the state is
taken from the state of the room when they left.
"""
getRoomStateWithKey(roomId: String!, eventType: String!, stateKey: String!): JSON!
"""
Get some account_data for the client. This config is only visible to the user
that set the account_data.
"""
getAccountData(userId: String!, type: String!): JSON!
getFilter(userId: String!, filterId: String!): JSON!
"""
Get some account_data for the client on a given room. This config is only
visible to the user that set the account_data.
"""
getAccountDataPerRoom(userId: String!, roomId: String!, type: String!): JSON!
"""List the tags set by a user on a room."""
getRoomTags(userId: String!, roomId: String!): getRoomTags_response!
"""
This API provides credentials for the client to use when initiating
calls.
"""
getTurnServer: getTurnServer_response!
"""
This endpoint allows clients to retrieve the configuration of the content
repository, such as upload limitations.
Clients SHOULD use this as a guide when using content repository 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.
"""
getConfig: getConfig_response!
getContent(serverName: String!, mediaId: String!, allow_remote: Boolean): getContent_response!
getContentOverrideName(serverName: String!, mediaId: String!, fileName: String!, allow_remote: Boolean): getContentOverrideName_response!
"""
Get information about a URL for the client. Typically this is called when a
client sees a URL in a message and wants to render a preview for the user.
.. Note::
Clients should consider avoiding this endpoint for URLs posted in encrypted
rooms. Encrypted rooms often contain more sensitive information the users
do not want to share with the homeserver, and this can mean that the URLs
being shared should also not be shared with the homeserver.
"""
getUrlPreview(url: String!, ts: String): getUrlPreview_response!
getContentThumbnail(serverName: String!, mediaId: String!, width: Int!, height: Int!, method: String, allow_remote: Boolean): getContentThumbnail_response!
}
type getAccount3PIDs_response {
threepids: [Third_party_identifier!]
}
type Third_party_identifier {
"""
The timestamp, in milliseconds, when the homeserver associated the third party identifier with the user.
"""
added_at: String!
"""The third party identifier address."""
address: String!
"""The medium of the third party identifier."""
medium: String!
"""
The timestamp, in milliseconds, when the identifier was
validated by the identity server.
"""
validated_at: String!
}
type getTokenOwner_response {
"""The user id that owns the access token."""
user_id: String!
}
type getCapabilities_response {
"""
The custom capabilities the server supports, using the
Java package naming convention.
"""
capabilities: Capabilities!
}
"""
The custom capabilities the server supports, using the
Java package naming convention.
"""
type Capabilities {
"""Capability to indicate if the user can change their password."""
m_change_password: ChangePasswordCapability
"""The room versions the server supports."""
m_room_versions: RoomVersionsCapability
}
"""Capability to indicate if the user can change their password."""
type ChangePasswordCapability {
"""True if the user can change their password, false otherwise."""
enabled: Boolean!
}
"""The room versions the server supports."""
type RoomVersionsCapability {
"""A detailed description of the room versions the server supports."""
available: JSON!
"""The default room version the server is using for new rooms."""
default: String!
}
scalar JSON
type getDevices_response {
"""A list of all registered devices for this user."""
devices: [JSON!]
}
type getRoomIdByAlias_response {
"""The room ID for this room alias."""
room_id: String
"""A list of servers that are aware of this room alias."""
servers: [String!]
}
type getJoinedRooms_response {
"""The ID of each room in which the user has ``joined`` membership."""
joined_rooms: [String!]!
}
type getKeysChanges_response {
"""
The Matrix User IDs of all users who updated their device
identity keys.
"""
changed: [String!]
"""
The Matrix User IDs of all users who may have left all
the end-to-end encrypted rooms they previously shared
with the user.
"""
left: [String!]
}
type getLoginFlows_response {
"""The homeserver's supported login types"""
flows: [LoginFlow!]
}
type LoginFlow {
"""
The login type. This is supplied as the ``type`` when
logging in.
"""
type: String
}
type getNotifications_response {
"""
The token to supply in the ``from`` param of the next
``/notifications`` request in order to request more
events. If this is absent, there are no more results.
"""
next_token: String
"""The list of events that triggered notifications."""
notifications: [Notification!]!
}
type Notification {
"""
The action(s) to perform when the conditions for this rule are met.
See `Push Rules: API`_.
"""
actions: [JSON!]!
"""The Event object for the event that triggered the notification."""
event: JSON!
"""The profile tag of the rule that matched this event."""
profile_tag: String
"""
Indicates whether the user has sent a read receipt indicating
that they have read this message.
"""
read: Boolean!
"""The ID of the room in which the event was posted."""
room_id: String!
"""
The unix timestamp at which the event notification was sent,
in milliseconds.
"""
ts: Int!
}
type getPresence_response {
"""Whether the user is currently active"""
currently_active: Boolean
"""
The length of time in milliseconds since an action was performed
by this user.
"""
last_active_ago: Int
"""This user's presence."""
presence: String!
"""The state message for this user if one was set."""
status_msg: String
}
type getUserProfile_response {
"""The user's avatar URL if they have set one, otherwise not present."""
avatar_url: String
"""The user's display name if they have set one, otherwise not present."""
displayname: String
}
type getAvatarUrl_response {
"""The user's avatar URL if they have set one, otherwise not present."""
avatar_url: String
}
type getDisplayName_response {
"""The user's display name if they have set one, otherwise not present."""
displayname: String
}
"""A list of the rooms on the server."""
type getPublicRooms_response {
"""A paginated chunk of public rooms."""
chunk: [PublicRoomsChunk!]!
"""
A pagination token for the response. The absence of this token
means there are no more results to fetch and the client should
stop paginating.
"""
next_batch: String
"""
A pagination token that allows fetching previous results. The
absence of this token means there are no results before this
batch, i.e. this is the first batch.
"""
prev_batch: String
"""
An estimate on the total number of public rooms, if the
server has an estimate.
"""
total_room_count_estimate: Int
}
type PublicRoomsChunk {
"""Aliases of the room. May be empty."""
aliases: [String!]
"""The URL for the room's avatar, if one is set."""
avatar_url: String
"""The canonical alias of the room, if any."""
canonical_alias: String
"""
Whether guest users may join the room and participate in it.
If they can, they will be subject to ordinary power level
rules like any other user.
"""
guest_can_join: Boolean!
"""The name of the room, if any."""
name: String
"""The number of members joined to the room."""
num_joined_members: Int!
"""The ID of the room."""
room_id: String!
"""The topic of the room, if any."""
topic: String
"""Whether the room may be viewed by guest users without joining."""
world_readable: Boolean!
}
type getPushers_response {
"""An array containing the current pushers for the user"""
pushers: [Pusher!]
}
type Pusher {
"""
A string that will allow the user to identify what application
owns this pusher.
"""
app_display_name: String!
"""
This is a reverse-DNS style identifier for the application.
Max length, 64 chars.
"""
app_id: String!
"""
A dictionary of information for the pusher implementation
itself.
"""
data: PusherData!
"""
A string that will allow the user to identify what device owns
this pusher.
"""
device_display_name: String!
"""
The kind of pusher. ``"http"`` is a pusher that
sends HTTP pokes.
"""
kind: String!
"""
The preferred language for receiving notifications (e.g. 'en'
or 'en-US')
"""
lang: String!
"""
This string determines which set of device specific rules this
pusher executes.
"""
profile_tag: String
"""
This is a unique identifier for this pusher. See ``/set`` for
more detail.
Max length, 512 bytes.
"""
pushkey: String!
}
"""
A dictionary of information for the pusher implementation
itself.
"""
type PusherData {
"""
The format to use when sending notifications to the Push
Gateway.
"""
format: String
"""
Required if ``kind`` is ``http``. The URL to use to send
notifications to.
"""
url: String
}
type getPushRules_response {
"""The global ruleset."""
global: JSON!
}
type getPushRuleActions_response {
"""The action(s) to perform for this rule."""
actions: [String!]!
}
type isPushRuleEnabled_response {
"""Whether the push rule is enabled or not."""
enabled: Boolean!
}
type checkUsernameAvailability_response {
"""
A flag to indicate that the username is available. This should always
be ``true`` when the server replies with 200 OK.
"""
available: Boolean
}
type getLocalAliases_response {
"""The server's local aliases on the room. Can be empty."""
aliases: [String!]!
}
type getJoinedMembersByRoom_response {
"""A map from user ID to a RoomMember object."""
joined: JSON
}
type getMembersByRoom_response {
chunk: [JSON!]
}
"""A list of messages with a new token to request more."""
type getRoomEvents_response {
"""
A list of room events. The order depends on the ``dir`` parameter.
For ``dir=b`` events will be in reverse-chronological order,
for ``dir=f`` in chronological order, so that events start
at the ``from`` point.
"""
chunk: [RoomEvent!]
"""
The token the pagination ends at. If ``dir=b`` this token should
be used again to request even earlier events.
"""
end: String
"""
The token the pagination starts from. If ``dir=b`` this will be
the token supplied in ``from``.
"""
start: String
"""
A list of state events relevant to showing the ``chunk``. For example, if
``lazy_load_members`` is enabled in the filter then this may contain
the membership events for the senders of events in the ``chunk``.
Unless ``include_redundant_members`` is ``true``, the server
may remove membership events which would have already been
sent to the client in prior calls to this endpoint, assuming
the membership of those members has not changed.
"""
state: [JSON!]
}
"""Room Events have the following fields."""
type RoomEvent {
"""
The ID of the room associated with this event. Will not be present on events
that arrive through ``/sync``, despite being required everywhere else.
"""
room_id: String!
}
type getRoomTags_response {
tags: JSON
}
type getTurnServer_response {
"""The password to use."""
password: String!
"""The time-to-live in seconds"""
ttl: Int!
"""A list of TURN URIs"""
uris: [String!]!
"""The username to use."""
username: String!
}
type getConfig_response {
"""
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.
"""
m_upload_size: String
}
type getContent_response {
unsupported: String
}
type getContentOverrideName_response {
unsupported: String
}
type getUrlPreview_response {
"""The byte-size of the image. Omitted if there is no image attached."""
matrix_image_size: String
"""An `MXC URI`_ to the image. Omitted if there is no image."""
og_image: String
}
type getContentThumbnail_response {
unsupported: String
}
type Mutation {
"""
Binds a 3PID to the user's account through the specified identity server.
Homeservers should not prevent this request from succeeding if another user
has bound the 3PID. Homeservers should simply proxy any errors received by
the identity server to the caller.
Homeservers should track successful binds so they can be unbound later.
"""
bind3PID(body: param_bind3PID_bodyInput): JSON!
"""
Removes a third party identifier from the user's account. This might not
cause an unbind of the identifier from the identity server.
Unlike other endpoints, this endpoint does not take an ``id_access_token``
parameter because the homeserver is expected to sign the request to the
identity server instead.
"""
delete3pidFromAccount(body: param_delete3pidFromAccount_bodyInput): delete3pidFromAccount_response!
"""
Removes a user's third party identifier from the provided identity server
without removing it from the homeserver.
Unlike other endpoints, this endpoint does not take an ``id_access_token``
parameter because the homeserver is expected to sign the request to the
identity server instead.
"""
unbind3pidFromAccount(body: param_unbind3pidFromAccount_bodyInput): unbind3pidFromAccount_response!
"""
Deactivate the user's account, removing all ability for the user to
login again.
This API endpoint uses the `User-Interactive Authentication API`_.
An access token should be submitted to this endpoint if the client has
an active session.
The homeserver may change the flows available depending on whether a
valid access token is provided.
Unlike other endpoints, this endpoint does not take an ``id_access_token``
parameter because the homeserver is expected to sign the request to the
identity server instead.
"""
deactivateAccount(body: param_deactivateAccount_bodyInput): deactivateAccount_response!
"""
Changes the password for an account on this homeserver.
This API endpoint uses the `User-Interactive Authentication API`_ to
ensure the user changing the password is actually the owner of the
account.
An access token should be submitted to this endpoint if the client has
an active session.
The homeserver may change the flows available depending on whether a
valid access token is provided. The homeserver SHOULD NOT revoke the
access token provided in the request. Whether other access tokens for
the user are revoked depends on the request parameters.
"""
changePassword(body: param_changePassword_bodyInput): JSON!
"""
Create a new room with various configuration options.
The server MUST apply the normal state resolution rules when creating
the new room, including checking power levels for each event. It MUST
apply the events implied by the request in the following order:
1. The ``m.room.create`` event itself. Must be the first event in the
room.
2. An ``m.room.member`` event for the creator to join the room. This is
needed so the remaining events can be sent.
3. A default ``m.room.power_levels`` event, giving the room creator
(and not other members) permission to send state events. Overridden
by the ``power_level_content_override`` parameter.
4. Events set by the ``preset``. Currently these are the ``m.room.join_rules``,
``m.room.history_visibility``, and ``m.room.guest_access`` state events.
5. Events listed in ``initial_state``, in the order that they are
listed.
6. Events implied by ``name`` and ``topic`` (``m.room.name`` and ``m.room.topic``
state events).
7. Invite events implied by ``invite`` and ``invite_3pid`` (``m.room.member`` with
``membership: invite`` and ``m.room.third_party_invite``).
The available presets do the following with respect to room state:
======================== ============== ====================== ================ =========
Preset ``join_rules`` ``history_visibility`` ``guest_access`` Other
======================== ============== ====================== ================ =========
``private_chat`` ``invite`` ``shared`` ``can_join``
``trusted_private_chat`` ``invite`` ``shared`` ``can_join`` All invitees are given the same power level as the room creator.
``public_chat`` ``public`` ``shared`` ``forbidden``
======================== ============== ====================== ================ =========
The server will create a ``m.room.create`` event in the room with the
requesting user as the creator, alongside other keys provided in the
``creation_content``.
"""
createRoom(body: param_createRoom_bodyInput): createRoom_response!
"""
This API endpoint uses the `User-Interactive Authentication API`_.
Deletes the given devices, and invalidates any access token associated with them.
"""
deleteDevices(body: param_deleteDevices_bodyInput): JSON!
"""
This API endpoint uses the `User-Interactive Authentication API`_.
Deletes the given device, and invalidates any access token associated with it.
"""
deleteDevice(deviceId: String!, body: param_deleteDevice_bodyInput): JSON!
"""Updates the metadata on the given device."""
updateDevice(deviceId: String!, body: param_updateDevice_bodyInput!): JSON!
"""
Updates the visibility of a given room on the application service's room
directory.
This API is similar to the room directory visibility API used by clients
to update the homeserver's more general room directory.
This API requires the use of an application service access token (``as_token``)
instead of a typical client's access_token. This API cannot be invoked by
users who are not identified as application services.
"""
updateAppserviceRoomDirectoryVsibility(networkId: String!, roomId: String!, body: param_updateAppserviceRoomDirectoryVsibility_bodyInput!): JSON!
"""
Remove a mapping of room alias to room ID.
Servers may choose to implement additional access control checks here, for instance that
room aliases can only be deleted by their creator or a server administrator.
.. Note::
Servers may choose to update the ``alt_aliases`` for the ``m.room.canonical_alias``
state event in the room when an alias is removed. Servers which choose to update the
canonical alias event are recommended to, in addition to their other relevant permission
checks, delete the alias and return a successful response even if the user does not
have permission to update the ``m.room.canonical_alias`` event.
"""
deleteRoomAlias(roomAlias: String!): JSON!
setRoomAlias(roomAlias: String!, body: param_setRoomAlias_bodyInput!): JSON!
"""
*Note that this API takes either a room ID or alias, unlike* ``/room/{roomId}/join``.
This API starts a user participating in a particular room, if that user
is allowed to participate in that room. After this call, the client is
allowed to see all current state events in the room, and all subsequent
events associated with the room until the user leaves the room.
After a user has joined a room, the room will appear as an entry in the
response of the |/initialSync|_ and |/sync|_ APIs.
If a ``third_party_signed`` was supplied, the homeserver must verify
that it matches a pending ``m.room.third_party_invite`` event in the
room, and perform key validity checking if required by the event.
"""
joinRoom(roomIdOrAlias: String!, server_name: [String!], third_party_signed: param_joinRoom_third_party_signedInput): joinRoom_response!
"""Claims one-time keys for use in pre-key messages."""
claimKeys(query: param_claimKeys_queryInput): claimKeys_response!
"""
Authenticates the user, and issues an access token they can
use to authorize themself in subsequent requests.
If the client does not supply a ``device_id``, the server must
auto-generate one.
The returned access token must be associated with the ``device_id``
supplied by the client or generated by the server. The server may
invalidate any access token previously associated with that device. See
`Relationship between access tokens and devices`_.
"""
login(body: param_login_bodyInput): login_response!
"""
Invalidates an existing access token, so that it can no longer be used for
authorization. The device associated with the access token is also deleted.
`Device keys <#device-keys>`_ for the device are deleted alongside the device.
"""
logout: JSON!
"""
Invalidates all access tokens for a user, so that they can no longer be used for
authorization. This includes the access token that made this request. All devices
for the user are also deleted. `Device keys <#device-keys>`_ for the device are
deleted alongside the device.
This endpoint does not require UI authorization because UI authorization is
designed to protect against attacks where the someone gets hold of a single access
token then takes over the account. This endpoint invalidates all access tokens for
the user, including the token used in the request, and therefore the attacker is
unable to take over the account in this way.
"""
logout_all: JSON!
"""
This API sets the given user's presence state. When setting the status,
the activity time is updated to reflect that activity; the client does
not need to specify the ``last_active_ago`` field. You cannot set the
presence state of another user.
"""
setPresence(userId: String!, presenceState: param_setPresence_presenceStateInput!): JSON!
"""
This API sets the given user's avatar URL. You must have permission to
set this user's avatar URL, e.g. you need to have their ``access_token``.
"""
setAvatarUrl(userId: String!, avatar_url: param_setAvatarUrl_avatar_urlInput!): JSON!
"""
This API sets the given user's display name. You must have permission to
set this user's display name, e.g. you need to have their ``access_token``.
"""
setDisplayName(userId: String!, displayName: param_setDisplayName_displayNameInput!): JSON!
"""
Lists the public rooms on the server, with optional filter.
This API returns paginated responses. The rooms are ordered by the number
of joined members, with the largest rooms first.
"""
queryPublicRooms(server: String, body: param_queryPublicRooms_bodyInput!): queryPublicRooms_response!
"""
This endpoint allows the creation, modification and deletion of `pushers`_
for this user ID. The behaviour of this endpoint varies depending on the
values in the JSON body.
"""
postPusher(pusher: param_postPusher_pusherInput!): JSON!
"""This endpoint removes the push rule defined in the path."""
deletePushRule(scope: String!, kind: String!, ruleId: String!): JSON!
"""
This endpoint allows the creation, modification and deletion of pushers
for this user ID. The behaviour of this endpoint varies depending on the
values in the JSON body.
When creating push rules, they MUST be enabled by default.
"""
setPushRule(scope: String!, kind: String!, ruleId: String!, before: String, after: String, pushrule: param_setPushRule_pushruleInput!): JSON!
"""
This endpoint allows clients to change the actions of a push rule.
This can be used to change the actions of builtin rules.
"""
setPushRuleActions(scope: String!, kind: String!, ruleId: String!, body: param_setPushRuleActions_bodyInput!): JSON!
"""
This endpoint allows clients to enable or disable the specified push rule.
"""
setPushRuleEnabled(scope: String!, kind: String!, ruleId: String!, body: param_setPushRuleEnabled_bodyInput!): JSON!
"""
This API endpoint uses the `User-Interactive Authentication API`_, except in
the cases where a guest account is being registered.
Register for an account on this homeserver.
There are two kinds of user account:
- `user` accounts. These accounts may use the full API described in this specification.
- `guest` accounts. These accounts may have limited permissions and may not be supported by all servers.
If registration is successful, this endpoint will issue an access token
the client can use to authorize itself in subsequent requests.
If the client does not supply a ``device_id``, the server must
auto-generate one.
The server SHOULD register an account with a User ID based on the
``username`` provided, if any. Note that the grammar of Matrix User ID
localparts is restricted, so the server MUST either map the provided
``username`` onto a ``user_id`` in a logical manner, or reject
``username``\s which do not comply to the grammar, with
``M_INVALID_USERNAME``.
Matrix clients MUST NOT assume that localpart of the registered
``user_id`` matches the provided ``username``.
The returned access token must be associated with the ``device_id``
supplied by the client or generated by the server. The server may
invalidate any access token previously associated with that device. See
`Relationship between access tokens and devices`_.
When registering a guest account, all parameters in the request body
with the exception of ``initial_device_display_name`` MUST BE ignored
by the server. The server MUST pick a ``device_id`` for the account
regardless of input.
Any user ID returned by this API must conform to the grammar given in the
`Matrix specification <../appendices.html#user-identifiers>`_.
"""
register(kind: String, body: param_register_bodyInput): register_response!
"""
Ban a user in the room. If the user is currently in the room, also kick them.
When a user is banned from a room, they may not join it or be invited to it until they are unbanned.
The caller must have the required power level in order to perform this operation.
"""
ban(roomId: String!, body: param_ban_bodyInput!): JSON!
"""
This API stops a user remembering about a particular room.
In general, history is a first class citizen in Matrix. After this API
is called, however, a user will no longer be able to retrieve history
for this room. If all users on a homeserver forget a room, the room is
eligible for deletion from that homeserver.
If the user is currently joined to the room, they must leave the room
before calling this API.
"""
forgetRoom(roomId: String!): JSON!
"""
.. _invite-by-third-party-id-endpoint:
*Note that there are two forms of this API, which are documented separately.
This version of the API does not require that the inviter know the Matrix
identifier of the invitee, and instead relies on third party identifiers.
The homeserver uses an identity server to perform the mapping from
third party identifier to a Matrix identifier. The other is documented in the*
`joining rooms section`_.
This API invites a user to participate in a particular room.
They do not start participating in the room until they actually join the
room.
Only users currently in a particular room can invite other users to
join that room.
If the identity server did know the Matrix user identifier for the
third party identifier, the homeserver will append a ``m.room.member``
event to the room.
If the identity server does not know a Matrix user identifier for the
passed third party identifier, the homeserver will issue an invitation
which can be accepted upon providing proof of ownership of the third
party identifier. This is achieved by the identity server generating a
token, which it gives to the inviting homeserver. The homeserver will
add an ``m.room.third_party_invite`` event into the graph for the room,
containing that token.
When the invitee binds the invited third party identifier to a Matrix
user ID, the identity server will give the user a list of pending
invitations, each containing:
- The room ID to which they were invited
- The token given to the homeserver
- A signature of the token, signed with the identity server's private key
- The matrix user ID who invited them to the room
If a token is requested from the identity server, the homeserver will
append a ``m.room.third_party_invite`` event to the room.
.. _joining rooms section: `invite-by-user-id-endpoint`_
"""
inviteBy3PID(roomId: String!, body: param_inviteBy3PID_bodyInput!): JSON!
"""
.. _invite-by-user-id-endpoint:
*Note that there are two forms of this API, which are documented separately.
This version of the API requires that the inviter knows the Matrix
identifier of the invitee. The other is documented in the*
`third party invites section`_.
This API invites a user to participate in a particular room.
They do not start participating in the room until they actually join the
room.
Only users currently in a particular room can invite other users to
join that room.
If the user was invited to the room, the homeserver will append a
``m.room.member`` event to the room.
.. _third party invites section: `invite-by-third-party-id-endpoint`_
"""
inviteUser(roomId: String!, body: param_inviteUser_bodyInput!): JSON!
"""
*Note that this API requires a room ID, not alias.* ``/join/{roomIdOrAlias}`` *exists if you have a room alias.*
This API starts a user participating in a particular room, if that user
is allowed to participate in that room. After this call, the client is
allowed to see all current state events in the room, and all subsequent
events associated with the room until the user leaves the room.
After a user has joined a room, the room will appear as an entry in the
response of the |/initialSync|_ and |/sync|_ APIs.
If a ``third_party_signed`` was supplied, the homeserver must verify
that it matches a pending ``m.room.third_party_invite`` event in the
room, and perform key validity checking if required by the event.
"""
joinRoomById(roomId: String!, third_party_signed: param_joinRoomById_third_party_signedInput): joinRoomById_response!
"""
Kick a user from the room.
The caller must have the required power level in order to perform this operation.
Kicking a user adjusts the target member's membership state to be ``leave`` with an
optional ``reason``. Like with other membership changes, a user can directly adjust
the target member's state by making a request to ``/rooms/<room id>/state/m.room.member/<user id>``.
"""
kick(roomId: String!, body: param_kick_bodyInput!): JSON!
"""
This API stops a user participating in a particular room.
If the user was already in the room, they will no longer be able to see
new events in the room. If the room requires an invite to join, they
will need to be re-invited before they can re-join.
If the user was invited to the room, but had not joined, this call
serves to reject the invite.
The user will still be allowed to retrieve history from the room which
they were previously allowed to see.
"""
leaveRoom(roomId: String!): JSON!
"""
Sets the position of the read marker for a given room, and optionally
the read receipt's location.
"""
setReadMarker(roomId: String!, body: param_setReadMarker_bodyInput!): JSON!
"""
This API updates the marker for the given receipt type to the event ID
specified.
"""
postReceipt(roomId: String!, receiptType: String!, eventId: String!, receipt: JSON): JSON!
"""
Strips all information out of an event which isn't critical to the
integrity of the server-side representation of the room.
This cannot be undone.
Users may redact their own events, and any user with a power level
greater than or equal to the ``redact`` power level of the room may
redact events there.
"""
redactEvent(roomId: String!, eventId: String!, txnId: String!, body: param_redactEvent_bodyInput): redactEvent_response!
"""
Reports an event as inappropriate to the server, which may then notify
the appropriate people.
"""
reportContent(roomId: String!, eventId: String!, body: param_reportContent_bodyInput): JSON!
"""
This endpoint is used to send a message event to a room. Message events
allow access to historical events and pagination, making them suited
for "once-off" activity in a room.
The body of the request should be the content object of the event; the
fields in this object will vary depending on the type of event. See
`Room Events`_ for the m. event specification.
"""
sendMessage(roomId: String!, eventType: String!, txnId: String!, body: JSON): sendMessage_response!
"""
.. For backwards compatibility with older links...
.. _`put-matrix-client-unstable-rooms-roomid-state-eventtype`:
State events can be sent using this endpoint. These events will be
overwritten if ``<room id>``, ``<event type>`` and ``<state key>`` all
match.
Requests to this endpoint **cannot use transaction IDs**
like other ``PUT`` paths because they cannot be differentiated from the
``state_key``. Furthermore, ``POST`` is unsupported on state paths.
The body of the request should be the content object of the event; the
fields in this object will vary depending on the type of event. See
`Room Events`_ for the ``m.`` event specification.
If the event type being sent is ``m.room.canonical_alias`` servers
SHOULD ensure that any new aliases being listed in the event are valid
per their grammar/syntax and that they point to the room ID where the
state event is to be sent. Servers do not validate aliases which are
being removed or are already present in the state event.
"""
setRoomStateWithKey(roomId: String!, eventType: String!, stateKey: String!, body: JSON): setRoomStateWithKey_response!
"""
This tells the server that the user is typing for the next N
milliseconds where N is the value specified in the ``timeout`` key.
Alternatively, if ``typing`` is ``false``, it tells the server that the
user has stopped typing.
"""
setTyping(userId: String!, roomId: String!, typingState: param_setTyping_typingStateInput!): JSON!
"""
Unban a user from the room. This allows them to be invited to the room,
and join if they would otherwise be allowed to join according to its join rules.
The caller must have the required power level in order to perform this operation.
"""
unban(roomId: String!, body: param_unban_bodyInput!): JSON!
"""Upgrades the given room to a particular room version."""
upgradeRoom(roomId: String!, body: param_upgradeRoom_bodyInput!): upgradeRoom_response!
"""Performs a full text search across different categories."""
search(next_batch: String, body: param_search_bodyInput): Results!
"""
This endpoint is used to send send-to-device events to a set of
client devices.
"""
sendToDevice(eventType: String!, txnId: String!, body: bodyInput!): JSON!
"""
Set some account_data for the client. This config is only visible to the user
that set the account_data. The config will be synced to clients in the
top-level ``account_data``.
"""
setAccountData(userId: String!, type: String!, content: JSON!): JSON!
"""
Uploads a new filter definition to the homeserver.
Returns a filter ID that may be used in future requests to
restrict which events are returned to the client.
"""
defineFilter(userId: String!, filter: JSON!): defineFilter_response!
"""
Gets an OpenID token object that the requester may supply to another
service to verify their identity in Matrix. The generated token is only
valid for exchanging for user information from the federation API for
OpenID.
The access token generated is only valid for the OpenID API. It cannot
be used to request another OpenID access token or call ``/sync``, for
example.
"""
requestOpenIdToken(userId: String!, body: JSON!): requestOpenIdToken_response!
"""
Set some account_data for the client on a given room. This config is only
visible to the user that set the account_data. The config will be synced to
clients in the per-room ``account_data``.
"""
setAccountDataPerRoom(userId: String!, roomId: String!, type: String!, content: JSON!): JSON!
"""Remove a tag from the room."""
deleteRoomTag(userId: String!, roomId: String!, tag: String!): JSON!
"""Add a tag to the room."""
setRoomTag(userId: String!, roomId: String!, tag: String!, body: param_setRoomTag_bodyInput!): JSON!
"""
Performs a search for users. The homeserver may
determine which subset of users are searched, however the homeserver
MUST at a minimum consider the users the requesting user shares a
room with and those who reside in public rooms (known to the homeserver).
The search MUST consider local users to the homeserver, and SHOULD
query remote users as part of the search.
The search is performed case-insensitively on user IDs and display
names preferably using a collation determined based upon the
``Accept-Language`` header provided in the request, if present.
"""
searchUserDirectory(body: param_searchUserDirectory_bodyInput): searchUserDirectory_response!
uploadContent(Content_Type: String, filename: String, _content_: String!): uploadContent_response!
}
input param_bind3PID_bodyInput {
"""The client secret used in the session with the identity server."""
client_secret: String!
"""An access token previously registered with the identity server."""
id_access_token: String!
"""The identity server to use."""
id_server: String!
"""The session identifier given by the identity server."""
sid: String!
}
type delete3pidFromAccount_response {
"""
An indicator as to whether or not the homeserver was able to unbind
the 3PID from the identity server. ``success`` indicates that the
indentity server has unbound the identifier whereas ``no-support``
indicates that the identity server refuses to support the request
or the homeserver was not able to determine an identity server to
unbind from.
"""
id_server_unbind_result: String!
}
input param_delete3pidFromAccount_bodyInput {
"""The third party address being removed."""
address: String!
"""
The identity server to unbind from. If not provided, the homeserver
MUST use the ``id_server`` the identifier was added through. If the
homeserver does not know the original ``id_server``, it MUST return
a ``id_server_unbind_result`` of ``no-support``.
"""
id_server: String
"""The medium of the third party identifier being removed."""
medium: String!
}
type unbind3pidFromAccount_response {
"""
An indicator as to whether or not the identity server was able to unbind
the 3PID. ``success`` indicates that the identity server has unbound the
identifier whereas ``no-support`` indicates that the identity server
refuses to support the request or the homeserver was not able to determine
an identity server to unbind from.
"""
id_server_unbind_result: String!
}
input param_unbind3pidFromAccount_bodyInput {
"""The third party address being removed."""
address: String!
"""
The identity server to unbind from. If not provided, the homeserver
MUST use the ``id_server`` the identifier was added through. If the
homeserver does not know the original ``id_server``, it MUST return
a ``id_server_unbind_result`` of ``no-support``.
"""
id_server: String
"""The medium of the third party identifier being removed."""
medium: String!
}
type deactivateAccount_response {
"""
An indicator as to whether or not the homeserver was able to unbind
the user's 3PIDs from the identity server(s). ``success`` indicates
that all identifiers have been unbound from the identity server while
``no-support`` indicates that one or more identifiers failed to unbind
due to the identity server refusing the request or the homeserver
being unable to determine an identity server to unbind from. This
must be ``success`` if the homeserver has no identifiers to unbind
for the user.
"""
id_server_unbind_result: String!
}
input param_deactivateAccount_bodyInput {
"""
Additional authentication information for the user-interactive authentication API.
"""
auth: Authentication_DataInput
"""
The identity server to unbind all of the user's 3PIDs from.
If not provided, the homeserver MUST use the ``id_server``
that was originally use to bind each identifier. If the
homeserver does not know which ``id_server`` that was,
it must return an ``id_server_unbind_result`` of
``no-support``.
"""
id_server: String
}
"""
Additional authentication information for the user-interactive authentication API.
"""
input Authentication_DataInput {
"""The value of the session key given by the homeserver."""
session: String
"""The login type that the client is attempting to complete."""
type: String!
}
input param_changePassword_bodyInput {
"""
Additional authentication information for the user-interactive authentication API.
"""
auth: Authentication_DataInput
"""
Whether the user's other access tokens, and their associated devices, should be
revoked if the request succeeds. Defaults to true.
When ``false``, the server can still take advantage of `the soft logout method <#soft-logout>`_
for the user's remaining devices.
"""
logout_devices: Boolean
"""The new password for the account."""
new_password: String!
}
"""Information about the newly created room."""
type createRoom_response {
"""The created room's ID."""
room_id: String!
}
input param_createRoom_bodyInput {
"""
Extra keys, such as ``m.federate``, to be added to the content
of the `m.room.create`_ event. The server will clobber the following
keys: ``creator``, ``room_version``. Future versions of the specification
may allow the server to clobber other keys.
"""
creation_content: JSON
"""
A list of state events to set in the new room. This allows
the user to override the default state events set in the new
room. The expected format of the state events are an object
with type, state_key and content keys set.
Takes precedence over events set by ``preset``, but gets
overriden by ``name`` and ``topic`` keys.
"""
initial_state: [StateEventInput!]
"""
A list of user IDs to invite to the room. This will tell the
server to invite everyone in the list to the newly created room.
"""
invite: [String!]
"""
A list of objects representing third party IDs to invite into
the room.
"""
invite_3pid: [Invite3pidInput!]
"""
This flag makes the server set the ``is_direct`` flag on the
``m.room.member`` events sent to the users in ``invite`` and
``invite_3pid``. See `Direct Messaging`_ for more information.
"""
is_direct: Boolean
"""
If this is included, an ``m.room.name`` event will be sent
into the room to indicate the name of the room. See Room
Events for more information on ``m.room.name``.
"""
name: String
"""
The power level content to override in the default power level
event. This object is applied on top of the generated `m.room.power_levels`_
event content prior to it being sent to the room. Defaults to
overriding nothing.
"""
power_level_content_override: JSON
"""
Convenience parameter for setting various default state events
based on a preset.
If unspecified, the server should use the ``visibility`` to determine
which preset to use. A visbility of ``public`` equates to a preset of
``public_chat`` and ``private`` visibility equates to a preset of
``private_chat``.
"""
preset: String
"""
The desired room alias **local part**. If this is included, a
room alias will be created and mapped to the newly created
room. The alias will belong on the *same* homeserver which
created the room. For example, if this was set to "foo" and
sent to the homeserver "example.com" the complete room alias
would be ``#foo:example.com``.
The complete room alias will become the canonical alias for
the room.
"""
room_alias_name: String
"""
The room version to set for the room. If not provided, the homeserver is
to use its configured default. If provided, the homeserver will return a
400 error with the errcode ``M_UNSUPPORTED_ROOM_VERSION`` if it does not
support the room version.
"""
room_version: String
"""
If this is included, an ``m.room.topic`` event will be sent
into the room to indicate the topic for the room. See Room
Events for more information on ``m.room.topic``.
"""
topic: String
"""
A ``public`` visibility indicates that the room will be shown
in the published room list. A ``private`` visibility will hide
the room from the published room list. Rooms default to
``private`` visibility if this key is not included. NB: This
should not be confused with ``join_rules`` which also uses the
word ``public``.
"""
visibility: String
}
input StateEventInput {
"""The content of the event."""
content: JSON!
"""The state_key of the state event. Defaults to an empty string."""
state_key: String
"""The type of event to send."""
type: String!
}
input Invite3pidInput {
"""The invitee's third party identifier."""
address: String!
"""
An access token previously registered with the identity server. Servers
can treat this as optional to distinguish between r0.5-compatible clients
and this specification version.
"""
id_access_token: String!
"""
The hostname+port of the identity server which should be used for third party identifier lookups.
"""
id_server: String!
"""
The kind of address being passed in the address field, for example ``email``.
"""
medium: String!
}
input param_deleteDevices_bodyInput {
"""
Additional authentication information for the
user-interactive authentication API.
"""
auth: Authentication_DataInput
"""The list of device IDs to delete."""
devices: [String!]!
}
input param_deleteDevice_bodyInput {
"""
Additional authentication information for the
user-interactive authentication API.
"""
auth: Authentication_DataInput
}
input param_updateDevice_bodyInput {
"""
The new display name for this device. If not given, the
display name is unchanged.
"""
display_name: String
}
input param_updateAppserviceRoomDirectoryVsibility_bodyInput {
"""
Whether the room should be visible (public) in the directory
or not (private).
"""
visibility: String!
}
input param_setRoomAlias_bodyInput {
"""The room ID to set."""
room_id: String!
}
type joinRoom_response {
"""The joined room ID."""
room_id: String!
}
input param_joinRoom_third_party_signedInput {
"""
A signature of an ``m.third_party_invite`` token to prove that this user
owns a third party identity which has been invited to the room.
"""
third_party_signed: Third_Party_SignedInput
}
"""
A signature of an ``m.third_party_invite`` token to prove that this user
owns a third party identity which has been invited to the room.
"""
input Third_Party_SignedInput {
"""The Matrix ID of the invitee."""
mxid: String!
"""The Matrix ID of the user who issued the invite."""
sender: String!
"""
A signatures object containing a signature of the entire signed object.
"""
signatures: JSON!
"""The state key of the m.third_party_invite event."""
token: String!
}
type claimKeys_response {
"""
If any remote homeservers could not be reached, they are
recorded here. The names of the properties are the names of
the unreachable servers.
If the homeserver could be reached, but the user or device
was unknown, no failure is recorded. Instead, the corresponding
user or device is missing from the ``one_time_keys`` result.
"""
failures: JSON
"""
One-time keys for the queried devices. A map from user ID, to a
map from devices to a map from ``<algorithm>:<key_id>`` to the key object.
See the `key algorithms <#key-algorithms>`_ section for information
on the Key Object format.
"""
one_time_keys: JSON!
}
input param_claimKeys_queryInput {
"""
The keys to be claimed. A map from user ID, to a map from
device ID to algorithm name.
"""
one_time_keys: JSON!
"""
The time (in milliseconds) to wait when downloading keys from
remote servers. 10 seconds is the recommended default.
"""
timeout: Int
}
type login_response {
"""
An access token for the account.
This access token can then be used to authorize other requests.
"""
access_token: String
"""
ID of the logged-in device. Will be the same as the
corresponding parameter in the request, if one was specified.
"""
device_id: String
"""
The server_name of the homeserver on which the account has
been registered.
**Deprecated**. Clients should extract the server_name from
``user_id`` (by splitting at the first colon) if they require
it. Note also that ``homeserver`` is not spelt this way.
"""
home_server: String
"""The fully-qualified Matrix ID that has been registered."""
user_id: String
"""
Optional client configuration provided by the server. If present,
clients SHOULD use the provided object to reconfigure themselves,
optionally validating the URLs within. This object takes the same
form as the one returned from .well-known autodiscovery.
"""
well_known: Discovery_Information
}
"""
Optional client configuration provided by the server. If present,
clients SHOULD use the provided object to reconfigure themselves,
optionally validating the URLs within. This object takes the same
form as the one returned from .well-known autodiscovery.
"""
type Discovery_Information {
"""Used by clients to discover homeserver information."""
m_homeserver: Homeserver_Information
"""Used by clients to discover identity server information."""
m_identity_server: Identity_Server_Information
}
"""Used by clients to discover homeserver information."""
type Homeserver_Information {
"""The base URL for the homeserver for client-server connections."""
base_url: String!
}
"""Used by clients to discover identity server information."""
type Identity_Server_Information {
"""The base URL for the identity server for client-server connections."""
base_url: String!
}
input param_login_bodyInput {
"""
Third party identifier for the user. Deprecated in favour of ``identifier``.
"""
address: String
"""
ID of the client device. If this does not correspond to a
known client device, a new device will be created. The server
will auto-generate a device_id if this is not specified.
"""
device_id: String
"""Identification information for the user."""
identifier: User_identifierInput
"""
A display name to assign to the newly-created device. Ignored
if ``device_id`` corresponds to a known device.
"""
initial_device_display_name: String
"""
When logging in using a third party identifier, the medium of the identifier. Must be 'email'. Deprecated in favour of ``identifier``.
"""
medium: String
"""
Required when ``type`` is ``m.login.password``. The user's
password.
"""
password: String
"""
Required when ``type`` is ``m.login.token``. Part of `Token-based`_ login.
"""
token: String
"""The login type being used."""
type: String!
"""
The fully qualified user ID or just local part of the user ID, to log in. Deprecated in favour of ``identifier``.
"""
user: String
}
"""Identification information for the user."""
input User_identifierInput {
"""
The type of identification. See `Identifier types`_ for supported values and additional property descriptions.
"""
type: String!
}
input param_setPresence_presenceStateInput {
"""The new presence state."""
presence: String!
"""The status message to attach to this state."""
status_msg: String
}
input param_setAvatarUrl_avatar_urlInput {
"""The new avatar URL for this user."""
avatar_url: String
}
input param_setDisplayName_displayNameInput {
"""The new display name for this user."""
displayname: String
}
"""A list of the rooms on the server."""
type queryPublicRooms_response {
"""A paginated chunk of public rooms."""
chunk: [PublicRoomsChunk!]!
"""
A pagination token for the response. The absence of this token
means there are no more results to fetch and the client should
stop paginating.
"""
next_batch: String
"""
A pagination token that allows fetching previous results. The
absence of this token means there are no results before this
batch, i.e. this is the first batch.
"""
prev_batch: String
"""
An estimate on the total number of public rooms, if the
server has an estimate.
"""
total_room_count_estimate: Int
}
input param_queryPublicRooms_bodyInput {
"""Filter to apply to the results."""
filter: FilterInput
"""
Whether or not to include all known networks/protocols from
application services on the homeserver. Defaults to false.
"""
include_all_networks: Boolean
"""Limit the number of results returned."""
limit: Int
"""
A pagination token from a previous request, allowing clients
to get the next (or previous) batch of rooms. The direction
of pagination is specified solely by which token is supplied,
rather than via an explicit flag.
"""
since: String
"""
The specific third party network/protocol to request from the
homeserver. Can only be used if ``include_all_networks`` is false.
"""
third_party_instance_id: String
}
"""Filter to apply to the results."""
input FilterInput {
"""
A string to search for in the room metadata, e.g. name,
topic, canonical alias etc. (Optional).
"""
generic_search_term: String
}
input param_postPusher_pusherInput {
"""
A string that will allow the user to identify what application
owns this pusher.
"""
app_display_name: String!
"""
This is a reverse-DNS style identifier for the application.
It is recommended that this end with the platform, such that
different platform versions get different app identifiers.
Max length, 64 chars.
If the ``kind`` is ``"email"``, this is ``"m.email"``.
"""
app_id: String!
"""
If true, the homeserver should add another pusher with the
given pushkey and App ID in addition to any others with
different user IDs. Otherwise, the homeserver must remove any
other pushers with the same App ID and pushkey for different
users. The default is ``false``.
"""
append: Boolean
"""
A dictionary of information for the pusher implementation
itself. If ``kind`` is ``http``, this should contain ``url``
which is the URL to use to send notifications to.
"""
data: PusherDataInput!
"""
A string that will allow the user to identify what device owns
this pusher.
"""
device_display_name: String!
"""
The kind of pusher to configure. ``"http"`` makes a pusher that
sends HTTP pokes. ``"email"`` makes a pusher that emails the
user with unread notifications. ``null`` deletes the pusher.
"""
kind: String!
"""
The preferred language for receiving notifications (e.g. 'en'
or 'en-US').
"""
lang: String!
"""
This string determines which set of device specific rules this
pusher executes.
"""
profile_tag: String
"""
This is a unique identifier for this pusher. The value you
should use for this is the routing or destination address
information for the notification, for example, the APNS token
for APNS or the Registration ID for GCM. If your notification
client has no such concept, use any unique identifier.
Max length, 512 bytes.
If the ``kind`` is ``"email"``, this is the email address to
send notifications to.
"""
pushkey: String!
}
"""
A dictionary of information for the pusher implementation
itself. If ``kind`` is ``http``, this should contain ``url``
which is the URL to use to send notifications to.
"""
input PusherDataInput {
"""
The format to send notifications in to Push Gateways if the
``kind`` is ``http``. The details about what fields the
homeserver should send to the push gateway are defined in the
`Push Gateway Specification`_. Currently the only format
available is 'event_id_only'.
"""
format: String
"""
Required if ``kind`` is ``http``. The URL to use to send
notifications to. MUST be an HTTPS URL with a path of
``/_matrix/push/v1/notify``.
"""
url: String
}
input param_setPushRule_pushruleInput {
"""The action(s) to perform when the conditions for this rule are met."""
actions: [String!]!
"""
The conditions that must hold true for an event in order for a
rule to be applied to an event. A rule with no conditions
always matches. Only applicable to ``underride`` and ``override`` rules.
"""
conditions: [JSON!]
"""
Only applicable to ``content`` rules. The glob-style pattern to match against.
"""
pattern: String
}
input param_setPushRuleActions_bodyInput {
"""The action(s) to perform for this rule."""
actions: [String!]!
}
input param_setPushRuleEnabled_bodyInput {
"""Whether the push rule is enabled or not."""
enabled: Boolean!
}
type register_response {
"""
An access token for the account.
This access token can then be used to authorize other requests.
Required if the ``inhibit_login`` option is false.
"""
access_token: String
"""
ID of the registered device. Will be the same as the
corresponding parameter in the request, if one was specified.
Required if the ``inhibit_login`` option is false.
"""
device_id: String
"""
The server_name of the homeserver on which the account has
been registered.
**Deprecated**. Clients should extract the server_name from
``user_id`` (by splitting at the first colon) if they require
it. Note also that ``homeserver`` is not spelt this way.
"""
home_server: String
"""
The fully-qualified Matrix user ID (MXID) that has been registered.
Any user ID returned by this API must conform to the grammar given in the
`Matrix specification <../appendices.html#user-identifiers>`_.
"""
user_id: String!
}
input param_register_bodyInput {
"""
Additional authentication information for the
user-interactive authentication API. Note that this
information is *not* used to define how the registered user
should be authenticated, but is instead used to
authenticate the ``register`` call itself.
"""
auth: Authentication_DataInput
"""
ID of the client device. If this does not correspond to a
known client device, a new device will be created. The server
will auto-generate a device_id if this is not specified.
"""
device_id: String
"""
If true, an ``access_token`` and ``device_id`` should not be
returned from this call, therefore preventing an automatic
login. Defaults to false.
"""
inhibit_login: Boolean
"""
A display name to assign to the newly-created device. Ignored
if ``device_id`` corresponds to a known device.
"""
initial_device_display_name: String
"""The desired password for the account."""
password: String
"""
The basis for the localpart of the desired Matrix ID. If omitted,
the homeserver MUST generate a Matrix ID local part.
"""
username: String
}
input param_ban_bodyInput {
"""
The reason the user has been banned. This will be supplied as the ``reason`` on the target's updated `m.room.member`_ event.
"""
reason: String
"""The fully qualified user ID of the user being banned."""
user_id: String!
}
input param_inviteBy3PID_bodyInput {
"""The invitee's third party identifier."""
address: String!
"""
An access token previously registered with the identity server. Servers
can treat this as optional to distinguish between r0.5-compatible clients
and this specification version.
"""
id_access_token: String!
"""
The hostname+port of the identity server which should be used for third party identifier lookups.
"""
id_server: String!
"""
The kind of address being passed in the address field, for example ``email``.
"""
medium: String!
}
input param_inviteUser_bodyInput {
"""The fully qualified user ID of the invitee."""
user_id: String!
}
type joinRoomById_response {
"""The joined room ID."""
room_id: String!
}
input param_joinRoomById_third_party_signedInput {
"""
A signature of an ``m.third_party_invite`` token to prove that this user
owns a third party identity which has been invited to the room.
"""
third_party_signed: Third_Party_SignedInput
}
input param_kick_bodyInput {
"""
The reason the user has been kicked. This will be supplied as the
``reason`` on the target's updated `m.room.member`_ event.
"""
reason: String
"""The fully qualified user ID of the user being kicked."""
user_id: String!
}
input param_setReadMarker_bodyInput {
"""
The event ID the read marker should be located at. The
event MUST belong to the room.
"""
m_fully_read: String
"""
The event ID to set the read receipt location at. This is
equivalent to calling ``/receipt/m.read/$elsewhere:example.org``
and is provided here to save that extra call.
"""
m_read: String
}
type redactEvent_response {
"""A unique identifier for the event."""
event_id: String
}
input param_redactEvent_bodyInput {
"""The reason for the event being redacted."""
reason: String
}
input param_reportContent_bodyInput {
"""The reason the content is being reported. May be blank."""
reason: String!
"""
The score to rate this content as where -100 is most offensive
and 0 is inoffensive.
"""
score: Int!
}
type sendMessage_response {
"""A unique identifier for the event."""
event_id: String!
}
type setRoomStateWithKey_response {
"""A unique identifier for the event."""
event_id: String!
}
input param_setTyping_typingStateInput {
"""The length of time in milliseconds to mark this user as typing."""
timeout: Int
"""
Whether the user is typing or not. If ``false``, the ``timeout``
key can be omitted.
"""
typing: Boolean!
}
input param_unban_bodyInput {
"""The fully qualified user ID of the user being unbanned."""
user_id: String!
}
type upgradeRoom_response {
"""The ID of the new room."""
replacement_room: String!
}
input param_upgradeRoom_bodyInput {
"""The new version for the room."""
new_version: String!
}
type Results {
"""Describes which categories to search in and their criteria."""
search_categories: Result_Categories!
}
"""Describes which categories to search in and their criteria."""
type Result_Categories {
"""Mapping of category name to search criteria."""
room_events: Result_Room_Events
}
"""Mapping of category name to search criteria."""
type Result_Room_Events {
"""An approximate count of the total number of results found."""
count: Int
"""
Any groups that were requested.
The outer ``string`` key is the group key requested (eg: ``room_id``
or ``sender``). The inner ``string`` key is the grouped value (eg:
a room's ID or a user's ID).
"""
groups: JSON
"""
List of words which should be highlighted, useful for stemming which may change the query terms.
"""
highlights: [String!]
"""
Token that can be used to get the next batch of
results, by passing as the `next_batch` parameter to
the next call. If this field is absent, there are no
more results.
"""
next_batch: String
"""List of results in the requested order."""
results: Results
"""
The current state for every room in the results.
This is included if the request had the
``include_state`` key set with a value of ``true``.
The ``string`` key is the room ID for which the ``State
Event`` array belongs to.
"""
state: JSON
}
input param_search_bodyInput {
"""Describes which categories to search in and their criteria."""
search_categories: CategoriesInput!
}
"""Describes which categories to search in and their criteria."""
input CategoriesInput {
"""Mapping of category name to search criteria."""
room_events: Room_Events_CriteriaInput
}
"""Mapping of category name to search criteria."""
input Room_Events_CriteriaInput {
"""
Configures whether any context for the events
returned are included in the response.
"""
event_context: Include_Event_ContextInput
"""This takes a `filter`_."""
filter: FilterInput
"""
Requests that the server partitions the result set
based on the provided list of keys.
"""
groupings: GroupingsInput
"""
Requests the server return the current state for
each room returned.
"""
include_state: Boolean
"""The keys to search. Defaults to all."""
keys: [String!]
"""
The order in which to search for results.
By default, this is ``"rank"``.
"""
order_by: String
"""The string to search events for"""
search_term: String!
}
"""
Configures whether any context for the events
returned are included in the response.
"""
input Include_Event_ContextInput {
"""
How many events after the result are
returned. By default, this is ``5``.
"""
after_limit: Int
"""
How many events before the result are
returned. By default, this is ``5``.
"""
before_limit: Int
"""
Requests that the server returns the
historic profile information for the users
that sent the events that were returned.
By default, this is ``false``.
"""
include_profile: Boolean
}
"""
Requests that the server partitions the result set
based on the provided list of keys.
"""
input GroupingsInput {
"""List of groups to request."""
group_by: [GroupInput!]
}
"""Configuration for group."""
input GroupInput {
"""Key that defines the group."""
key: String
}
input bodyInput {
"""
The messages to send. A map from user ID, to a map from
device ID to message body. The device ID may also be `*`,
meaning all known devices for the user.
"""
messages: JSON
}
type defineFilter_response {
"""
The ID of the filter that was created. Cannot start
with a ``{`` as this character is used to determine
if the filter provided is inline JSON or a previously
declared filter by homeservers on some APIs.
"""
filter_id: String!
}
type requestOpenIdToken_response {
"""
An access token the consumer may use to verify the identity of
the person who generated the token. This is given to the federation
API ``GET /openid/userinfo`` to verify the user's identity.
"""
access_token: String!
"""
The number of seconds before this token expires and a new one must
be generated.
"""
expires_in: Int!
"""
The homeserver domain the consumer should use when attempting to
verify the user's identity.
"""
matrix_server_name: String!
"""The string ``Bearer``."""
token_type: String!
}
input param_setRoomTag_bodyInput {
"""
A number in a range ``[0,1]`` describing a relative
position of the room under the given tag.
"""
order: Float
}
type searchUserDirectory_response {
"""Indicates if the result list has been truncated by the limit."""
limited: Boolean!
"""Ordered by rank and then whether or not profile info is available."""
results: [User!]!
}
type User {
"""The avatar url, as an MXC, if one exists."""
avatar_url: String
"""The display name of the user, if one exists."""
display_name: String
"""The user's matrix user ID."""
user_id: String!
}
input param_searchUserDirectory_bodyInput {
"""The maximum number of results to return. Defaults to 10."""
limit: Int
"""The term to search for"""
search_term: String!
}
type uploadContent_response {
"""The `MXC URI`_ to the uploaded content."""
content_uri: String!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment