This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch quick-fix/document-q-download in repository https://gitbox.apache.org/repos/asf/camel.git
commit e6d9a264058a63e98d56dcfd0650c1109ee8c20d Author: Claus Ibsen <[email protected]> AuthorDate: Mon Sep 28 11:08:07 2026 +0200 chore: camel-platform-http-main - Document listing files with /q/download Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../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.
