Repository Membership

Add Repositories to a Group

One or more repositories can be added to an existing group. The repositories to be added are specified using a search criteria document. This call is idempotent; if a repository is already a member of the group, no changes are made and no error is raised.

Method: POST
Path: /pulp/api/v2/repo_groups/<group_id>/actions/associate/
Permission: execute
Request Body Contents:
  • criteria (object) - a unit association search criteria document
Response Codes:
  • 200 - if the associate was successfully performed
  • 400 - if the criteria document is invalid
  • 404 - if the group cannot be found
Return: array of repository IDs for all repositories in the group

Sample Request:

{
 "criteria": {
   "filters": {
     "id": {"$in": ["dest-1", "dest-2"]}
   }
 }
}

Sample 200 Response Body:

["dest-2", "dest-1"]

Remove Repositories from a Group

In the same fashion as adding repositories to a group, repositories to remove are specified through a search criteria document. The repositories themselves are unaffected; this call simply removes the association to the given group.

Path: /pulp/api/v2/repo_groups/<group_id>/actions/unassociate/
Permission: execute
Request Body Contents:
  • criteria (object) - a unit association search criteria document
Response Codes:
  • 200 - if the removal was successfully performed
  • 400 - if the criteria document is invalid
  • 404 - if the group cannot be found
Return: array of repository IDs for all repositories in the group

Sample Request:

{
 "criteria": {
   "filters": {
     "id": "dest-1"
   }
 }
}

Sample 200 Response Body:

["dest-2", "dest-1"]