Core - Group
The base url for the APIs in this page is at:
/api/admin
A JSON file with OpenAPI data about all core-related admin APIs can be downloaded here
.
Get user group details
Gets details about a specific user group:
The request will return a Json positive response with the details of the user group corresponding to the id provided:
{
ID: 7, // Int
CreatedDate: "2001-01-01T01:01:01Z", // DateTime
LastUpdated: "2001-01-01T01:01:01Z", // DateTime
Labels: "{\"en\":\"Default Group\",\"it\":\"Gruppo predefinito\",...}" // String
}
The field Labels
contains a stringified Json containing pairs “language code”:”localized value”
Get all user groups
Gets the list of all user groups:
Returns a Json positive response with the list of user groups:
[
{
ID: 7, // Int
CreatedDate: "2001-01-01T01:01:01Z", // DateTime
LastUpdated: "2001-01-01T01:01:01Z", // DateTime
Labels: "{\"en\":\"Default Group\",\"it\":\"Gruppo predefinito\",...}" // String
},
...
]
The field Labels
contains a stringified Json containing pairs “language code”:”localized value”
Get user groups
Gets the list of user groups (it’s a Paged List APIs, as explained in the introduction):
Returns a Json positive response with the list of user groups limited by the page settings:
[
{
ID: 7, // Int
CreatedDate: "2001-01-01T01:01:01Z", // DateTime
LastUpdated: "2001-01-01T01:01:01Z", // DateTime
Labels: "{\"en\":\"Default Group\",\"it\":\"Gruppo predefinito\",...}" // String
},
...
]
The field Labels
contains a stringified Json containing pairs “language code”:”localized value”
Add new or edit existing user group
Persists edits about a new or existing user group:
With a request body like this
{
ID: 123, // Int
Labels: "{\"en\":\"Default Group\",\"it\":\"Gruppo predefinito\",...}", // String
Communities: ["a6dfbbee-4866-422a-8f83-6b8533375e7d", ...] // Guid Array
}
The field Labels
contains a stringified Json containing pairs “language code”:”localized value” and is required to be valorized.
If the ID
field is not provided or is set to 0 a new record will be created, otherwise the corresponding user group record will be updated.
The field Communities
containes a list of community Guids to the group to be linked to, and is mandatory while creating a new group if the user has administrative rights limited to one or more community.
It will return a plain Json positive response if the record was successfully added or updated.
Some of the possible error messages are:
err_InvalidElement
No label or community is set on the provided request body, or no group to edit was found for the provided
ID
Delete user group
Mark as deleted the user group:
The request will return a plain Json positive response with no additional data if the record was successfully deleted.
Possible error messages are:
err_ElementDoesNotExist
The id provided in the request does not correspond to any user group
err_ElementAlreadyDeleted
The id corresponds to a record that has already been deleted
err_CannotDeleteHasUsers
The id corresponds to a user group that has users