Trying to add branch restriction to a repository, I was successful in adding a rule, however, I cannot get a group added to the rule.
curl -XPOST --user user:password -H "Content-Type: application/json" -d '{"kind": "push", "pattern": "testing*", "groups": {"name": "testleads"}}' $URL/api/2.0/repositories/team/repo/branch-restrictions
Result:
{"error": {"message": "malformed groups"}}
I have tried different combinations in the groups using full_slug, slug and also changing the inheritance types.
-d '{"kind": "push", "pattern": "testing*", "groups":["name": "devleads"]}'
-d '{"kind": "push", "pattern": "testing*", "groups": {"name": "devleads"}}'
Has anyone tried this?