[FLINK-5646] [docs] Document JAR upload with the REST API This closes #3722
Project: http://git-wip-us.apache.org/repos/asf/flink/repo Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/97ca03a0 Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/97ca03a0 Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/97ca03a0 Branch: refs/heads/master Commit: 97ca03a0dc7f9444d40ea884bfb1e0305d6703e2 Parents: 0391e41 Author: hamstah <hamstahg...@gmail.com> Authored: Sat Apr 15 15:34:14 2017 +0100 Committer: Stephan Ewen <se...@apache.org> Committed: Thu Apr 20 10:52:37 2017 +0200 ---------------------------------------------------------------------- docs/monitoring/rest_api.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flink/blob/97ca03a0/docs/monitoring/rest_api.md ---------------------------------------------------------------------- diff --git a/docs/monitoring/rest_api.md b/docs/monitoring/rest_api.md index a53067d..c5efcc2 100644 --- a/docs/monitoring/rest_api.md +++ b/docs/monitoring/rest_api.md @@ -660,6 +660,19 @@ The `savepointPath` points to the external path of the savepoint, which can be u It is possible to upload, run, and list Flink programs via the REST APIs and web frontend. +#### Upload a new JAR file + +Send a `POST` request to `/jars/upload` with your jar file sent as multi-part data under the `jarfile` file. +Also make sure that the multi-part data includes the `Content-Type` of the file itself, some http libraries do not add the header by default. + +The multi-part payload should start like + +``` +------BoundaryXXXX +Content-Disposition: form-data; name="jarfile"; filename="YourFileName.jar" +Content-Type: application/x-java-archive +``` + #### Run a Program (POST) Send a `POST` request to `/jars/:jarid/run`. The `jarid` parameter is the file name of the program JAR in the configured web frontend upload directory (configuration key `jobmanager.web.upload.dir`).