See Windmill script dependents via API
Using the Windmill API is it possible to see all of the flows where a specified script is being used?
16 Replies
Yes, @Diego
thanks Ruben, I didn't see it immediately in the api docs
Roles and permissions | Windmill
Windmill provides a roles and permissions system that allows you to control access and manage permissions within your instance and workspaces. Different roles have different levels of access to scripts, flows, apps, and other entities in Windmill.
You can hover the little info icon

oh mb
It's /w/{workspace}/scripts/list_paths_from_workspace_runnable/{path}
but for some reason it's not in the openapi web docs
ahh
this does not appear to be working when I attempt to query this endpoint using a script that I know is in use in the workspace
what do you mean by it not working
does it raise an error?
or does it return no usage even though it's incorrect
Speaking for @cmptr, it is currently returning an empty array.
would you have more details about how the sripts are currently related?
Sure. Essentially we are attempting to find all uses of a specific script. Let's say we have Script A that contains some common logic. That script is used in both Flow 1 and Flow 2. What we are attempting to accomplish is when a change is made to Script A, we can tell that that script may effect both Flow 1 and Flow 2. Hopefully this makes sense!
It makes sense and it should work. Can you reproduce on a new flow as well?
Tested and it still works on my end (This uses the same API endpoint). Maybe your flow was deployed before the dependency tracking feature was released?

We may just be misunderstanding the endpoint. Here are a few screenshots:


really weird. Maybe check the network tab of the devtools to check what URL the UI feature calls successfully and how it differs?
i’ll investigate tommorow if you don’t find out
Great Suggestion! I found the issue:
{{baseUrl}}/w/:workspace/flows/list_paths_from_workspace_runnable/script/:path
is the path for the api.