ara icon indicating copy to clipboard operation
ara copied to clipboard

API: Support searching CLI arguments

Open saranyasridharan opened this issue 4 years ago • 2 comments

First my huge respect and appreciation to the support of the community members. I have a query . Is multiple search query options is available in ARA API calls .

What component is this about ?

Ara API server Endpoints

What is your ARA installation like ?

Linux distribution: Centos 7.2 database driver: AWS Postgres Environment: Virtual environment Ansible Version: 2. Ara Version: 1.3.3

What is the idea ?

I have a requirement in my project to search for multiple parameters in ara database through the api endpoint. curl http://127.0.0.1:8000/api/v1/playbooks?started_from=timestamp&path=filename&vault_ids=id Now if I try to query like this only the first search parameter is taken into account.Usually in API , multiple parameter can be allowed. Can anyone please tell me if this kind of querying is possible , if so how do I do that? or if this seems valid usecase , can you consider including this in ARA api development?

saranyasridharan avatar Apr 02 '20 09:04 saranyasridharan

Hi @saranyasridharan,

Unless mistaken, the API already supports searching for different parameters simultaneously. If you need to search vault_ids specifically, though, this is not currently possible.

ARA grabs what it calls the arguments and nests them all under the "arguments" key, like so: Screenshot from 2020-04-13 15-00-43

The keys under arguments cannot be searched for yet, but I can see that being useful. I'm not sure yet what's the best approach for this from a database schema and API standpoint but I'll leave this open if someone wants to look at it.

dmsimard avatar Apr 13 '20 19:04 dmsimard

This might become possible by searching for labels in a feature I am testing: https://review.opendev.org/#/c/752259/

dmsimard avatar Sep 16 '20 15:09 dmsimard