Page 1 of 1

API call workflows/details no valid JSON when workflowid is string

Posted: Sat Dec 15, 2018 4:44 pm
by emcodem
Hey Steinar,

it can happen that a workflow id is a string instead of an int (in my case it happened when importing the wf that was published here in the workflow respository thread).

In that case, the returned JSON from this Api method is not a valid json so any json parser throws an error.
Possibly you could just quote all returned values, not just only strings for safety

http://desktop-uifqt86:65445/api/json/v ... ws/details

ffastrans_api_error.png
ffastrans_api_error.png (53.81 KiB) Viewed 4520 times

Re: API call workflows/details no valid JSON when workflowid is string

Posted: Sun Dec 16, 2018 9:49 pm
by admin
The "wf_id" should never be a sting with other letters than 0-9 so why you got one must be due to a bug. I have a total of 200 workflows and this has never happened. Anyway, I agree with you, the wf_id should always be reported as a string and I will take a look at that. Also, in the future the workflow ids might change to GUID-types which are strings. So, thank you for reporting and I will see if there might be a glitch somewhere, unless the .ini for that particular workflow somehow was manipulated before exporting.

-steinar