Interface FilterApi
-
@Path("/_matrix/client/r0/user") @Consumes("application/json") @Produces("application/json") public interface FilterApi
Filters can be created on the server and can be passed as as a parameter to APIs which return events. These filters alter the data returned from those APIs. Not all APIs accept filters.
-
-
Method Summary
Modifier and Type Method Description void
getFilter(String userId, String filterId, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse, javax.ws.rs.core.SecurityContext securityContext)
Download a filter.default void
uploadFilter(String userId, FilterData filterData, javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.ws.rs.container.AsyncResponse asyncResponse, javax.ws.rs.core.SecurityContext securityContext)
Uploads a new filter definition to the homeserver.
-
-
-
Method Detail
-
uploadFilter
@POST @Path("/{userId}/filter") default void uploadFilter(@PathParam("userId") String userId, FilterData filterData, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @Context javax.ws.rs.core.SecurityContext securityContext)
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.
Requires auth: Yes.
Return:FilterResponse
.Status code 200: The filter was created.
- Parameters:
userId
- Required. The id of the user uploading the filter. The access token must be authorized to make requests for this user id.filterData
- JSON body parameters.uriInfo
- Request Information.httpHeaders
- Http headers.asyncResponse
- Asynchronous response.securityContext
- Security context.
-
getFilter
@GET @Path("/{userId}/filter/{filterId}") void getFilter(@PathParam("userId") String userId, @PathParam("filterId") String filterId, @Context javax.ws.rs.core.UriInfo uriInfo, @Context javax.ws.rs.core.HttpHeaders httpHeaders, @Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @Context javax.ws.rs.core.SecurityContext securityContext)
Download a filter.
Requires auth: Yes.
Return:FilterData
.Status code 200: "The filter defintion".
Status code 404: Unknown filter.
- Parameters:
userId
- Required. The user ID to download a filter for.filterId
- Required. The filter ID to download.uriInfo
- Request Information.httpHeaders
- Http headers.asyncResponse
- Asynchronous response.securityContext
- Security context.
-
-