Unit: Filter / Search applications by name
Hello,
I was unable to find a way to request a response with a specific application match. For example, I'd like to know all the applications that start with domain.com_.
I cannot do something like:
curl --unix-socket /path/to/control.unit.sock http://localhost/config/applications/domain.com_%
I guess it's not possible yet?
Only 'applications' names list as an array might also be fine, if that's possible. We'd parse it in our control panel then.
Thank you!
You can use jq for any JSON transformations: https://stedolan.github.io/jq/
@VBart we use parsing directly in C. The question is if it’s possible to get just the elements we need, as it’d be way faster, than listing thousands of json objects and then filtering the ones needed. I think there is no way to so this currently. Are there any plans for this?
@VBart we use parsing directly in C. The question is if it’s possible to get just the elements we need, as it’d be way faster, than listing thousands of json objects and then filtering the ones needed. I think there is no way to so this currently. Are there any plans for this?
I agree, that it's something nice to have. There are many ways how we can make configuration API more friendly, but it's not our top priority right now as Unit lacks many essential functionality related to applications, static files serving and proxying. So, I can't name any ETA for this feature to appear.
Sure! I totally agree on this :) just have the issue open for the future versions.
Thank you!
Hi @smtalk I know it is a while since the last update of this issue but a quick question from my side. Would it be possible for you to run an application in any language we support on Unit doing the filtering for you? We are working on this style of features adding to Unit in a more "plug-iny" way. Let me know your thoughts.