Active IQ Unified Manager Discussions

Calling a WFA Workflow Using Rest

A_Campbell
11,157 Views

Is anyone familiar with how to specify user input when calling WFA via rest? Here's how I'm making the call:

 

https://wfaServer/rest/workflows/workflowID/jobs?input1=x&input2=y&input3=z

 

 

 

Here's the error I'm getting:

 

<data contentType="text/plain" contentLength="47"><![CDATA[No job input specified. Must specify user input]]></data>

 

 

 

Am I missing something with syntax on my http link?

 

 

 

Thanks

1 ACCEPTED SOLUTION

sinhaa
11,067 Views

@A_Campbell

 

Okay. 

 

You need WFA 4.1 or above for this. Doing this needs a new feature called 'Custom Rest end points' which is only present in the mentioned WFA version.

 

 

1. Open your workflow for editing. You'll see the last 'tab' is called 'Advanced'. Go to that tab.

2. You see it has fields 'Custom URI path for workflow' and HTTP method type drop-down selection.

 

3. Assuming your workflow have only 2 user-inputs and values as $Input1=x and $Input2=y.

 

4. Provide the Custom URI path as: /{Input1}/{Input2}/myworkflow

5. Select the HTTP method type : DELETE

 

Save it.

 

Now you can execute this workflow using some REST client:

 

 

URL:  https://wfaServer/rest/x/y/myworkflow/jobs

Method: DELETE

 

 

Now NO input body is required. This is expected as method DELETE is designed not to need a body. The inputs are provided in the URL itself.

 

If you want to have Input values as $Input1=x1 and $Input2=y1 the have the URL as:  https://wfaServer/rest/x1/y1/myworkflow/jobs

 

You are Done!!

 

sinhaa

If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.

View solution in original post

10 REPLIES 10
Public