Delete included groups using rest api on gerrit 2.7

36 views
Skip to first unread message

Siddhartha Thotapalli

unread,
Apr 17, 2014, 7:04:08 PM4/17/14
to repo-d...@googlegroups.com
According to gerrit 2.7 documentation, in rest-api section


Delete included groups:
POST /groups/{group-id}/groups.delete

Delete one or several included groups from a Gerrit internal group.

The groups to be deleted from the group must be provided in the request body as a GroupsInput entity.

Request
  POST /groups/MyProject-Committers/groups.delete HTTP/1.0
  Content-Type: application/json;charset=UTF-8

  {
    "members": {
      "MyGroup",
      "MyOtherGroup"
    }
  }

Look at the json in the post data, keys in the hash without values? It gives an error saying invalid json type. I tried using array instead of hash, but still it is not working. Could some one please tell me how to do this. Thanks.

Edwin Kempin

unread,
Apr 18, 2014, 3:00:54 AM4/18/14
to Siddhartha Thotapalli, Repo and Gerrit Discussion
There were two mistakes in the documentation :(

Both of them are now fixed on stable-2.8 [1,2].

The correct JSON is
  {
    "groups": [
      "MyGroup",
      "MyOtherGroup"
    ]
  }

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Siddhartha Thotapalli

unread,
Apr 18, 2014, 5:07:21 PM4/18/14
to repo-d...@googlegroups.com
It is fixed in 2.8? Does that mean, I can not use it in 2.7? Is there no turn around to do this from a script in 2.7?

David Pursehouse

unread,
Apr 19, 2014, 1:15:46 AM4/19/14
to Siddhartha Thotapalli, repo-discuss

On 19 Apr 2014 06:07, "Siddhartha Thotapalli" <siddhu.t...@gmail.com> wrote:
>
> It is fixed in 2.8? Does that mean, I can not use it in 2.7? Is there no turn around to do this from a script in 2.7?
>

The error was in the documentation.

If you use the json format that Edwin showed in the previous mail, it should work on 2.7.

Reply all
Reply to author
Forward
0 new messages