Unable to Invoke Lite-Embedded Request-Response Flow via POST in Nussknacker
Hi Team,
I’ve created a scenario in Nussknacker with the following setup:
- Processing Mode: Request-Response
- Engine: Lite-Embedded
- Slug Name: TestRequestResponseFlow
- Flow Name: Test-Request-Response-Flow
Input Schema: { "type": "object", "properties": { "incoming": { "type": "object", "properties": { "first": { "type": "string" }, "last": { "type": "string" } }, "required": ["first", "last"] } } }
Output Schema: { "type": "object", "properties": { "outgoing": { "type": "object", "properties": { "first": { "type": "string" }, "last": { "type": "string" } }, "required": ["first", "last"] } } }
I’ve added a source and connected it to a sink. After saving and deploying the flow, the UI shows the scenario is running successfully.
However, I’m unclear about the correct URL to invoke the flow.
I tried the following request: curl -X POST http://:8080/TestRequestResponseFlow -H "Content-Type: application/json" -u admin:admin -d '{ "incoming": { "first": "John", "last": "Doe" } }'
But I received the following response: HTTP method not allowed, supported methods: GET
Can someone please help me understand:
What is the correct endpoint to hit for a Lite-Embedded Request-Response flow? Is there a specific method or URL structure I should follow? Thanks in advance!
Hi team,
Could someone please assist me with this?
Thanks in Advance
Hi. To communicate with a scenario, you should access the dedicated 8181 port. So, in your case, the cURL invocation will look like:
curl -X POST http://host:8181/scenario/TestRequestResponseFlow ...
You can also access swagger-ui at http://host:8181/scenario/TestRequestResponseFlow/