Argo-cd: /api/v1/applications - wrong behavior for querying the application's name.

Created on 23 Sep 2020  路  6Comments  路  Source: argoproj/argo-cd

Checklist:

  • [x] I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • [x] I've included steps to reproduce the bug.
  • [x] I've pasted the output of argocd version.

Describe the bug

Using /api/v1/applications endpoint to get 1 application does not behave as stated in the doc

To Reproduce

  1. Have at least 2 apps running on ArgoCD
  2. Query as documented /api/v1/applications?name=APP_NAME will return all the applications
  3. Query /api/v1/applications/APP_NAME will return the actual application APP_NAME data

Expected behavior

I am expecting the API endpoint to behave as documented

Screenshots

Screenshot_20200923_121459

Screenshot_20200923_121342

Screenshot_20200923_121436

Version

v1.5.4+36bade

Logs

Paste any relevant application logs here.
bug help wanted tech-dept

All 6 comments

Hmm, can you elaborate on what the issue is?
Based on your screenshots, on /api/v1/applications?name=APP_NAME you are getting all the applications and on /api/v1/applications/APP_NAME you are getting only one as expected.

Hi @darshanime ,

Yes this is exactly what I am saying :smile:

Query as documented /api/v1/applications?name=APP_NAME will return all the applications

This is supposed to return me only 1 application, the one called APP_NAME but it returns all the applications
-> Not working as expected

The only way I found to get the data I am expecting is

Query /api/v1/applications/APP_NAME

-> Not documented

@alexmt might I please take a crack at this?

@aistein, sure!

Looking into it.

Fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

estahn picture estahn  路  3Comments

duboisf picture duboisf  路  3Comments

chiragthaker picture chiragthaker  路  3Comments

alexec picture alexec  路  3Comments

KarstenSiemer picture KarstenSiemer  路  3Comments