Reputation: 35
When I am trying to run Data hub flow from REST API using the POST method, I am getting bad request error. I am using postman to run the below flow. I have followed the documentation https://docs.marklogic.com/datahub/flows/run-flow-using-rest-client-api.html
But I am able to run the flow using gradle tasks. Can any one help me?
http://localhost:8230/v1/resources/ml:runFlow?rs:flow-name=flow_name&rs:step=1
I am getting following error
{ "errorResponse": { "statusCode": 400, "status": "Bad Request", "messageCode": "XDMP-ARGTYPE", "message": "XDMP-ARGTYPE: cts.query(\"cts.andQuery([cts.collectionQuery(\\"test_coll"\\"), ...\") -- arg1 is not of type Node" }
Upvotes: 3
Views: 410
Reputation: 256
In order to use the mlRunFlow REST extension, URIs of the documents must be passed into the endpoint. The endpoint must be driven by en external orchestration tool to manage batching/threads and work distribution. You can read more about batching/threads performance considerations here.
You're encountering that error message due to an attempt to a portion of the code attempting to run against an entire set of documents matching a source query when the URIs aren't present. That isn't supported and the endpoint should be throwing an explicit error about the missing URIs. I've filed a GitHub issue here.
Upvotes: 2