post-private-groups.rst (1282B)
1 .. http:post:: [/instances/$INSTANCE]/private/groups 2 3 This is used to create a group. 4 5 **Required permission:** ``groups-write`` 6 7 **Request:** 8 9 The request must be a `GroupAddRequest`. 10 11 **Response:** 12 13 :http:statuscode:`200 OK`: 14 The backend has successfully added a new group. Returns a `GroupAddedResponse`. 15 16 :http:statuscode:`404 Not found`: 17 The merchant instance is unknown. 18 :http:statuscode:`409 Conflict`: 19 A group with this name already exists. 20 Returned with ``TALER_EC_MERCHANT_PRIVATE_PRODUCT_GROUP_CONFLICTING_NAME``. 21 :http:statuscode:`413 Request entity too large`: 22 The uploaded body is to long, it exceeds the size limit. 23 Returned with an error code of 24 ``TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT``. 25 :http:statuscode:`500 Internal Server Error`: 26 The server experienced an internal failure. 27 Returned with ``TALER_EC_GENERIC_DB_STORE_FAILED``. 28 29 **Details:** 30 31 .. ts:def:: GroupAddRequest 32 33 interface GroupAddRequest { 34 35 // Unique name for the group (unique per instance). 36 group_name: string; 37 38 // Description of the group. 39 description: string; 40 41 } 42 43 .. ts:def:: GroupAddedResponse 44 45 interface GroupAddedResponse { 46 47 // Unique ID for the group. 48 group_serial_id: Integer; 49 50 }