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

Add "List all artifacts" to REST API #21010

Open
brianmajor opened this issue Oct 7, 2024 · 4 comments
Open

Add "List all artifacts" to REST API #21010

brianmajor opened this issue Oct 7, 2024 · 4 comments
Assignees
Labels
kind/requirement New feature or idea on top of harbor more-info-needed The issue author need to provide more details and context to the issue

Comments

@brianmajor
Copy link

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?

@Thesuperkingofsnakes22
Copy link

Thesuperkingofsnakes22 commented Oct 8, 2024 via email

@Thesuperkingofsnakes22
Copy link

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?

@wy65701436
Copy link
Contributor

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.

@wy65701436 wy65701436 added the kind/requirement New feature or idea on top of harbor label Oct 9, 2024
@MinerYang MinerYang added the more-info-needed The issue author need to provide more details and context to the issue label Oct 14, 2024
@brianmajor
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/requirement New feature or idea on top of harbor more-info-needed The issue author need to provide more details and context to the issue
Projects
None yet
Development

No branches or pull requests

4 participants