Groups API - manually syncing group membership?

You seem to be right on this – you cannot access group resources with the ID number, only the name.

The ID referenced here is not an ID, but the name, per

It probably makes sense to refactor the /g/<group-name> route to match how we now handle topics and categories. Something like /g/<group-name>/<id> or /g/patrons/41 and allow /g/41 to function the same way.

Until we fix that up, though, it seems the only way to accomplish what you’re looking for is:

  1. Storing the group name alongside the id
  2. Hitting g/<group-name>/members.json with a GET request to get the members
  3. Loop through those to delete each so you can re-sync.