Agent Group API endpoint should support partial updates
manrodrigues opened this issue · comments
Amanda Rodrigues commented
The agent groups API endpoint /api/v1/agent_groups/{group-id} should support modification of some attributes without having to provide all the attributes.
Updates to the following fields should be supported (without requiring the other fields to be provided in the JSON body):
- Name
- Description
- Tags
Expected behavior:
Tags:
- If the tags field is omitted, nothing changes
- If the tags field is informed and empty, an error must be raised informing that tags are required for groups
- If the tags field is informed and NOT empty, new set of tags must overwrite the old one
Name:
- If the name is informed, the new name must overwritten the old name
- If the name is omitted, the old name must be maintained.
- If the name is informed with empty or invalid values, an error must be raised informing that the name doesn't match with the pattern required.
Description:
- If the description field is omitted, nothing changes
- If the description field is informed and empty, The description becomes empty (is removed)
- If the description field is informed and NOT empty, new description must overwrite the old one
Originally posted by @manrodrigues in #2005 (comment)