Interface FederationV1Api


  • @Path("/_matrix/federation/v1")
    @Consumes("application/json")
    @Produces("application/json")
    public interface FederationV1Api
    Matrix homeservers use the Federation APIs (also known as server-server APIs) to communicate with each other. Homeservers use these APIs to push messages to each other in real-time, to request historic messages from each other, and to query profile and presence information about users on each other's servers.
    The APIs are implemented using HTTPS GETs and PUTs between each of the servers. These HTTPS requests are strongly authenticated using public key signatures at the TLS transport layer and using public key signatures in HTTP Authorization headers at the HTTP layer.
    • Method Summary

      Modifier and Type Method Description
      void backfill​(String roomId, String parentId, Long limit, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Retrieves a sliding-window history of previous PDUs that occurred on the given room.
      void event​(String eventId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Retrieves a single event.
      void eventAuth​(String roomId, String eventId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Retrieves the complete auth chain for a given event.
      void exchangeThirdPartyInvite​(String roomId, ThirdPartyInvite request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      The receiving server will verify the partial m.room.member event given in the request body.
      void getMissingEvents​(String roomId, Integer limit, Integer minDepth, List<String> earliestEvents, List<String> latestEvents, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Retrieves previous events that the sender is missing.
      void invite​(String roomId, String eventId, InviteV1Request request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Invites a remote user to a room.
      void makeJoin​(String roomId, String userId, List<String> ver, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Asks the receiving server to return information that the sending server will need to prepare a join event to get into the room.
      void makeLeave​(String roomId, String userId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Asks the receiving server to return information that the sending server will need to prepare a leave event to get out of the room.
      void onBind​(OnBindRequest onBindRequest, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Used by identity servers to notify the homeserver that one of its users has bound a third party identifier successfully, including any pending room invites the identity server has been made aware of.
      void publicRooms​(Integer limit, String since, Boolean includeAllNetworks, String thirdPartyInstanceId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Gets all the public rooms for the homeserver.
      void queryAuth​(String roomId, String eventId, QueryAuth request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Compares the auth chain provided with what the receiving server has for the room ID and event ID combination.
      void queryDirectory​(String roomAlias, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Performs a query to get the mapped room ID and list of resident homeservers in the room for a given room alias.
      void queryProfile​(String userId, String field, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Performs a query to get profile information, such as a display name or avatar, for a given user.
      void send​(String txnId, Transaction transaction, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Push messages representing live activity to another server.
      void sendJoin​(String roomId, String eventId, SendRequest request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Submits a signed join event to the resident server for it to accept it into the room's graph.
      void sendLeave​(String roomId, String eventId, SendRequest request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Submits a signed leave event to the resident server for it to accept it into the room's graph.
      void state​(String roomId, String eventId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Retrieves a snapshot of a room's state at a given event.
      void stateIds​(String roomId, String eventId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Retrieves a snapshot of a room's state at a given event, in the form of event IDs.
      void userDevices​(String userId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Gets information on all of the user's devices.
      void userInfo​(String accessToken, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Exchanges an OpenID access token for information about the user who generated the token.
      void userKeysClaim​(KeyClaimRequest request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Claims one-time keys for use in pre-key messages.
      void userKeysQuery​(KeyQueryRequest request, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse)
      Returns the current devices and identity keys for the given users.
    • Method Detail

      • send

        @PUT
        @Path("/send/{txnId}")
        void send​(@PathParam("txnId")
                  String txnId,
                  Transaction transaction,
                  @Context
                  javax.ws.rs.core.UriInfo uriInfo,
                  @Context
                  javax.ws.rs.core.HttpHeaders httpHeaders,
                  @Suspended
                  javax.ws.rs.container.AsyncResponse asyncResponse)
        Push messages representing live activity to another server. The destination name will be set to that of the receiving server itself. Each embedded PDU in the transaction body will be processed.
        Return: List of int and PduProcessingResults.

        Status code 200: The result of processing the transaction. The server is to use this response even in the event of one or more PDUs failing to be processed.

        Parameters:
        txnId - Required. The transaction ID.
        transaction - transaction data.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • eventAuth

        @GET
        @Path("/event_auth/{roomId}/{eventId}")
        void eventAuth​(@PathParam("roomId")
                       String roomId,
                       @PathParam("eventId")
                       String eventId,
                       @Context
                       javax.ws.rs.core.UriInfo uriInfo,
                       @Context
                       javax.ws.rs.core.HttpHeaders httpHeaders,
                       @Suspended
                       javax.ws.rs.container.AsyncResponse asyncResponse)
        Retrieves the complete auth chain for a given event.
        Return: List of the PersistedDataUnit.

        Status code 200: The auth chain for the event.

        Parameters:
        roomId - Required. The room ID to get the auth chain for.
        eventId - Required. The event ID to get the auth chain of.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • queryAuth

        @POST
        @Path("/query_auth/{roomId}/{eventId}")
        void queryAuth​(@PathParam("roomId")
                       String roomId,
                       @PathParam("eventId")
                       String eventId,
                       QueryAuth request,
                       @Context
                       javax.ws.rs.core.UriInfo uriInfo,
                       @Context
                       javax.ws.rs.core.HttpHeaders httpHeaders,
                       @Suspended
                       javax.ws.rs.container.AsyncResponse asyncResponse)
        Compares the auth chain provided with what the receiving server has for the room ID and event ID combination.
        The auth difference can be calculated in two parts, where the "remote auth" is the auth chain provided by the sending server and the "local auth" is the auth chain the receiving server has. With those lists, the algorithm works bottom-up after sorting each chain by depth then by event ID. The differences are then discovered and returned as the response to this API call.
        Return: QueryAuth. Requires auth: Yes.

        Status code 200: The auth chain differences, as determined by the receiver.

        Parameters:
        roomId - Required. The room ID to compare the auth chain in.
        eventId - Required. The event ID to compare the auth chain of.
        request - Request JSON body.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • backfill

        @GET
        @Path("/backfill/{roomId}")
        void backfill​(@PathParam("roomId")
                      String roomId,
                      @QueryParam("v")
                      String parentId,
                      @QueryParam("limit")
                      Long limit,
                      @Context
                      javax.ws.rs.core.UriInfo uriInfo,
                      @Context
                      javax.ws.rs.core.HttpHeaders httpHeaders,
                      @Suspended
                      javax.ws.rs.container.AsyncResponse asyncResponse)
        Retrieves a sliding-window history of previous PDUs that occurred on the given room. Starting from the PDU ID(s) given in the "v" argument, the PDUs that preceded it are retrieved, up to a total number given by the "limit".
        Return: Transaction.

        Status code 200: A transaction containing the PDUs that preceded the given event(s), including the given event(s), up to the given limit.

        Parameters:
        roomId - Required. The room ID to backfill.
        parentId - Required. The event IDs to backfill from.
        limit - Required. The maximum number of PDUs to retrieve, including the given events.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • getMissingEvents

        @POST
        @Path("/get_missing_events/{roomId}")
        void getMissingEvents​(@PathParam("roomId")
                              String roomId,
                              @QueryParam("limit")
                              Integer limit,
                              @QueryParam("min_depth")
                              Integer minDepth,
                              @QueryParam("earliest_events")
                              List<String> earliestEvents,
                              @QueryParam("latest_events")
                              List<String> latestEvents,
                              @Context
                              javax.ws.rs.core.UriInfo uriInfo,
                              @Context
                              javax.ws.rs.core.HttpHeaders httpHeaders,
                              @Suspended
                              javax.ws.rs.container.AsyncResponse asyncResponse)
        Retrieves previous events that the sender is missing. This is done by doing a breadth-first walk of the prev_events for the latest_events, ignoring any events in earliest_events and stopping at the limit.
        Requires auth: Yes. Return: List of the List of the PersistedDataUnit.

        Status code 200: The previous events for latest_events, excluding any earliest_events, up to the provided limit.

        Parameters:
        roomId - Required. The room ID to search in.
        limit - The maximum number of events to retrieve. Defaults to 10.
        minDepth - The minimum depth of events to retrieve. Defaults to 0.
        earliestEvents - Required. The latest event IDs that the sender already has. These are skipped when retrieving the previous events of latest_events.
        latestEvents - Required. The event IDs to retrieve the previous events for.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • state

        @GET
        @Path("/state/{roomId}")
        void state​(@PathParam("roomId")
                   String roomId,
                   @QueryParam("event_id")
                   String eventId,
                   @Context
                   javax.ws.rs.core.UriInfo uriInfo,
                   @Context
                   javax.ws.rs.core.HttpHeaders httpHeaders,
                   @Suspended
                   javax.ws.rs.container.AsyncResponse asyncResponse)
        Retrieves a snapshot of a room's state at a given event.
        Return: StateResponse. Requires auth: Yes.

        Status code 200: The fully resolved state for the room, prior to considering any state changes induced by the requested event. Includes the authorization chain for the events.

        Parameters:
        roomId - Required. The room ID to get state for.
        eventId - Required. An event ID in the room to retrieve the state at.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • stateIds

        @GET
        @Path("/state_ids/{roomId}")
        void stateIds​(@PathParam("roomId")
                      String roomId,
                      @QueryParam("event_id")
                      String eventId,
                      @Context
                      javax.ws.rs.core.UriInfo uriInfo,
                      @Context
                      javax.ws.rs.core.HttpHeaders httpHeaders,
                      @Suspended
                      javax.ws.rs.container.AsyncResponse asyncResponse)
        Retrieves a snapshot of a room's state at a given event, in the form of event IDs. This performs the same function as calling /state/{roomId}, however this returns just the event IDs rather than the full events.
        Return: StateIdResponse.
        Requires auth: Yes.

        Status code 200: The fully resolved state for the room, prior to considering any state changes induced by the requested event. Includes the authorization chain for the events.

        Parameters:
        roomId - Required. The room ID to get state for.
        eventId - Required. An event ID in the room to retrieve the state at.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • event

        @GET
        @Path("/event/{eventId}")
        void event​(@PathParam("eventId")
                   String eventId,
                   @Context
                   javax.ws.rs.core.UriInfo uriInfo,
                   @Context
                   javax.ws.rs.core.HttpHeaders httpHeaders,
                   @Suspended
                   javax.ws.rs.container.AsyncResponse asyncResponse)
        Retrieves a single event.
        Return: PersistedDataUnit.
        Requires auth: Yes.

        Status code 200: A transaction containing a single PDU which is the event requested.

        Parameters:
        eventId - Required. The event ID to get.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • makeJoin

        @GET
        @Path("/make_join/{roomId}/{userId}")
        void makeJoin​(@PathParam("roomId")
                      String roomId,
                      @PathParam("userId")
                      String userId,
                      @QueryParam("ver")
                      List<String> ver,
                      @Context
                      javax.ws.rs.core.UriInfo uriInfo,
                      @Context
                      javax.ws.rs.core.HttpHeaders httpHeaders,
                      @Suspended
                      javax.ws.rs.container.AsyncResponse asyncResponse)
        Asks the receiving server to return information that the sending server will need to prepare a join event to get into the room.
        Requires auth: Yes. Return: MakeResponse.

        Status code 200: A template to be used for the rest of the Joining Rooms handshake. Note that events have a different format depending on the room version - check the room version specification for precise event formats. The response body here describes the common event fields in more detail and may be missing other required fields for a PDU.

        Status code 400: The request is invalid or the room the server is attempting to join has a version that is not listed in the ver parameters. The error should be passed through to clients so that they may give better feedback to users.

        Parameters:
        roomId - Required. The room ID that is about to be joined.
        userId - Required. The user ID the join event will be for.
        ver - The room versions the sending server has support for. Defaults to [1].
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • sendJoin

        @PUT
        @Path("/send_join/{roomId}/{eventId}")
        void sendJoin​(@PathParam("roomId")
                      String roomId,
                      @PathParam("eventId")
                      String eventId,
                      SendRequest request,
                      @Context
                      javax.ws.rs.core.UriInfo uriInfo,
                      @Context
                      javax.ws.rs.core.HttpHeaders httpHeaders,
                      @Suspended
                      javax.ws.rs.container.AsyncResponse asyncResponse)
        Submits a signed join event to the resident server for it to accept it into the room's graph. Note that events have a different format depending on the room version - check the room version specification for precise event formats. The request and response body here describes the common event fields in more detail and may be missing other required fields for a PDU.
        Requires auth: Yes.
        Return: list with status and RoomStateResponse.

        Status code 200: The full state for the room, having accepted the join event.

        Parameters:
        roomId - Required. The room ID that is about to be joined.
        eventId - Required. The event ID for the join event.
        request - Requires. JSON body request.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • invite

        @PUT
        @Path("/invite/{roomId}/{eventId}")
        void invite​(@PathParam("roomId")
                    String roomId,
                    @PathParam("eventId")
                    String eventId,
                    InviteV1Request request,
                    @Context
                    javax.ws.rs.core.UriInfo uriInfo,
                    @Context
                    javax.ws.rs.core.HttpHeaders httpHeaders,
                    @Suspended
                    javax.ws.rs.container.AsyncResponse asyncResponse)
        Invites a remote user to a room. Once the event has been signed by both the inviting homeserver and the invited homeserver, it can be sent to all of the servers in the room by the inviting homeserver.
        Servers should prefer to use the v2 API for invites instead of the v1 API. Servers which receive a v1 invite request must assume that the room version is either "1" or "2".
        Note that events have a different format depending on the room version - check the room version specification for precise event formats. The request and response bodies here describe the common event fields in more detail and may be missing other required fields for a PDU.
        Requires auth: Yes.
        Return: List of the Integer and EventContainer.

        Status code 200: The event with the invited server's signature added. All other fields of the events should remain untouched. Note that events have a different format depending on the room version - check the room version specification for precise event formats.

        Status code 403: The invite is not allowed. This could be for a number of reasons, including:

        • The sender is not allowed to send invites to the target user/homeserver.
        • The homeserver does not permit anyone to invite its users.
        • The homeserver refuses to participate in the room.
        Parameters:
        roomId - Required. The room ID that the user is being invited to.
        eventId - Required. The event ID for the invite event, generated by the inviting server.
        request - Invite JSON request.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • makeLeave

        @GET
        @Path("/make_leave/{roomId}/{userId}")
        void makeLeave​(@PathParam("roomId")
                       String roomId,
                       @PathParam("userId")
                       String userId,
                       @Context
                       javax.ws.rs.core.UriInfo uriInfo,
                       @Context
                       javax.ws.rs.core.HttpHeaders httpHeaders,
                       @Suspended
                       javax.ws.rs.container.AsyncResponse asyncResponse)
        Asks the receiving server to return information that the sending server will need to prepare a leave event to get out of the room.
        Requires auth: Yes.
        Return: List of the Integer and MakeResponse.

        Status code 200: A template to be used to call /send_leave. Note that events have a different format depending on the room version - check the room version specification for precise event formats. The response body here describes the common event fields in more detail and may be missing other required fields for a PDU.

        Status code 403: The request is not authorized. This could mean that the user is not in the room.

        Parameters:
        roomId - Required. The room ID that is about to be left.
        userId - Required. The user ID the leave event will be for.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • sendLeave

        @PUT
        @Path("/send_leave/{roomId}/{eventId}")
        void sendLeave​(@PathParam("roomId")
                       String roomId,
                       @PathParam("eventId")
                       String eventId,
                       SendRequest request,
                       @Context
                       javax.ws.rs.core.UriInfo uriInfo,
                       @Context
                       javax.ws.rs.core.HttpHeaders httpHeaders,
                       @Suspended
                       javax.ws.rs.container.AsyncResponse asyncResponse)
        Submits a signed leave event to the resident server for it to accept it into the room's graph. Note that events have a different format depending on the room version - check the room version specification for precise event formats. The request and response body here describes the common event fields in more detail and may be missing other required fields for a PDU.
        Requires auth: Yes.
        Return: List of Integer and EmptyResponse.

        Status code 200: An empty response to indicate the event was accepted into the graph by the receiving homeserver.

        Parameters:
        roomId - Required. The room ID that is about to be left.
        eventId - Required. The event ID for the leave event.
        request - JSON body request.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • exchangeThirdPartyInvite

        @PUT
        @Path("/exchange_third_party_invite/{roomId}")
        void exchangeThirdPartyInvite​(@PathParam("roomId")
                                      String roomId,
                                      ThirdPartyInvite request,
                                      @Context
                                      javax.ws.rs.core.UriInfo uriInfo,
                                      @Context
                                      javax.ws.rs.core.HttpHeaders httpHeaders,
                                      @Suspended
                                      javax.ws.rs.container.AsyncResponse asyncResponse)
        The receiving server will verify the partial m.room.member event given in the request body. If valid, the receiving server will issue an invite as per the Inviting to a room section before returning a response to this request.
        Requires auth: Yes.
        Return: EmptyResponse.

        Status code 200: The invite has been issued successfully.

        Parameters:
        roomId - Required. The room ID to exchange a third party invite in.
        request - JSON body request.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • onBind

        @Path("/3pid/onbind")
        @Consumes("application/json")
        @Produces("application/json")
        void onBind​(OnBindRequest onBindRequest,
                    @Context
                    javax.ws.rs.core.UriInfo uriInfo,
                    @Context
                    javax.ws.rs.core.HttpHeaders httpHeaders,
                    @Suspended
                    javax.ws.rs.container.AsyncResponse asyncResponse)
        Used by identity servers to notify the homeserver that one of its users has bound a third party identifier successfully, including any pending room invites the identity server has been made aware of. Return: EmptyResponse.

        Status code 200: The homeserver has processed the notification.

        Parameters:
        onBindRequest - Request.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • publicRooms

        @GET
        @Path("/publicRooms")
        void publicRooms​(@QueryParam("limit")
                         Integer limit,
                         @QueryParam("since")
                         String since,
                         @QueryParam("include_all_networks")
                         Boolean includeAllNetworks,
                         @QueryParam("third_party_instance_id")
                         String thirdPartyInstanceId,
                         @Context
                         javax.ws.rs.core.UriInfo uriInfo,
                         @Context
                         javax.ws.rs.core.HttpHeaders httpHeaders,
                         @Suspended
                         javax.ws.rs.container.AsyncResponse asyncResponse)
        Gets all the public rooms for the homeserver. This should not return rooms that are listed on another homeserver's directory, just those listed on the receiving homeserver's directory.
        Requires auth: Yes.
        Return: PublicRoomsResponse.

        Status code 200: The public room list for the homeserver.

        Parameters:
        limit - The maximum number of rooms to return. Defaults to 0 (no limit).
        since - A pagination token from a previous call to this endpoint to fetch more rooms.
        includeAllNetworks - Whether or not to include all networks/protocols defined by application services on the homeserver. Defaults to false.
        thirdPartyInstanceId - The specific third party network/protocol to request from the homeserver. Can only be used if include_all_networks is false.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • queryDirectory

        @GET
        @Path("/query/directory")
        void queryDirectory​(@QueryParam("room_alias")
                            String roomAlias,
                            @Context
                            javax.ws.rs.core.UriInfo uriInfo,
                            @Context
                            javax.ws.rs.core.HttpHeaders httpHeaders,
                            @Suspended
                            javax.ws.rs.container.AsyncResponse asyncResponse)
        Performs a query to get the mapped room ID and list of resident homeservers in the room for a given room alias. Homeservers should only query room aliases that belong to the target server (identified by the DNS Name in the alias).
        Servers may wish to cache the response to this query to avoid requesting the information too often.
        Requires auth: Yes.
        Return: DirectoryResponse.

        Status code 200: The corresponding room ID and list of known resident homeservers for the room.

        Status code 404: The room alias was not found.

        Parameters:
        roomAlias - Required. The room alias to query.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • queryProfile

        @GET
        @Path("/query/profile")
        void queryProfile​(@QueryParam("user_id")
                          String userId,
                          @QueryParam("field")
                          String field,
                          @Context
                          javax.ws.rs.core.UriInfo uriInfo,
                          @Context
                          javax.ws.rs.core.HttpHeaders httpHeaders,
                          @Suspended
                          javax.ws.rs.container.AsyncResponse asyncResponse)
        Performs a query to get profile information, such as a display name or avatar, for a given user. Homeservers should only query profiles for users that belong to the target server (identified by the DNS Name in the user ID).
        Servers may wish to cache the response to this query to avoid requesting the information too often.
        Requires auth: Yes.
        Return: ProfileResponse.

        Status code 200: The profile for the user. If a field is specified in the request, only the matching field should be included in the response. If no field was specified, the response should include the fields of the user's profile that can be made public, such as the display name and avatar. If the user does not have a particular field set on their profile, the server should exclude it from the response body or give it the value null.

        Status code 404: The user does not exist or does not have a profile.

        Parameters:
        userId - Required. The user ID to query.
        field - The field to query. If specified, the server will only return the given field in the response. If not specified, the server will return the full profile for the user. One of: ["displayname", "avatar_url"]
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • userInfo

        @GET
        @Path("/openid/userinfo")
        void userInfo​(@QueryParam("access_token")
                      String accessToken,
                      @Context
                      javax.ws.rs.core.UriInfo uriInfo,
                      @Context
                      javax.ws.rs.core.HttpHeaders httpHeaders,
                      @Suspended
                      javax.ws.rs.container.AsyncResponse asyncResponse)
        Exchanges an OpenID access token for information about the user who generated the token. Currently this only exposes the Matrix User ID of the owner.
        Return: UserInfoResponse.

        Status code 200: Information about the user who generated the OpenID access token.

        Status code 401: The token was not recognized or has expired.

        Parameters:
        accessToken - Required. The OpenID access token to get information about the owner for.
        uriInfo - Request Information.
        httpHeaders - http headers.
        asyncResponse - Asynchronous response.
      • userDevices

        @GET
        @Path("/user/devices/{userId}")
        void userDevices​(@PathParam("userId")
                         String userId,
                         @Context
                         javax.ws.rs.core.UriInfo uriInfo,
                         @Context
                         javax.ws.rs.core.HttpHeaders httpHeaders,
                         @Suspended
                         javax.ws.rs.container.AsyncResponse asyncResponse)
        Gets information on all of the user's devices.
        Requires auth: Yes.
        Return: DeviceResponse.

        Status code 200: The user's devices.

        Parameters:
        userId - Required. The user ID to retrieve devices for. Must be a user local to the receiving homeserver.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • userKeysClaim

        @POST
        @Path("/user/keys/claim")
        void userKeysClaim​(KeyClaimRequest request,
                           @Context
                           javax.ws.rs.core.UriInfo uriInfo,
                           @Context
                           javax.ws.rs.core.HttpHeaders httpHeaders,
                           @Suspended
                           javax.ws.rs.container.AsyncResponse asyncResponse)
        Claims one-time keys for use in pre-key messages.
        Requires auth: Yes.
        Return: Map of user ID to Map from devices to a Map from <algorithm>:<key_id> to key object.

        Status code 200: The claimed keys.

        Parameters:
        request - Required. The keys to be claimed. A map from user ID, to a map from device ID to algorithm name.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.
      • userKeysQuery

        @POST
        @Path("/user/keys/query")
        void userKeysQuery​(KeyQueryRequest request,
                           @Context
                           javax.ws.rs.core.UriInfo uriInfo,
                           @Context
                           javax.ws.rs.core.HttpHeaders httpHeaders,
                           @Suspended
                           javax.ws.rs.container.AsyncResponse asyncResponse)
        Returns the current devices and identity keys for the given users.
        Requires auth: Yes.
        Return: KeyQueryResponse.

        Status code 200: The device information.

        Parameters:
        request - JSON request.
        uriInfo - Request Information.
        httpHeaders - Http headers.
        asyncResponse - Asynchronous response.