github.com/argoproj/argo-cd/v2@v2.10.5/docs/developer-guide/api-docs.md (about) 1 # API Docs 2 3 You can find the Swagger docs by setting the path to `/swagger-ui` in your Argo CD UI. E.g. [http://localhost:8080/swagger-ui](http://localhost:8080/swagger-ui). 4 5 ## Authorization 6 7 You'll need to authorize your API using a bearer token. To get a token: 8 9 ```bash 10 $ curl $ARGOCD_SERVER/api/v1/session -d $'{"username":"admin","password":"password"}' 11 {"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE1Njc4MTIzODcsImlzcyI6ImFyZ29jZCIsIm5iZiI6MTU2NzgxMjM4Nywic3ViIjoiYWRtaW4ifQ.ejyTgFxLhuY9mOBtKhcnvobg3QZXJ4_RusN_KIdVwao"} 12 ``` 13 14 Then pass using the HTTP `Authorization` header, prefixing with `Bearer `: 15 16 ```bash 17 $ curl $ARGOCD_SERVER/api/v1/applications -H "Authorization: Bearer $ARGOCD_TOKEN" 18 {"metadata":{"selfLink":"/apis/argoproj.io/v1alpha1/namespaces/argocd/applications","resourceVersion":"37755"},"items":...} 19 ``` 20 21 ## Services 22 23 ### Applications API 24 25 #### How to Avoid 403 Errors for Missing Applications 26 27 All endpoints of the Applications API accept an optional `project` query string parameter. If the parameter 28 is specified, and the specified Application does not exist, the API will return a `404` error. 29 30 Additionally, if the `project` query string parameter is specified and the Application exists but is not in 31 the given `project`, the API will return a `403` error. This is to prevent leaking information about the 32 existence of Applications to users who do not have access to them.