GroupResource Resource

Resource to get groups

GET /group

List groups.
The result can be filtered by

  • id
  • name
  • description
and sorted by
  • id
  • name
  • description

Request Parameters
name type description default constraints
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
perms query Flag to add permission information for the returned items. false boolean
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GroupList (JSON) list of groups

Example

Request
GET /group
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "linkoverview", "deletefolder" ],
    "property2" : [ "updateconstructs", "readtemplates" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /group/list

Get a list of groups, optionally filtered sorted and paged.

Request Parameters
name type description default constraints multivalued
children query ids of child groups for the group(s) to return (filter)   int yes
folder query ids of folders for filtering by folder permissions (together with "privileges")   int yes
id query id of the group to return (filter)   int yes
maxItems query maximum number of groups returned (paging) -1 int no
memberid query id of the group member for the group(s) to return (filter)   int yes
memberlogin query login name of the group member for the group(s) to return (filter)     yes
name query name or name pattern of the group(s) to return (filter)     yes
perms query Flag to add permission information for the returned items. false boolean no
privileges query list of privileges for filtering by folder permissions (together with "folder")   "assignpermissions" or "createfile" or "createfolder" or "createpage" or "createtemplate" or "deletefile" or "deletefolder" or "deletepage" or "deletetemplate" or "importpage" or "inheritance" or "linktemplate" or "linkworkflow" or "publishpage" or "synchronizechannel" or "translatepage" or "updatefile" or "updatefolder" or "updatepage" or "updatetagtypes" or "updatetemplate" or "viewfile" or "viewfolder" or "viewpage" or "viewtemplate" or "wastebin" yes
reduce query if set, the list of groups will be reduced: for nested groups, only parent group(s) or child group(s) will be returned   "child" or "parent" no
skipCount query number of groups skipped in the list (paging) 0 int no
sortby query name of the sorted attribute (sorting)   "id" or "name" no
sortorder query sortorder (sorting) asc "ASC" or "DESC" or "NONE" or "asc" or "desc" or "none" no
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GroupsResponse (JSON) response containing the groups

Example

Request
GET /group/list
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "groups" : [ {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  }, {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  } ],
  "perms" : {
    "property1" : [ "create", "updateform" ],
    "property2" : [ "readtemplates", "deletefolder" ]
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /group/load

Load the groups the user may see

Request Parameters
name type description default constraints
perms query Flag to add permission information for the returned items. false boolean
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GroupsResponse (JSON) response containing groups

Example

Request
GET /group/load
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "groups" : [ {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  }, {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  } ],
  "perms" : {
    "property1" : [ "create", "updateconstructs" ],
    "property2" : [ "createform", "updateform" ]
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /group/{id}

Delete a group

Request Parameters
name type description
id path local group ID
Response Codes
code condition
204 Group {id} was deactivated.
404 Group {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json object (JSON) empty response

Example

Request
DELETE /group/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

GET /group/{id}

Load group with given ID

Request Parameters
name type description
id path local group ID
Response Codes
code condition
200 Group {id} exists.
404 Group {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GroupLoadResponse (JSON) group response

Example

Request
GET /group/{id}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "group" : {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /group/{id}

Update a group

Request Parameters
name type description
id path local group ID
Request Body
media type data type description
application/json Group (JSON) new group data
Response Codes
code condition
200 Group {id} was updated.
404 Group {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GroupLoadResponse (JSON) updated group

Example

Request
POST /group/{id}
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "name" : "...",
  "description" : "...",
  "children" : [ {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  }, {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  } ]
}
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "group" : {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /group/{id}/groups

List subgroups of the given group.
The result can be filtered by

  • id
  • name
  • description
and sorted by
  • id
  • name
  • description

Request Parameters
name type description default constraints
id path local group ID    
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
perms query Flag to add permission information for the returned items. false boolean
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
200 Group {id} exists.
404 Group {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GroupList (JSON) list of subgroups

Example

Request
GET /group/{id}/groups
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "view", "updateinheritance" ],
    "property2" : [ "updateitems", "deletetemplates" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /group/{id}/groups

Create subgroup

Request Parameters
name type description
id path local group ID
Request Body
media type data type description
application/json Group (JSON) group
Response Codes
code condition
201 Group was created.
404 Group {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GroupLoadResponse (JSON) created group

Example

Request
PUT /group/{id}/groups
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "name" : "...",
  "description" : "...",
  "children" : [ {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  }, {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  } ]
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "group" : {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /group/{id}/perms

Get permissions set for a group. If no parentType is given, only root-level permissions will be returned. Otherwise, the permissions on child types/instances of the given parentType/parentId will be returned.

Request Parameters
name type description constraints
id path group ID  
channelId query optional channel ID int
parentId query optional parent ID int
parentType query optional parent type  
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TypePermissionList (JSON) Permissions response

Example

Request
GET /group/{id}/perms
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ {
    "type" : "...",
    "id" : 12345,
    "channelId" : 12345,
    "label" : "...",
    "description" : "...",
    "perms" : [ {
      "type" : "deletegroup",
      "label" : "...",
      "description" : "...",
      "category" : "...",
      "value" : true,
      "editable" : true
    }, {
      "type" : "updatebundle",
      "label" : "...",
      "description" : "...",
      "category" : "...",
      "value" : true,
      "editable" : true
    } ],
    "roles" : [ {
      "id" : 12345,
      "label" : "...",
      "description" : "...",
      "value" : true,
      "editable" : true
    }, {
      "id" : 12345,
      "label" : "...",
      "description" : "...",
      "value" : true,
      "editable" : true
    } ],
    "children" : true,
    "editable" : true
  }, {
    "type" : "...",
    "id" : 12345,
    "channelId" : 12345,
    "label" : "...",
    "description" : "...",
    "perms" : [ {
      "type" : "linktemplates",
      "label" : "...",
      "description" : "...",
      "category" : "...",
      "value" : true,
      "editable" : true
    }, {
      "type" : "publishform",
      "label" : "...",
      "description" : "...",
      "category" : "...",
      "value" : true,
      "editable" : true
    } ],
    "roles" : [ {
      "id" : 12345,
      "label" : "...",
      "description" : "...",
      "value" : true,
      "editable" : true
    }, {
      "id" : 12345,
      "label" : "...",
      "description" : "...",
      "value" : true,
      "editable" : true
    } ],
    "children" : true,
    "editable" : true
  } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "deletetemplates", "updatetemplates" ],
    "property2" : [ "deleteform", "linktemplates" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /group/{id}/users

List users of given group.
The result can be filtered by

  • id
  • login
  • firstName
  • lastName
  • email
and sorted by
  • id
  • login
  • firstName
  • lastName
  • email

Request Parameters
name type description default constraints
id path local group ID    
page query Returned page, if paging is used. Paging starts with 1 1 int
pageSize query Page size for paging. If this is set to -1 no paging is used (all matching items are returned). Setting this to 0 will return no items. -1 int
perms query Flag to add permission information for the returned items. false boolean
q query Query string for filtering    
sort query Comma separated list of sorted attributes. Each attribute name may be prefixed with + for sorting in ascending order or - for sorting in descending order name  
Response Codes
code condition
200 Group {id} exists.
404 Group {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json UserList (JSON) list of group members

Example

Request
GET /group/{id}/users
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "items" : [ { }, { } ],
  "hasMoreItems" : true,
  "numItems" : 12345,
  "perms" : {
    "property1" : [ "translatepages", "delete" ],
    "property2" : [ "createtemplates", "setperm" ]
  },
  "stagingStatus" : {
    "property1" : {
      "packageName" : "...",
      "included" : true
    },
    "property2" : {
      "packageName" : "...",
      "included" : true
    }
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /group/{id}/users

Create user in the given group

Request Parameters
name type description
id path local group ID
Request Body
media type data type description
application/json User (JSON) user to create
Response Codes
code condition
201 User was created.
404 Group {id} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json UserLoadResponse (JSON) created user

Example

Request
PUT /group/{id}/users
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "firstName" : "...",
  "lastName" : "...",
  "description" : "...",
  "email" : "...",
  "groups" : [ {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  }, {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  } ],
  "login" : "...",
  "password" : "..."
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "user" : {
    "id" : 12345,
    "firstName" : "...",
    "lastName" : "...",
    "description" : "...",
    "email" : "...",
    "groups" : [ {
      "id" : 12345,
      "name" : "...",
      "description" : "...",
      "children" : [ { }, { } ]
    }, {
      "id" : 12345,
      "name" : "...",
      "description" : "...",
      "children" : [ { }, { } ]
    } ],
    "login" : "...",
    "password" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

PUT /group/{id}/groups/{subgroupId}

Move subgroup

Request Parameters
name type description
id path local mother group ID
subgroupId path
Response Codes
code condition
200 Group was moved.
404 Group {id} or subgroup {subgroupId} does not exist.
409 Group {subgroupId} cannot be moved to group {id}.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GroupLoadResponse (JSON) created group

Example

Request
PUT /group/{id}/groups/{subgroupId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "group" : {
    "id" : 12345,
    "name" : "...",
    "description" : "...",
    "children" : [ { }, { } ]
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /group/{id}/perms/{type}

Get type permissions for a group

Request Parameters
name type description
id path group ID
type path type
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TypePermissionResponse (JSON) Permissions response

Example

Request
GET /group/{id}/perms/{type}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "perms" : [ {
    "type" : "userassignment",
    "label" : "...",
    "description" : "...",
    "category" : "...",
    "value" : true,
    "editable" : true
  }, {
    "type" : "formreport",
    "label" : "...",
    "description" : "...",
    "category" : "...",
    "value" : true,
    "editable" : true
  } ],
  "roles" : [ {
    "id" : 12345,
    "label" : "...",
    "description" : "...",
    "value" : true,
    "editable" : true
  }, {
    "id" : 12345,
    "label" : "...",
    "description" : "...",
    "value" : true,
    "editable" : true
  } ],
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /group/{id}/perms/{type}

Set type permissions for a group

Request Parameters
name type description default constraints
id path group ID    
type path type    
wait query wait timeout in milliseconds 0 long
Request Body
media type data type description
application/json TypePermissionRequest (JSON) request
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GenericResponse (JSON) response

Example

Request
POST /group/{id}/perms/{type}
Content-Type: application/json
Accept: application/json

                
{
  "perms" : [ {
    "type" : "channelsync",
    "label" : "...",
    "description" : "...",
    "category" : "...",
    "value" : true,
    "editable" : true
  }, {
    "type" : "creategroup",
    "label" : "...",
    "description" : "...",
    "category" : "...",
    "value" : true,
    "editable" : true
  } ],
  "roles" : [ {
    "id" : 12345,
    "label" : "...",
    "description" : "...",
    "value" : true,
    "editable" : true
  }, {
    "id" : 12345,
    "label" : "...",
    "description" : "...",
    "value" : true,
    "editable" : true
  } ],
  "subGroups" : true,
  "subObjects" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

DELETE /group/{id}/users/{userId}

Remove user from a group

Request Parameters
name type description
id path local group ID
userId path local user ID
Response Codes
code condition
204 User was removed.
404 Group {id} or user {userId} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json object (JSON) empty response

Example

Request
DELETE /group/{id}/users/{userId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
...
                
              

PUT /group/{id}/users/{userId}

Add existing user to the given group

Request Parameters
name type description
id path local group ID
userId path local user ID
Response Codes
code condition
200 User was added.
404 Group {id} or user {userId} does not exist.
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json UserLoadResponse (JSON) user

Example

Request
PUT /group/{id}/users/{userId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "user" : {
    "id" : 12345,
    "firstName" : "...",
    "lastName" : "...",
    "description" : "...",
    "email" : "...",
    "groups" : [ {
      "id" : 12345,
      "name" : "...",
      "description" : "...",
      "children" : [ { }, { } ]
    }, {
      "id" : 12345,
      "name" : "...",
      "description" : "...",
      "children" : [ { }, { } ]
    } ],
    "login" : "...",
    "password" : "..."
  },
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

GET /group/{id}/perms/{type}/{instanceId}

Get instance permissions for a group

Request Parameters
name type description constraints
id path group ID  
instanceId path instance ID int
type path type  
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json TypePermissionResponse (JSON) Permissions response

Example

Request
GET /group/{id}/perms/{type}/{instanceId}
Content-Type: */*
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "perms" : [ {
    "type" : "editimport",
    "label" : "...",
    "description" : "...",
    "category" : "...",
    "value" : true,
    "editable" : true
  }, {
    "type" : "read",
    "label" : "...",
    "description" : "...",
    "category" : "...",
    "value" : true,
    "editable" : true
  } ],
  "roles" : [ {
    "id" : 12345,
    "label" : "...",
    "description" : "...",
    "value" : true,
    "editable" : true
  }, {
    "id" : 12345,
    "label" : "...",
    "description" : "...",
    "value" : true,
    "editable" : true
  } ],
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}
                
              

POST /group/{id}/perms/{type}/{instanceId}

Set instance permissions for a group

Request Parameters
name type description default constraints
id path group ID    
instanceId path instance ID   int
type path type    
wait query wait timeout in milliseconds 0 long
Request Body
media type data type description
application/json TypePermissionRequest (JSON) request
Response Codes
code condition
401 No valid sid and session secret cookie were provided.
403 User has insufficient permissions.
Response Body
media type data type description
application/json GenericResponse (JSON) response

Example

Request
POST /group/{id}/perms/{type}/{instanceId}
Content-Type: application/json
Accept: application/json

                
{
  "perms" : [ {
    "type" : "updategroup",
    "label" : "...",
    "description" : "...",
    "category" : "...",
    "value" : true,
    "editable" : true
  }, {
    "type" : "createoverview",
    "label" : "...",
    "description" : "...",
    "category" : "...",
    "value" : true,
    "editable" : true
  } ],
  "roles" : [ {
    "id" : 12345,
    "label" : "...",
    "description" : "...",
    "value" : true,
    "editable" : true
  }, {
    "id" : 12345,
    "label" : "...",
    "description" : "...",
    "value" : true,
    "editable" : true
  } ],
  "subGroups" : true,
  "subObjects" : true
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "messages" : [ { }, { } ],
  "responseInfo" : {
    "responseCode" : "OK",
    "responseMessage" : "...",
    "property" : "..."
  }
}