-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add "List all artifacts" to REST API #21010
Comments
در تاریخ سهشنبه ۸ اکتبر ۲۰۲۴، ۰۲:۱۷ Brian Major ***@***.***>
نوشت:
… In order to list all artifacts across all repositories and projects, one
currently has to iterate through each of those items with separate REST API
calls:
get all projects (GET to /projects)
for each project
get all repositories (GET to /{project}/repository)
for each repository
get all artifacts (GET to /{project}/{repository}/artifacts)
add to list
This results in an unscalable number of calls.
A single REST API call to get all the artifacts in all repositories and
projects.
This would be scalable because the complexity can be handled in the DB
query.
In the meantime, I wonder if there is an alternate approach we could use
to get the list of all images?
—
Reply to this email directly, view it on GitHub
<#21010>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BLANCFEKR7AXJXWEUQCC2CDZ2MFQVAVCNFSM6AAAAABPQ5KJ6CVHI2DSMVQWIX3LMV43ASLTON2WKOZSGU3TCNRWGI4TCNI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
|
can you clarify the requirement in details? Like, you would like to have a api to list all the artifacts that belong to one specific project. |
The use case is driven by users' need to discover what images are available to them in a given harbor instance. This would be across all projects (but authorization would be applied on a project-to-project basis I presume). We would like to use the harbor API to generate this list, present it to users, and then integrate the users' selection with other (non-harbor) APIs that use the images. |
Currently, we do have the api to list all the artifacts that belong to one specific project. |
Oh, that would certainly help. But I must be missing something, as the only GET to artifacts I see in the v2.0 API requires the repository_name as well:
|
In order to list all artifacts across all repositories and projects, one currently has to iterate through each of those items with separate REST API calls:
This results in an unscalable number of calls.
A single REST API call to get all the artifacts in all repositories and projects.
This would be scalable because the complexity can be handled in the DB query.
In the meantime, I wonder if there is an alternate approach we could use to get the list of all images?
The text was updated successfully, but these errors were encountered: