Help using API get workflows search parameter
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Using server version 2021.4
I can get the API to give me all workflows.
I can't seem to get search parameter entered right or find documentation or examples
I need to get a specific workflow name in a specific collection name.
Thank you
Solved! Go to Solution.
- Labels:
- API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Just enter the text string, no quotes. I believe it will search all the fields of the workflow metadata. I don't think that would include the Collection name though. You could use the Collection api - it contains the app ids - then get all all workflows and join on app id.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Both of these, with quotes removed, got nothing returned.
collections.collectionName=Prod Stage
collectionName=Prod Stage
It was same as with the quotes in place
I also tried with single quotes ' instead of double ", but no return
:( Thanks for trying
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I think you are looking for a Collection name in Workflow metadata. Collection Name is not in Workflow API returned data - I think. I'll try and demo what I think you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Using the Collections api /admin/v1/collections/, look for Prod Stage in the returned data. Get all the app ids within the data returned for that Collection. Then search in the /admin/v1/workflows using each app id. This is how to do it using Alteryx Gallery Api documentation but you could query MongoDB directly to automate it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks TimN, But I need to find the workflow id by searching on the collection name "Prod Stage" and the workflow name "test workflow". How to specify that filter in the search variable is where I'm stuck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I figured out how it seems to be working, but that is inadequate for my needs so I'll resort to the Mongo db
It seems to be searching for a string in the returned Jason.
For example, I could enter THR into the search and it would find workflows that have THR in any field.
I did not test case THR vs Thr
I'm giving TimN resolver credit because he helped a lot and mentioned the MongoDB. Thanks Tim
Values with embedded blanks did not fare well.
For example putting MY THR would return nothing even though some values in the json contained MY THR
If anyone knows of a way to search more precisely than this, please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is the method I use for targeting specific workflows in a collection.
I pull a list of all workflows on the gallery, names and IDs.
Then I pull a list of all workflows contained in the collection I care about. I join it back to the workflow list to get the app name associated with the flows in my container.
Once I have that, I use the name field to match the workflow I am looking for and then pass it along to be run.
A lot of my flows have spaces in them and have had no issues matching names so this may work for you as well.
I can mockup a generic version for you if you want to try it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you @SPetrie . I expect that to work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Here is that portion of the workflow incase you need it.
It uses the API v3 macro pack.