"The revision must be specified." 删除控制器服务和连接时出现状态 400 错误请求错误

"The revision must be specified." error with status 400 Bad Request when delete controller-services and connections

我尝试通过 nifi rest 导出和导入 nifi 模板 api;但是当我尝试删除控制器服务、连接或导入模板时,我从 nifi rest api 收到响应消息 "The revision must be specified.",状态为“400 错误请求”。我不明白我必须做什么。

这是我删除控制服务的请求, request "/controller-services/{id}" (id is, The controller service id.)

curl -X DELETE \
http://localhost:8090/nifi-api/controller-services/015b1030-a099-13d3-812c-77772afcaeb0 \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \

响应是 "The revision must be specified." 状态:“400 错误请求”

有什么想法吗?

阅读 this 文章

后,我终于找到了一些关于我的错误的答案

看来你必须添加两个信息才能请求url;版本和客户端 ID。 调用并获取组件形式的 nifi 实例后,它会按照说明 here 向您发送 DTO 内的版本号 像这样:

最后我拨打了如下电话并且成功了:

curl -X DELETE \
'http://localhost:8090/nifi-api/controller-services/015b1030-a099-13d3-812c-77772afcaeb0?version=0&clientId=5ed15669-015d-1000-99cf-bc9c6f378085' \
-H 'cache-control: no-cache' \
-H 'content-type: application/x-www-form-urlencoded' \