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.
/pulp/api/v2/repo_groups/<group_id>/actions/associate/
criteria (object) - a unit association search criteria document
200 - if the associate was successfully performed
400 - if the criteria document is invalid
404 - if the group cannot be found
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.
/pulp/api/v2/repo_groups/<group_id>/actions/unassociate/
criteria (object) - a unit association search criteria document
200 - if the removal was successfully performed
400 - if the criteria document is invalid
404 - if the group cannot be found
Sample Request:
{
"criteria": {
"filters": {
"id": "dest-1"
}
}
}
Sample 200 Response Body:
["dest-2", "dest-1"]