Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Internal DB IDs used as parameters #9684

Open
nvazquez opened this issue Sep 16, 2024 · 1 comment
Open

[API] Internal DB IDs used as parameters #9684

nvazquez opened this issue Sep 16, 2024 · 1 comment

Comments

@nvazquez
Copy link
Contributor

ISSUE TYPE
  • Improvement Request
COMPONENT NAME
API
CLOUDSTACK VERSION
Any
CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

SUMMARY

The API accepts internal database IDs as well as UUIDs on the UUID parameters. For example:

(nvs) 🐱 > list accounts id=c3d932e5-488c-11ef-a188-3e7340e5df3c filter=id,name
{
  "account": [
    {
      "id": "c3d932e5-488c-11ef-a188-3e7340e5df3c",
      "name": "nicolas"
    }
  ],
  "count": 1
}
(nvs) 🐱 > list accounts id=2 filter=id,name
{
  "account": [
    {
      "id": "c3d932e5-488c-11ef-a188-3e7340e5df3c",
      "name": "nicolas"
    }
  ],
  "count": 1
}
(nvs) 🐱 > list accounts id=3 filter=id,name
{
  "account": [
    {
      "id": "eef0d0a3-8013-4c37-954d-eafb96716c95",
      "name": "baremetal-system-account"
    }
  ],
  "count": 1
}
EXPECTED RESULTS
ERROR - only UUIDs must be accepted
ACTUAL RESULTS
Successful API response
@DaanHoogland
Copy link
Contributor

@nvazquez isn't this just very convenient for admins? they have to look at the db and it would be very usefull for them to be able to use the DB ID instead of the UUID, at times. I can understand if we disable this for other users but would really like to keep the behaviour in for admins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants