Error running graph using Simple HTTP API

Support/help with CloverETL (4.9) and CloverDX (5.0 or newer) implementation problems

hewills
Posts: 21
Joined: Tue Apr 18, 2017 4:18 pm
Location: CA

Error running graph using Simple HTTP API

Postby hewills » Mon Feb 25, 2019 7:03 pm

I'm using CloverDX 5.1, and I'm trying to run a graph using the Simple HTTP API.

This is working fine for me:
curl --header "X-Requested-By: arbitrary_value" http://<user>:<****>@<hostname>:<port>/clover/simpleHttpApi/help

But when I try to run the command below, I get an error:

curl --header "X-Requested-By: arbitrary_value" http://<user>:<****>@<hostname>:<port>/clover/simpleHttpApi/graph_run?sandbox=Mysandbox&graphID=/graph/Jobs/Prod/Sample.grf

This is the error:
Error running job: sandbox = Mysandbox, job file = null!
=> null'graphID' is not recognized as an internal or external command, operable program or batch file.

It picks up the first parameter, but never the second. If I switch the sandbox and graphID parameter locations, it will read the graph path, but not the sandbox.

This is the error:
Error running job: sandbox = null, job file = /graph/Jobs/Prod/Sample.grf
=> Execution failed.
=> Error loading job file: sandbox://default//graph/Jobs/Prod/Sample.grf
=> /graph/Jobs/Prod/Sample.grf'sandbox' is not recognized as an internal or external command, operable program or batch file.

Am I using the wrong syntax? It doesn't seem to be reading the second parameter.

hewills
Posts: 21
Joined: Tue Apr 18, 2017 4:18 pm
Location: CA

Re: Error running graph using Simple HTTP API

Postby hewills » Tue Feb 26, 2019 8:38 pm

I figured out what I was missing.
I needed to enclose the full URL in double quotes.

Example:

curl --header "X-Requested-By: arbitrary_value" "http://<user>:<****>@<hostname>:<port>/clover/simpleHttpApi/graph_run?sandbox=Mysandbox&graphID=/graph/Jobs/Prod/Sample.grf
"


cron