Adding new flows using curl

Hello Everyone,

I am working with node-red flow manager and trying to get, replace, delete, add and modify the flows with the help of curl command. Get, replace, delete commands are working fine but when I am trying to add new flow it is giving error.
I am working on @node-red-contrib-flow-manager.
and executing command for adding new flow is-

curl --header "Content-Type: application/json" --request POST --data '[{"id":"5a664b67.5d1fa4","type":"tab","label":"Flow ","disabled":false,"info":""}]' http://localhost:1880/flow-manager/flow-files/flow/Flow 

it is throwing an error:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>SyntaxError: Unexpected token &#39; in JSON at position 0<br> &nbsp; &nbsp;at JSON.parse (&lt;anonymous&gt;)<br> &nbsp; &nbsp;at createStrictSyntaxError (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\body-parser\lib\types\json.js:158:10)<br> &nbsp; &nbsp;at parse (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\body-parser\lib\types\json.js:83:15)<br> &nbsp; &nbsp;at C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\body-parser\lib\read.js:121:18<br> &nbsp; &nbsp;at invokeCallback (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\raw-body\index.js:224:16)<br> &nbsp; &nbsp;at done (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\raw-body\index.js:213:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (C:\Users\Admin\AppData\Roaming\npm\node_modules\node-red\node_modules\raw-body\index.js:273:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (events.js:322:22)<br> &nbsp; &nbsp;at endReadableNT (_stream_readable.js:1187:12)<br> &nbsp; &nbsp;at processTicksAndRejections (internal/process/task_queues.js:84:21)</pre>
</body>
</html>

Please tell me, is there something I am missing or how I can add new flows with the help of curl command.
Thank you.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.