goharbor / harbor

An open source trusted cloud native registry project that stores, signs, and scans content.
https://goharbor.io
Apache License 2.0
23.59k stars 4.71k forks source link

Authorize bot to list global labels #20730

Open jboulmier opened 1 month ago

jboulmier commented 1 month ago

Is your feature request related to a problem? Please describe.

I'm trying to write a script filtering artifacts by a label. The list artifacts endpoint accept filtering by label id (and not name). The input of my script is using the label name (more convenient for end users).

However, it is impossible to request the /labels endpoint to get the ID from the name for a label with the global

Describe the solution you'd like

wy65701436 commented 1 month ago

it's doable in the harbor v2.10+, what's the version of harbor are you using? Can you share your script or the specific API that you're using to list labels? And the permission set of you robot.

image