This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch fix/CAMEL-25116-4.22.x in repository https://gitbox.apache.org/repos/asf/camel.git
commit 7b211ec80d79051c3ee8fc103be5677830f97725 Author: Claus Ibsen <[email protected]> AuthorDate: Mon Sep 28 11:56:18 2026 +0200 chore: camel-platform-http-main - Document listing files with /q/download Document how the /q/download management endpoint lists and serves files. Without a file name only route source files are listed; ?classpath=true also lists classpath resources, an Ant-style pattern filters the list, and Accept: text/html returns the list as links. /q/download/{name} resolves from the classpath first, so unlisted classpath files can still be downloaded. The classpath=true option was previously undocumented. Closes #26982 Signed-off-by: Claus Ibsen <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> (cherry picked from commit 6567486f108c6b0d13ee78c865df6bf4fe3e974f) --- .../camel/catalog/docs/platform-http-main.adoc | 35 ++++++++++++++++++++++ .../src/main/docs/platform-http-main.adoc | 35 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/platform-http-main.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/platform-http-main.adoc index 824d6fb7d15b..56622c5c085f 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/platform-http-main.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/platform-http-main.adoc @@ -42,6 +42,41 @@ These features are as follows: You configure these features in the `application.properties` file using the `camel.server.xxx` and `camel.management.xxx` options. +=== Downloading files + +File download is enabled with `camel.management.downloadEnabled=true`. + +Calling `/q/download` without a file name returns a list of the files that can be downloaded. +By default, the list only contains the source files of the routes (such as `*.camel.yaml` files). +To also list the resources from the classpath, add the `classpath=true` query parameter: + +[source,bash] +---- +# list route source files +curl http://localhost:8080/q/download + +# list route source files and all classpath resources +curl http://localhost:8080/q/download?classpath=true +---- + +The list can be filtered with an Ant-style pattern as the file name, for example to list only the properties files: + +[source,bash] +---- +curl http://localhost:8080/q/download/*.properties?classpath=true +---- + +When the `Accept` header includes `html` (such as from a web browser), the list is returned as HTML links. + +To download a file, call `/q/download/` followed by the file name. The file is resolved from the classpath +first, and then from the route source files. A file on the classpath can be downloaded even if it is not listed +(when not using `classpath=true`). + +[source,bash] +---- +curl http://localhost:8080/q/download/application.properties +---- + == JWT authentication The embedded HTTP server can validate JWT bearer tokens on incoming requests. diff --git a/components/camel-platform-http-main/src/main/docs/platform-http-main.adoc b/components/camel-platform-http-main/src/main/docs/platform-http-main.adoc index 824d6fb7d15b..56622c5c085f 100644 --- a/components/camel-platform-http-main/src/main/docs/platform-http-main.adoc +++ b/components/camel-platform-http-main/src/main/docs/platform-http-main.adoc @@ -42,6 +42,41 @@ These features are as follows: You configure these features in the `application.properties` file using the `camel.server.xxx` and `camel.management.xxx` options. +=== Downloading files + +File download is enabled with `camel.management.downloadEnabled=true`. + +Calling `/q/download` without a file name returns a list of the files that can be downloaded. +By default, the list only contains the source files of the routes (such as `*.camel.yaml` files). +To also list the resources from the classpath, add the `classpath=true` query parameter: + +[source,bash] +---- +# list route source files +curl http://localhost:8080/q/download + +# list route source files and all classpath resources +curl http://localhost:8080/q/download?classpath=true +---- + +The list can be filtered with an Ant-style pattern as the file name, for example to list only the properties files: + +[source,bash] +---- +curl http://localhost:8080/q/download/*.properties?classpath=true +---- + +When the `Accept` header includes `html` (such as from a web browser), the list is returned as HTML links. + +To download a file, call `/q/download/` followed by the file name. The file is resolved from the classpath +first, and then from the route source files. A file on the classpath can be downloaded even if it is not listed +(when not using `classpath=true`). + +[source,bash] +---- +curl http://localhost:8080/q/download/application.properties +---- + == JWT authentication The embedded HTTP server can validate JWT bearer tokens on incoming requests.
