Create Repository


JFrog Xray
Content Type

Description: Creates a new repository in Artifactory with the provided configuration. Supported by local, remote, virtual, and Federated repositories.

Since: 2.3.0


  • Supported JFrog Subscriptions:

    • Local, remote, and virtual repositories require a Pro subscription.

    • Federated repositories are supported from Artifactory 7.18.3 and require an Enterprise X or Enterprise+ subscription.

  • If a repository with the specified repoKey already exists, the call fails with a 400 response.

  • Missing values are set to the default values as defined by the consumed type spec.

  • For a repository to be identified as Smart Remote Repository, you need to set the “enabled” flag to true under “contentSynchronisation” (under Repository Configuration JSON ).

  • To enable CDN Distribution on the repository, set the cdnRedirect flag on the repository. Applies to Artifactory Cloud and requires an Enterprise or Enterprise+ license.


  • In an Artifactory environment with more than several thousands of repositories, and a low-to-moderate level of concurrency in repository CRUD operations, there can be a data contention that the system will attempt to solve by retrying the operation. The number of retries is configurable using the system property. The default value is 5.

  • In such environments, it is also possible that changes made by a CUD operation may take up to tens of seconds or several minutes to propagate down and become fully visible in the application (for example, when trying to read a newly created repository via the REST API).

These are known issues that will be fixed in one of the future versions of Artifactory.

Security: Requires an admin user.

Usage: PUT /api/repositories/{repoKey}

Consumes: application/json (application/, application/json (application/, application/json (application/, application/

Sample Usage:

PUT /api/repositories/libs-release-local