And everything works great. However, it looks like the parameters are tied to the legacy Input nodes which look to be deprecated soon.
How would you do this with the newer configuration and/or widget nodes? I’ve been running around in circles on this one for a bit. I’ve only found references to the configuration nodes and not widget nodes which seem to be the right replacement for the older quick forms. If there is any documentation on this from the business hub side, that would also be fantastic.
@frenemie Thank you for your questions. I think you may be misunderstanding how to use the API to create and execute jobs. The POST /jobs endpoint is intended to create a job in the environment and should be followed up by a second API call to POST /jobs/{jobId} in order to trigger the execution of the job that was created. This second API call should move the job from an idle/loaded state to an executing state.
In addition to these two API calls you can also make calls to retrieve the status of the job or its results (GET /jobs/{jobId}), and to remove the job once it is no longer needed (DELETE /jobs/{jobIs}). Ideally your app or script that is interacting with the API would make use of all 4 of these endpoints in order to create a job, check it’s status, retrieve output, and remove the job when finished.
Okay, after a brief reprieve, what I was missing is that you need to append the configuration node id to the variable name. I.e. if your configuration node is string-input, and it is in node 5, the configuration name is “string-input-5”. The only way to know this is to inspect the workflow. So for the following contrived example:
As an aside, it would be wonderful if the error from job creation would indicate what variables were configurable. The legacy inputs nicely does this:
Could not set input on job 'XXX: Parameter name "string-input-asdfsdf" doesn't match any node in the workflow, valid parameter names are: ["string-input"]