From 23de5d31ee448c13a2812e8e6b38c2adf74d8952 Mon Sep 17 00:00:00 2001 From: Joost Verhoog Date: Fri, 30 Oct 2026 11:05:21 +0100 Subject: [PATCH] Add service request handlers --- content/en/docs/refguide/runtime/_index.md | 2 +- .../docs/refguide/runtime/request-handlers.md | 29 ++++++++++++++++++- content/en/docs/refguide10/runtime/_index.md | 2 +- .../refguide10/runtime/request-handlers.md | 29 ++++++++++++++++++- 4 files changed, 58 insertions(+), 4 deletions(-) diff --git a/content/en/docs/refguide/runtime/_index.md b/content/en/docs/refguide/runtime/_index.md index bcdc5bb1c6f..8f78955c58a 100644 --- a/content/en/docs/refguide/runtime/_index.md +++ b/content/en/docs/refguide/runtime/_index.md @@ -85,7 +85,7 @@ You need a license to run an application in production mode. Without a license, You can extend the functionality of the Runtime Server by writing Java actions. For more information, see the [Mendix Runtime API](/apidocs-mxsdk/apidocs/runtime-api-11/). {{% alert color="info" %}} -If the app contains published services, links to available API documentation such as [OpenAPI documentation](/refguide/open-api/) for [published REST services](/refguide/published-rest-services/), links to [published OData/GraphQL services](/refguide/published-odata-services/), and WSDLs for [published web services](/refguide/published-web-services/), are available on the URL path `/api-doc` (for example: `https://myapp.mendixcloud.com/api-doc/`). +If the app contains published services, links to available API documentation such as [OpenAPI documentation](/refguide/open-api/) for [published REST services](/refguide/published-rest-services/), links to [published OData/GraphQL services](/refguide/published-odata-services/), and WSDLs for [published web services](/refguide/published-web-services/), are available on the URL path `/api-doc` (for example: `https://myapp.mendixcloud.com/api-doc/`). For more information, see [Service Endpoints](/refguide/request-handlers/#service-endpoints) in *Request Handlers*. {{% /alert %}} ## Documents in This Category diff --git a/content/en/docs/refguide/runtime/request-handlers.md b/content/en/docs/refguide/runtime/request-handlers.md index 7628d866860..ea93c97648f 100644 --- a/content/en/docs/refguide/runtime/request-handlers.md +++ b/content/en/docs/refguide/runtime/request-handlers.md @@ -7,7 +7,7 @@ weight: 45 ## Introduction -Communication between the Mendix client and the runtime server happens through various different request handlers. +The Mendix Runtime receives requests through various request handlers. Standard request handlers handle the communication between the Mendix client and the runtime server. Other request handlers expose the services that your app publishes. ## Standard Request Handlers @@ -33,6 +33,33 @@ The following standard request handlers are used: 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. {{% /alert %}} +## Service Endpoints {#service-endpoints} + +Apps that contain published services expose additional endpoints for handling service requests and for documentation. + +### Published Service Request Handlers {#published-service-handlers} + +[Published REST services](/refguide/published-rest-services/) and [published OData services](/refguide/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 {#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](/refguide/runtime/#apis). | +| `/rest-doc` | The app contains a [published REST service](/refguide/published-rest-services/). | Serves the [OpenAPI documentation](/refguide/open-api/) of each published REST service. | +| `/odata-doc` | The app contains a [published OData service](/refguide/published-odata-services/). | Serves the API documentation of each published OData service. See [API Documentation](/refguide/published-odata-services/#api-documentation). | +| `/ws-doc` | The app contains a [published web service](/refguide/published-web-services/). | Serves the documentation of each published web service, including its WSDL. | + +#### Restricting Access to Documentation Endpoints {#restricting-access} + +Mendix Cloud denies access to the documentation endpoints by default. The runtime has no setting to disable them. On other deployments, 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](/developerportal/deploy/environments-details/#path-based-restrictions) and [Applying Access Restrictions to Unnecessary Request Handlers](/howto/security/best-practices-security/#request-handlers). + ## Custom Request Handlers Custom request handlers can be added using the `com.mendix.core.Core#addRequestHandler({name of the request handler})` API call. diff --git a/content/en/docs/refguide10/runtime/_index.md b/content/en/docs/refguide10/runtime/_index.md index 8707a3bf712..321cb044b1c 100644 --- a/content/en/docs/refguide10/runtime/_index.md +++ b/content/en/docs/refguide10/runtime/_index.md @@ -85,7 +85,7 @@ You need a license to run an application in production mode. Without a license, You can extend the functionality of the Runtime Server by writing Java actions. For more information, see the [Mendix Runtime API](/apidocs-mxsdk/apidocs/runtime-api-10/). {{% alert color="info" %}} -If the app contains published services, links to available API documentation such as [OpenAPI documentation](/refguide10/open-api/) for [published REST services](/refguide10/published-rest-services/), links to [published OData/GraphQL services](/refguide10/published-odata-services/), and WSDLs for [published web services](/refguide10/published-web-services/), are available on the URL path `/api-doc` (for example: `https://myapp.mendixcloud.com/api-doc/`). +If the app contains published services, links to available API documentation such as [OpenAPI documentation](/refguide10/open-api/) for [published REST services](/refguide10/published-rest-services/), links to [published OData/GraphQL services](/refguide10/published-odata-services/), and WSDLs for [published web services](/refguide10/published-web-services/), are available on the URL path `/api-doc` (for example: `https://myapp.mendixcloud.com/api-doc/`). For more information, see [Service Endpoints](/refguide10/request-handlers/#service-endpoints) in *Request Handlers*. {{% /alert %}} ## Documents in This Category diff --git a/content/en/docs/refguide10/runtime/request-handlers.md b/content/en/docs/refguide10/runtime/request-handlers.md index 63a8a57c223..10dfb081b64 100644 --- a/content/en/docs/refguide10/runtime/request-handlers.md +++ b/content/en/docs/refguide10/runtime/request-handlers.md @@ -7,7 +7,7 @@ weight: 45 ## Introduction -Communication between the Mendix client and the runtime server happens through various different request handlers. +The Mendix Runtime receives requests through various request handlers. Standard request handlers handle the communication between the Mendix client and the runtime server. Other request handlers expose the services that your app publishes. ## Standard Request Handlers @@ -22,6 +22,33 @@ The following standard request handlers are used: | PWA Manifest | `/manifest.webmanifest` | Serves the manifest file that is required for [PWA applications](/refguide10/mobile/introduction-to-mobile-technologies/progressive-web-app/). | | Mx Dev Tools | `/mxdevtools` | Websocket endpoint that handles client logs and nanoflow debugging. Only enabled during development. | +## Service Endpoints {#service-endpoints} + +Apps that contain published services expose additional endpoints for handling service requests and for documentation. + +### Published Service Request Handlers {#published-service-handlers} + +[Published REST services](/refguide10/published-rest-services/) and [published OData services](/refguide10/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 {#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](/refguide10/runtime/#apis). | +| `/rest-doc` | The app contains a [published REST service](/refguide10/published-rest-services/). | Serves the [OpenAPI documentation](/refguide10/open-api/) of each published REST service. | +| `/odata-doc` | The app contains a [published OData service](/refguide10/published-odata-services/). | Serves the API documentation of each published OData service. See [API Documentation](/refguide10/published-odata-services/#api-documentation). | +| `/ws-doc` | The app contains a [published web service](/refguide10/published-web-services/). | Serves the documentation of each published web service, including its WSDL. | + +#### Restricting Access to Documentation Endpoints {#restricting-access} + +Mendix Cloud denies access to the documentation endpoints by default. The runtime has no setting to disable them. On other deployments, 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](/developerportal/deploy/environments-details/#path-based-restrictions) and [Applying Access Restrictions to Unnecessary Request Handlers](/howto10/security/best-practices-security/#request-handlers). + ## Custom Request Handlers Custom request handlers can be added using the `com.mendix.core.Core#addRequestHandler({name of the request handler})` API call.