Creation, Delete, and Update¶
Create a Repository Group¶
Creates a new repository group. Group IDs must be unique across all repository groups in the server. The group can be initialized with an array of repositories by passing in their IDs during the create call. Repositories can later be added or removed from the group using the membership calls.
- id (string) - unique identifier for the group
- display_name (string) - (optional) user-friendly name for the repository group
- description (string) - (optional) user-friendly text describing the group’s purpose
- repo_ids (array) - (optional) array of repositories to add to the group
- notes (object) - (optional) key-value pairs to programmatically tag the group
- 201 - the group was successfully created
- 400 - if one or more of the parameters is invalid
- 404 - if any id in the given repo_ids does not belong to a valid repository
- 409 - if there is already a group with the given ID
Sample Request:
{
"id": "demo-group"
}
Sample 201 Response Body:
{
"scratchpad": null,
"display_name": null,
"description": null,
"_ns": "repo_groups",
"notes": {},
"repo_ids": [],
"_id": {
"$oid": "500ed9888a905b04e9000021"
},
"id": "demo-group",
"_href": "/pulp/api/v2/repo_groups/demo-group/"
}
Delete a Repository Group¶
Deleting a repository group does not affect the underlying repositories; it simply removes the group and its relationship to all repositories.
- 200 - if the repository group was successfully deleted
- 404 - if the specified group does not exist
Update a Repository Group¶
Once a repository group is created, its display name, description, and notes can be changed at a later time. The repositories belonging to the group do not fall under this call and are instead modified using the membership calls.
Only changes to notes need to be specified. Unspecified notes in this call remain unaffected. A note is removed by specifying its key with a value of null.
- display_name (string) - (optional) user-friendly name for the repository group
- description (string) - (optional) user-friendly text describing the group’s purpose
- notes (object) - (optional) changes to key-value pairs to programmatically tag the group
- 200 - if the update executed immediately and was successful
- 400 - if one of the parameters is invalid
- 404 - if the group does not exist
Sample Request:
{
"display_name": "Demo Group"
}
Sample 200 Response Body:
{
"scratchpad": null,
"display_name": "Demo Group",
"description": null,
"_ns": "repo_groups",
"notes": {},
"repo_ids": [],
"_id": {
"$oid": "500ee4028a905b04e900002e"
},
"id": "demo-group",
"_href": "/pulp/api/v2/repo_groups/demo-group/"
}