Update Multiple Repositories

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Description: Updates the configuration of multiple repositories using a batch request. The batch request can contain a mix of different package types and repository types.

Note

For additional details and restrictions, see Create Repository.

Warning

When updating multiple repositories using a batch request, if one of the repository configurations is invalid, the entire batch request will fail.

Since: 7.104.2

Security: Requires an admin user.

Usage: POST /artifactory/api/v2/repositories/batch

Consumes: application/json (application/vnd.org.jfrog.artifactory.repositories.LocalRepositoryConfiguration+json), application/json (application/vnd.org.jfrog.artifactory.repositories.RemoteRepositoryConfiguration+json), application/json (application/vnd.org.jfrog.artifactory.repositories.VirtualRepositoryConfiguration+json), application/vnd.org.jfrog.artifactory.repositories.FederatedRepositoryConfiguration+json

Sample Request:

curl --location --request POST 'http://{host}:{port}/artifactory/api/v2/repositories/batch' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' \
--data '[
  {
    "key": "wproj-dev-docker-local-1",
    "packageType": "docker",
    "description": "local-1",
    "notes": "belongs to team 1",
    "includesPattern": "**/*",
    "excludesPattern": "",
    "rclass": "local"
  },
    {
    "key": "wproj-dev-docker-local-2",
    "packageType": "docker",
    "description": "local-2",
    "notes": "belongs to team 2",
    "includesPattern": "**/*",
    "excludesPattern": "",
    "rclass": "local"
  }
]'

Sample Response:

Repositories updated successfully 

Status Codes:

Code

Description

200

Repositories updated successfully

400

Bad request; batch limit exceeded; mandatory keys not configured

500

Internal server error