Request Handlers
Introduction
The Mendix Runtime receives requests through various request handlers. Standard request handlers handle the communication between the Mendix client and the runtime server. Service endpoints expose the services that your app publishes. You can also create custom request handlers for your own purposes.
Standard Request Handlers
The following standard request handlers are used:
| Name | Endpoint | Description |
|---|---|---|
| Resources | / |
Serves static files, such as the index.html. |
| XAS | /xas |
Handles the client/runtime communication. See Communication Patterns in the Mendix Runtime for more information. |
| File | /file |
Handles file uploads and downloads from the Mendix client. |
| Page/Microflow URLs | /p (default) |
Handles opening pages and executing microflows that have a URL configured. The endpoint can be configured in the app settings. |
| PWA Manifest | /manifest.webmanifest |
Serves the manifest file that is required for PWA applications. |
| Mx Dev Tools | /mxdevtools |
Websocket endpoint that handles client logs and nanoflow debugging. Only enabled during development. |
| Debugger | /debugger |
Endpoint that can be used to debug Mendix Apps. |
Admin Port Request Handlers
| Name | Endpoint | Description |
|---|---|---|
| Root | / |
Used to perform different operations on the admin port. |
root (/) URL is not exposed to clients. It uses a different port from the standard request handlers and is only accessible to system administrators.
Service Endpoints
Apps that contain published services expose endpoints for handling service requests and for documentation.
Published Service Request Handlers
Published REST services and published OData services register their own request handlers, based on the location that you configure for each service. For example, a published REST service with the location rest/myservice/v1 is served on /rest/myservice/v1.
If the app contains published web services, the /ws request handler handles the web service requests.
Documentation Endpoints
The following endpoints provide documentation for the services published by your app:
| Endpoint | Enabled When | Description |
|---|---|---|
/api-doc |
The app contains a published REST, OData, or web service. | Overview page that links to the other documentation endpoints. See Mendix Runtime. |
/rest-doc |
The app contains a published REST service. | Serves the OpenAPI documentation of all published REST services. |
/odata-doc |
The app contains a published OData service. | Serves the API documentation of all published OData services. See API Documentation. |
/ws-doc |
The app contains a published web service. | Serves the documentation of all published web services, including its WSDL. |
Restricting Access to Documentation Endpoints
The Mendix runtime has no setting to disable documentation endpoints. Mendix Cloud denies access to the documentation endpoints by default (see Default Settings in Restrict Access for Incoming Requests). On other deployment platforms, you can restrict access to these paths with a reverse proxy or a web application firewall (WAF).
For more information, see Path-Based Access Restrictions in Environment Details and Applying Access Restrictions to Unnecessary Request Handlers in Implement Best Practices for App Security.
Custom Request Handlers
Custom request handlers can be added using the com.mendix.core.Core#addRequestHandler({name of the request handler}) API call.