CreateGroup: Allow to create a group with given UUID
Before migration of groups to NoteDb it was possible to create a group
with a given UUID through the ReviewDb access methods.
After migration to NoteDb this is no longer possible, which is a
breaking change for plugins/extensions that rely on it.
Add an optional UUID field to GroupInput so that callers may specify
the UUID. If it's not set, generate the UUID as before. Fail when the
given UUID belongs to an existing group or is not a valid UUID for an
internal group.
Bug: Issue 11935
Change-Id: I062bbfaaafd9fc510c514f8f7cd134b9a086beef
diff --git a/Documentation/rest-api-groups.txt b/Documentation/rest-api-groups.txt
index 00fd81f..f84d91a 100644
--- a/Documentation/rest-api-groups.txt
+++ b/Documentation/rest-api-groups.txt
@@ -508,8 +508,9 @@
}
----
-If the group creation fails because the name is already in use the
-response is "`409 Conflict`".
+If the group creation fails because the name is already in use, or the
+UUID was specified and the UUID is already in use, the response is
+"`409 Conflict`".
[[get-group-detail]]
=== Get Group Detail
@@ -1596,6 +1597,7 @@
|Field Name ||Description
|`name` |optional|The name of the group (not encoded). +
If set, must match the group name in the URL.
+|`uuid` |optional|The UUID of the group.
|`description` |optional|The description of the group.
|`visible_to_all`|optional|
Whether the group is visible to all registered users. +