I am struggling to automatically deploy new Flink jobs within our CI/CD workflows by using the Flink rest-api (which may be found here in the flink Github repository).
Documentation only says that that jar upload may be achieved by using /jars/upload
, but not how exactly a valid rest request has to be build (which Headers
, which Body
type, which Authorization
, which Method
and so on).
So I took a look at the Flink dashboard code of flink/flink-runtime-web
project on Github and searched for the implementation they used to upload a jar and - Yippie! Its implemented by calling the rest-api I am trying to use (using POST
as method). After that I tried to figure out with Postman which is correct way to send requests using different Content-Type
headers and Body
types, but none of them worked for me now.
I would have filed a ticket directly to the flink project, but could not find any reference to their ticket system.
So the basic Question here is:
/jars/upload
to successfully upload a file? Those who are more partial to a command line can use curl:
curl -X POST -H "Expect:" -F "jarfile=@path/to/flink-job.jar" http://hostname:8081/jars/upload
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With