Artifcatory rest API to list all the Repositories
Asked Answered
H

2

6

I am looking for a artifactory REST API that would list down all the repo-keys. If it could provide some more information then that would be really nice.

I looked up the Artifactory REST API documentation, but couldn't find one.

Did I miss anything ? Any other alternative ?

Hypnosis answered 15/1, 2019 at 13:46 Comment(0)
D
11

I expect you're just looking for GET /api/repositories.

This gives you the repo key, type, package type, description, and the URL of each repository, and you may filter by type or package type.

Distrait answered 15/1, 2019 at 21:34 Comment(3)
THank you @DarthFennec. This really helpsHypnosis
I want to filter the repository by its type, like list only the local or remote repository. How do I do it?Pride
Add e.g. ?type=local to the urlSaucy
T
0

For jFrog cloud, below API should list all repo details. Pass username and password using HTTP basic authentincation headers.

HTTP GET https://jFrog-cloud-domain-name/artifactory/api/repositories

Below is sample JSON response.

[
    {
        "key": "ABC",
        "description": "ABC Repo",
        "type": "LOCAL",
        "url": "https://<jFrog cloud domain name>/artifactory/ABC",
        "packageType": "GitLfs"
    },
    {
        "key": "DEF",
        "description": "DEF Generic Repo",
        "type": "LOCAL",
        "url": "https://<jFrog cloud domain name>/artifactory/DEF",
        "packageType": "Generic"
    },
    {
        "key": "XYZ",
        "description": "XYZ repo",
        "type": "LOCAL",
        "url": "https://<jFrog cloud domain name>/artifactory/XYZ",
        "packageType": "Maven"
    }
]
Thylacine answered 23/7, 2023 at 8:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.