Check If Repository Exists

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: This REST API checks if repositories exist that match the repository types and the project key specified in the query parameters.

Since: Artifactory 7.103.0

Security: Requires an admin user.

Produces: application/json

Sample Usage:

GET /artifactory/api/repositories/existence?type=local&type=remote&projectKey=my-proj-1
{
  "exists": true,
  "matchingRepoTypes": ["LOCAL", "REMOTE"],
  "projectKey": "my-proj-1"
}

Query Parameters:

Name

Type

Description

projectKey

string

The key to the project in which you want to search. If not provided, the API checks all repositories in all projects.

type

enum

The type of repository to search for. This parameter can be specified in the query more than once and can be one of the following values:

  • local

  • remote

  • virtual

  • federated

  • releaseBundle

If not specified, the endpoint checks for repositories of all types.

The response includes the following information:

Name

Description

exists

Indicates if any repository exists for the specified repository types and project key.

matchingRepoTypes

The repository types that were used for the check.

projectKey

The project key used for the check.