Artifactory: API – List Repositories – cURL

Artifactory has a REST API that can be used to get a list of minimal repository details for all repositories from the command line.

In this note i will show how to list repositories in Artifactory through the REST API using cURL and how to filter repositories by repository and/or package type.

Cool Tip: Default password and how to access REST API in Artifactory! Read more →

Artifactory API to List Repositories

List all repositories in Artifactory:

$ curl -sSf -u "<USERNAME>:<PASSWORD>" \

The API call above returns the repo key, type, description, URL and packageType of the each repository in Artifactory.

List Artifactory repositories of the specific type:

$ curl -sSf -u "<USERNAME>:<PASSWORD>" \

repoType can be one of local, remote, virtual, federated, distribution, for example, to list all local Artifactory repositories, execute:

$ curl -sSf -u "<USERNAME>:<PASSWORD>" \

List Artifactory repositories of the specific package type:

$ curl -sSf -u "<USERNAME>:<PASSWORD>" \

packageType can be one of cocoapods, opkg, rpm, nuget, cran, gems, npm, bower, debian, composer, pypi, docker, vagrant, gitlfs, go, yum, conan, chef, puppet, generic, for example, to list all docker Artifactory repositories, execute:

$ curl -sSf -u "<USERNAME>:<PASSWORD>" \

repoType and packageType can be combined in one query, for example, to list all remote RPM repositories in Artifactory, execute:

$ curl -sSf -u "<USERNAME>:<PASSWORD>" \

Cool Tip: List artifacts in Artifactory’s repository using cURL! Read more →

Was it useful? Share this post with the world!

Leave a Reply