Title: Inconsistent behaviour in handling projectid param for different list APIs · Issue #11517 · apache/cloudstack · GitHub
Open Graph Title: Inconsistent behaviour in handling projectid param for different list APIs · Issue #11517 · apache/cloudstack
X Title: Inconsistent behaviour in handling projectid param for different list APIs · Issue #11517 · apache/cloudstack
Description: problem Many list APIs support the projectid parameter to filter resources for a specific project. However, when projectid = -1 is passed with listall=true, the behavior is inconsistent: some APIs return all resources accessible to the c...
Open Graph Description: problem Many list APIs support the projectid parameter to filter resources for a specific project. However, when projectid = -1 is passed with listall=true, the behavior is inconsistent: some APIs ...
X Description: problem Many list APIs support the projectid parameter to filter resources for a specific project. However, when projectid = -1 is passed with listall=true, the behavior is inconsistent: some APIs ...
Opengraph URL: https://github.com/apache/cloudstack/issues/11517
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inconsistent behaviour in handling projectid param for different list APIs","articleBody":"### problem\n\nMany list APIs support the projectid parameter to filter resources for a specific project. However, when projectid = -1 is passed with listall=true, the behavior is inconsistent: some APIs return all resources accessible to the caller (typically for admins), while others only return resources explicitly associated with a project. This inconsistency creates confusion, and we should explore options to normalize the behavior across APIs.\n\nRelated:\n\n- https://github.com/apache/cloudstack/issues/9602\n- https://github.com/apache/cloudstack-cloudmonkey/pull/185#issuecomment-3220902626\n\n### versions\n4.21-Snapshot, earlier\n\n### Different API behaviour for listVirtualMachines and listNetworks\n\n```\n(localcloud) 🐱 \u003e list networks listall=true filter=id,name,project\n{\n \"count\": 1,\n \"network\": [\n {\n \"id\": \"8d7f5b0f-f215-48ee-92f5-8cbd1d0259d9\",\n \"name\": \"demonet\"\n }\n ]\n}\n(localcloud) 🐱 \u003e list virtualmachines projectid=-1 listall=true filter=id,name,project\n{\n \"count\": 3,\n \"virtualmachine\": [\n {\n \"id\": \"e34775ec-720b-42b4-a7ee-726e399e429d\",\n \"name\": \"kvm-vm\"\n },\n {\n \"id\": \"76108354-30fe-4ced-a18d-0db35afca135\",\n \"name\": \"proxmox-vm\"\n },\n {\n \"id\": \"0a652b81-c2b2-45b4-a747-0de511fcdcc7\",\n \"name\": \"project-vm\",\n \"project\": \"demo\"\n }\n ]\n}\n(localcloud) 🐱 \u003e list virtualmachines listall=true filter=id,name,project\n{\n \"count\": 2,\n \"virtualmachine\": [\n {\n \"id\": \"e34775ec-720b-42b4-a7ee-726e399e429d\",\n \"name\": \"kvm-vm\"\n },\n {\n \"id\": \"76108354-30fe-4ced-a18d-0db35afca135\",\n \"name\": \"proxmox-vm\"\n }\n ]\n}\n(localcloud) 🐱 \u003e list networks projectid=-1 listall=true filter=id,name,project\n{\n \"count\": 1,\n \"network\": [\n {\n \"id\": \"2640fda5-2b5a-4f7f-8750-b2b898ea9e9a\",\n \"name\": \"project-l2\",\n \"project\": \"demo\"\n }\n ]\n}\n(localcloud) 🐱 \u003e list networks listall=true filter=id,name,project\n{\n \"count\": 1,\n \"network\": [\n {\n \"id\": \"8d7f5b0f-f215-48ee-92f5-8cbd1d0259d9\",\n \"name\": \"demonet\"\n }\n ]\n}\n```","author":{"url":"https://github.com/shwstppr","@type":"Person","name":"shwstppr"},"datePublished":"2025-08-26T07:02:15.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/11517/cloudstack/issues/11517"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:87246ae5-0bd9-e850-6225-06b918c1bbb4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C478:1368EB:D02F67:1244AD4:6A4E8BC6 |
| html-safe-nonce | f6fd392d58a2c11cf0d3f3072c071b42f4bc7c2460b7351a2dcd1293ac9af91e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNDc4OjEzNjhFQjpEMDJGNjc6MTI0NEFENDo2QTRFOEJDNiIsInZpc2l0b3JfaWQiOiIxOTcyNTgxMjcyODQxNTIyMTE4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | af8c4dcff3867875854fc37e1242e902136189cad744d190c6450a87bcd2aa01 |
| hovercard-subject-tag | issue:3354405461 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/apache/cloudstack/11517/issue_layout |
| twitter:image | https://opengraph.githubassets.com/0337d78f4915a5313835606f11b6de20210ef65500f908c8c7efbde5ddd468c5/apache/cloudstack/issues/11517 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/0337d78f4915a5313835606f11b6de20210ef65500f908c8c7efbde5ddd468c5/apache/cloudstack/issues/11517 |
| og:image:alt | problem Many list APIs support the projectid parameter to filter resources for a specific project. However, when projectid = -1 is passed with listall=true, the behavior is inconsistent: some APIs ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shwstppr |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/apache/cloudstack git https://github.com/apache/cloudstack.git |
| octolytics-dimension-user_id | 47359 |
| octolytics-dimension-user_login | apache |
| octolytics-dimension-repository_id | 9759448 |
| octolytics-dimension-repository_nwo | apache/cloudstack |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 9759448 |
| octolytics-dimension-repository_network_root_nwo | apache/cloudstack |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width