Since I wasn’t able to find a clear answer to this on the forum, I wanted to share with you guys how and why I ended up using the API Connector to my own endpoints.
For the most part, I try to limit the workflows for my apps to state changes and scheduling API workflows - this improves speed and scalability. In this case, I was having user’s “download” a list of restaurants to their acount (really, I was running a search that was taking a while to complete). I wanted to show a progress bar, and the only way to do that is by using the API Connector (as scheduling an API workflow processes on the backend).
To do this:
-
Set up your API Endpoint as normal
-
In the API Connector, your format will be
-
Name:
[your_API_Endpoint_name]
-
Us as:
Action
-
Data type:
JSON
-
POST
-
https://yourdomain.com/version-test/api/1.1/wf/your_API_endpoint_name
-
Add a header with a key of
Content-Type
and value ofapplication/json
-
The body will look something like this:
{"parameter_name": "<parameter_name>"}
-
Make sure to mark your Body parameters as not private
-
Put in some example values for the parameters, and initialize the call (remove the values after)
There you go! You can now use your set up API under the plugins area when creating a workflow, and pass through dynamic values.