Update a site group
The user must be authenticated and have write permissions to the site group.
Request
The request object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
Yes |
The identifier of the site group to update. |
|
|
String |
No |
Site group name. Maximum 32 characters. |
|
|
String |
No |
Site group description. Maximum 250 characters. |
|
|
Array of Permission objects |
No |
Only permitted for customer admin. Requires the request parameters |
|
|
Array of String |
No |
Array of site identifiers. |
|
|
Array of String |
No |
Only permitted for customer admin. Requires the request parameters |
|
|
Integer |
No |
Only permitted for customer admin. Minimum audience size. Segments with an audience less than that minAudienceSize during durationForMinAudienceSize will be deleted automatically. |
|
|
Integer |
No |
Only permitted for customer admin. Duration for minAudienceSize. Segments with an audience less than that minAudienceSize during durationForMinAudienceSize will be deleted automatically. |
|
|
Boolean |
No |
Only permitted for customer admin. Enables segment auto deletion by |
|
|
Boolean |
Only permitted for customer admin. Activating this option leads to updating and/or deleting related segments in case of automatic deletion of the main segments of the site group. |
Fields that are not specified will not be updated. To clear a field, set it to an empty string/array.
It is important to note that an Array of Site Identifiers will overwrite the existing sites connected to the Site Group.
So if you want to add a new siteId to an existing group, you must run the command with all the currently attached siteIds PLUS the siteId of the new site you want to add.
Permission
Permission management is only available for customer admins and requires request parameters ?experimental=true&customerAdmin=true.
The permission object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
Yes |
The user to update the permissions for. The username must exist already. |
|
|
Boolean |
No |
True if the user should have read access to this site group (default is true). |
|
|
Boolean |
No |
True if the user should have write access to this site group (default is false). |
If neither read nor write is set to true, the permission for the user will be removed.
Response
The response object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Site group identifier. |
|
|
String |
Site group name. (max 32 characters) |
|
|
String |
Site group description. |
|
|
Array of String |
Array of site identifiers that are directly linked to this site group. |
|
|
Array of Object |
Array of permission objects specifying the users that have access to the site group and their permission. Note: This will only contain the current user except for customer admin. |
|
|
List of Strings |
List of parent site groups for which the user has read permissions. |
|
|
Integer |
Minimum audience size. Segments with an audience less than that minAudienceSize during durationForMinAudienceSize will be deleted automatically. |
|
|
Integer |
Duration for minAudienceSize. Segments with an audience less than that minAudienceSize during durationForMinAudienceSize will be deleted automatically. |
|
|
String |
The creation time. Only available for customer admin ( |
|
|
String |
User name of person who created user. Only available for customer admin ( |
|
|
String |
The last changing time. Only available for customer admin ( |
|
|
String |
User name of last person who modified user. Only available for customer admin ( |
|
|
Boolean |
Enables segment auto deletion by |
Examples
$ python cx.py /site/group/update '{"siteGroupId":"9222300742653756873","name":"New group name"}'
{
"id": "9222300742735526873"
}
$ python cx.py /site/group '{"siteGroupId":"9222300742653756873"}'
{
"siteGroups": [
{
"id": "9222300742653756873",
"name": "New group name",
"description": "Example site group",
"siteIds": [
"9222300742735526873"
],
"permissions": [
{
"username": "example@cxense.com",
"read": true,
"write": true
}
]
}
]
}