Description: Creates 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 creating multiple repositories using a batch request, if one of the repository configurations is invalid, the entire batch request will fail.
Since: 7.84.3
Security: Requires an admin user.
Usage: PUT /artifactory/api/v2/repositories/batch
Sample Request:
curl --location --request PUT 'https://[JFrogPlatformURL]/artifactory/api/v2/repositories/batch' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic YWRtaW46cGFzc3dvcmQ=' \
--data '[
{
"key": "wproj-dev-docker-local-1",
"packageType": "docker",
"description": "",
"notes": "",
"includesPattern": "**/*",
"excludesPattern": "",
"rclass": "local"
},
{
"key": "wproj-dev-docker-local-2",
"packageType": "docker",
"description": "",
"notes": "",
"includesPattern": "**/*",
"excludesPattern": "",
"rclass": "local"
}
]'
Important
It is mandatory to define the key for each repository in the batch request.
Sample Response:
Successfully created repository 'wproj-dev-docker-local-1' Successfully created repository 'wproj-dev-docker-local-2'
Status Codes:
Code | Description |
|---|---|
201 | Repositories created successfully |
400 | Bad request; batch limit exceeded; mandatory keys not configured |
409 | Repository key conflict |
500 | Internal server error |