HI Experts, I am trying to trigger a savepoint from Flink REST API on version 1.6 , in the document it shows that I need to pass a json as a request body { "type" : "object”, "id" : "urn:jsonschema:org:apache:flink:runtime:rest:messages:job:savepoints:SavepointTriggerRequestBody”, "properties" : { "target-directory" : { "type" : "string" }, "cancel-job" : { "type" : "boolean" } } } So I send the following json as { "type":"object”, "id":"urn:jsonschema:org:apache:flink:runtime:rest:messages:job:savepoints:SavepointTriggerRequestBody”, "properties”:{ "target-directory":"hdfs:///flinkDsl”, "cancel-job”:false } }
And I use okhttp to send the request: val MEDIA_TYPE_JSON = MediaType.parse("application/json; charset=utf-8") val body = RequestBody.create(MEDIA_TYPE_JSON, postBody) val request = new Request.Builder() .url(url) .post(body) .build() client.newCall(request).execute() but get an error {"errors":["Request did not match expected format SavepointTriggerRequestBody.”]} Would anyone give an example of how to invoke the post rest api of Flink? Thanks a lot. Best Henry