class AlfrescoAPI::GroupsApi
Attributes
Public Class Methods
# File lib/alfresco_api/api/groups_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Create a group Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Create a group. The group id must start with "GROUP_". If this is omitted it will be added automatically. This format is also returned when listing groups or group memberships. It should be noted that the other group-related operations also expect the id to start with "GROUP_". If one or more parentIds are specified then the group will be created and become a member of each of the specified parent groups. If no parentIds are specified then the group will be created as a root group. The group will be created in the APP.DEFAULT and AUTH.ALF zones. You must have admin rights to create a group.
@param group_body_create The group to create. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [GroupEntry]
# File lib/alfresco_api/api/groups_api.rb, line 30 def create_group(group_body_create, opts = {}) data, _status_code, _headers = create_group_with_http_info(group_body_create, opts) return data end
Create a group membership Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Create a group membership (for an existing person or group) within a group groupId. If the added group was previously a root group then it becomes a non-root group since it now has a parent. It is an error to specify an id that does not exist. You must have admin rights to create a group membership. @param group_id The identifier of a group. @param group_membership_body_create The group membership to add (person or sub-group). @param [Hash] opts the optional parameters @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [GroupMemberEntry]
# File lib/alfresco_api/api/groups_api.rb, line 91 def create_group_membership(group_id, group_membership_body_create, opts = {}) data, _status_code, _headers = create_group_membership_with_http_info(group_id, group_membership_body_create, opts) return data end
Create a group membership Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Create a group membership (for an existing person or group) within a group groupId. If the added group was previously a root group then it becomes a non-root group since it now has a parent. It is an error to specify an id that does not exist. You must have admin rights to create a group membership. @param group_id The identifier of a group. @param group_membership_body_create The group membership to add (person or sub-group). @param [Hash] opts the optional parameters @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(GroupMemberEntry
, Fixnum, Hash)>] GroupMemberEntry
data, response status code and response headers
# File lib/alfresco_api/api/groups_api.rb, line 103 def create_group_membership_with_http_info(group_id, group_membership_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.create_group_membership ..." end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.create_group_membership" end # verify the required parameter 'group_membership_body_create' is set if @api_client.config.client_side_validation && group_membership_body_create.nil? fail ArgumentError, "Missing the required parameter 'group_membership_body_create' when calling GroupsApi.create_group_membership" end # resource path local_var_path = "/groups/{groupId}/members".sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(group_membership_body_create) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GroupMemberEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#create_group_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a group Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Create a group. The group id must start with "GROUP_". If this is omitted it will be added automatically. This format is also returned when listing groups or group memberships. It should be noted that the other group-related operations also expect the id to start with "GROUP_". If one or more parentIds are specified then the group will be created and become a member of each of the specified parent groups. If no parentIds are specified then the group will be created as a root group. The group will be created in the APP.DEFAULT and AUTH.ALF zones. You must have admin rights to create a group.
@param group_body_create The group to create. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(GroupEntry
, Fixnum, Hash)>] GroupEntry
data, response status code and response headers
# File lib/alfresco_api/api/groups_api.rb, line 42 def create_group_with_http_info(group_body_create, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.create_group ..." end # verify the required parameter 'group_body_create' is set if @api_client.config.client_side_validation && group_body_create.nil? fail ArgumentError, "Missing the required parameter 'group_body_create' when calling GroupsApi.create_group" end # resource path local_var_path = "/groups" # query parameters query_params = {} query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(group_body_create) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GroupEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#create_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a group Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Delete group groupId. The option to cascade delete applies this recursively to any hierarchy of group members. In this case, removing a group member does not delete the person or sub-group itself. If a removed sub-group no longer has any parent groups then it becomes a root group. You must have admin rights to delete a group. @param group_id The identifier of a group. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :cascade If true then the delete will be applied in cascade to sub-groups. (default to false) @return [nil]
# File lib/alfresco_api/api/groups_api.rb, line 154 def delete_group(group_id, opts = {}) delete_group_with_http_info(group_id, opts) return nil end
Delete a group membership Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Delete group member groupMemberId (person or sub-group) from group groupId. Removing a group member does not delete the person or sub-group itself. If a removed sub-group no longer has any parent groups then it becomes a root group. You must have admin rights to delete a group membership. @param group_id The identifier of a group. @param group_member_id The identifier of a person or group. @param [Hash] opts the optional parameters @return [nil]
# File lib/alfresco_api/api/groups_api.rb, line 211 def delete_group_membership(group_id, group_member_id, opts = {}) delete_group_membership_with_http_info(group_id, group_member_id, opts) return nil end
Delete a group membership Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Delete group member groupMemberId (person or sub-group) from group groupId. Removing a group member does not delete the person or sub-group itself. If a removed sub-group no longer has any parent groups then it becomes a root group. You must have admin rights to delete a group membership. @param group_id The identifier of a group. @param group_member_id The identifier of a person or group. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/groups_api.rb, line 222 def delete_group_membership_with_http_info(group_id, group_member_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.delete_group_membership ..." end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.delete_group_membership" end # verify the required parameter 'group_member_id' is set if @api_client.config.client_side_validation && group_member_id.nil? fail ArgumentError, "Missing the required parameter 'group_member_id' when calling GroupsApi.delete_group_membership" end # resource path local_var_path = "/groups/{groupId}/members/{groupMemberId}".sub('{' + 'groupId' + '}', group_id.to_s).sub('{' + 'groupMemberId' + '}', group_member_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#delete_group_membership\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Delete a group Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Delete group groupId. The option to cascade delete applies this recursively to any hierarchy of group members. In this case, removing a group member does not delete the person or sub-group itself. If a removed sub-group no longer has any parent groups then it becomes a root group. You must have admin rights to delete a group. @param group_id The identifier of a group. @param [Hash] opts the optional parameters @option opts [BOOLEAN] :cascade If true then the delete will be applied in cascade to sub-groups. @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# File lib/alfresco_api/api/groups_api.rb, line 165 def delete_group_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.delete_group ..." end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.delete_group" end # resource path local_var_path = "/groups/{groupId}".sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} query_params[:'cascade'] = opts[:'cascade'] if !opts[:'cascade'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#delete_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Get group details Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Get details for group groupId. You can use the include parameter to return additional information. @param group_id The identifier of a group. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [GroupEntry]
# File lib/alfresco_api/api/groups_api.rb, line 272 def get_group(group_id, opts = {}) data, _status_code, _headers = get_group_with_http_info(group_id, opts) return data end
Get group details Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Get details for group groupId. You can use the include parameter to return additional information. @param group_id The identifier of a group. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(GroupEntry
, Fixnum, Hash)>] GroupEntry
data, response status code and response headers
# File lib/alfresco_api/api/groups_api.rb, line 284 def get_group_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.get_group ..." end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.get_group" end # resource path local_var_path = "/groups/{groupId}".sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GroupEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#get_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List memberships of a group Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Gets a list of the group memberships for the group groupId. You can use the where parameter to filter the returned groups by memberType. Example to filter by memberType, use any one of: “` (memberType='GROUP') (memberType='PERSON') “` The default sort order for the returned list is for group members to be sorted by ascending displayName. You can override the default by using the orderBy parameter. You can specify one of the following fields in the orderBy parameter: * id * displayName @param group_id The identifier of a group. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0) @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. @option opts [String] :where A string to restrict the returned objects by using a predicate. @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [GroupMemberPaging]
# File lib/alfresco_api/api/groups_api.rb, line 336 def list_group_memberships(group_id, opts = {}) data, _status_code, _headers = list_group_memberships_with_http_info(group_id, opts) return data end
List group memberships Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Gets a list of group membership information for person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. You can use the include parameter to return additional information. You can use the where parameter to filter the returned groups by isRoot. For example, the following where clause will return just the root groups: “` (isRoot=true) “` The where parameter can also be used to filter by ***zone***. This may be combined with isRoot to narrow a result set even further. For example, the following where clause will only return groups belonging to the `MY.ZONE` zone. “` where=(zones in ('MY.ZONE')) “` This may be combined with the isRoot filter, as shown below: “` where=(isRoot=false AND zones in ('MY.ZONE')) “` ***Note:*** restrictions include * `AND` is the only supported operator when combining `isRoot` and `zones` filters * Only one zone is supported by the filter * The quoted zone name must be placed in parenthesis — a 400 error will result if these are omitted. The default sort order for the returned list is for groups to be sorted by ascending displayName. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * displayName @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0) @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [String] :where A string to restrict the returned objects by using a predicate. @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [GroupPaging]
# File lib/alfresco_api/api/groups_api.rb, line 415 def list_group_memberships_for_person(person_id, opts = {}) data, _status_code, _headers = list_group_memberships_for_person_with_http_info(person_id, opts) return data end
List group memberships Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Gets a list of group membership information for person personId. You can use the `-me-` string in place of `<personId>` to specify the currently authenticated user. You can use the include parameter to return additional information. You can use the where parameter to filter the returned groups by isRoot. For example, the following where clause will return just the root groups: ``` (isRoot=true) ``` The where parameter can also be used to filter by ***zone***. This may be combined with isRoot to narrow a result set even further. For example, the following where clause will only return groups belonging to the `MY.ZONE` zone. ``` where=(zones in ('MY.ZONE')) ``` This may be combined with the isRoot filter, as shown below: ``` where=(isRoot=false AND zones in ('MY.ZONE')) ``` ***Note:*** restrictions include * `AND` is the only supported operator when combining `isRoot` and `zones` filters * Only one zone is supported by the filter * The quoted zone name must be placed in parenthesis — a 400 error will result if these are omitted. The default sort order for the returned list is for groups to be sorted by ascending displayName. You can override the default by using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * displayName @param person_id The identifier of a person. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [String] :where A string to restrict the returned objects by using a predicate. @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(GroupPaging
, Fixnum, Hash)>] GroupPaging
data, response status code and response headers
# File lib/alfresco_api/api/groups_api.rb, line 431 def list_group_memberships_for_person_with_http_info(person_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.list_group_memberships_for_person ..." end # verify the required parameter 'person_id' is set if @api_client.config.client_side_validation && person_id.nil? fail ArgumentError, "Missing the required parameter 'person_id' when calling GroupsApi.list_group_memberships_for_person" end if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling GroupsApi.list_group_memberships_for_person, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling GroupsApi.list_group_memberships_for_person, must be greater than or equal to 1.' end # resource path local_var_path = "/people/{personId}/groups".sub('{' + 'personId' + '}', person_id.to_s) # query parameters query_params = {} query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GroupPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#list_group_memberships_for_person\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List memberships of a group Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Gets a list of the group memberships for the group groupId. You can use the where parameter to filter the returned groups by memberType. Example to filter by memberType, use any one of: ``` (memberType='GROUP') (memberType='PERSON') ``` The default sort order for the returned list is for group members to be sorted by ascending displayName. You can override the default by using the orderBy parameter. You can specify one of the following fields in the orderBy parameter: * id * displayName @param group_id The identifier of a group. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. @option opts [String] :where A string to restrict the returned objects by using a predicate. @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(GroupMemberPaging
, Fixnum, Hash)>] GroupMemberPaging
data, response status code and response headers
# File lib/alfresco_api/api/groups_api.rb, line 351 def list_group_memberships_with_http_info(group_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.list_group_memberships ..." end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.list_group_memberships" end if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling GroupsApi.list_group_memberships, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling GroupsApi.list_group_memberships, must be greater than or equal to 1.' end # resource path local_var_path = "/groups/{groupId}/members".sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].nil? query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GroupMemberPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#list_group_memberships\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
List groups Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Gets a list of groups. You can use the include parameter to return additional information. You can use the where parameter to filter the returned groups by isRoot. For example, the following where clause will return just the root groups: “` (isRoot=true) “` The where parameter can also be used to filter by ***zone***. This may be combined with isRoot to narrow a result set even further. For example, the following where clause will only return groups belonging to the `MY.ZONE` zone. “` where=(zones in ('MY.ZONE')) “` This may be combined with the isRoot filter, as shown below: “` where=(isRoot=false AND zones in ('MY.ZONE')) “` ***Note:*** restrictions include * `AND` is the only supported operator when combining `isRoot` and `zones` filters * Only one zone is supported by the filter * The quoted zone name must be placed in parenthesis — a 400 error will result if these are omitted. The default sort order for the returned list is for groups to be sorted by ascending displayName. You can override the default by using the orderBy parameter. You can specify one of the following fields in the orderBy parameter: * id * displayName @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0) @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [String] :where A string to restrict the returned objects by using a predicate. @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [GroupPaging]
# File lib/alfresco_api/api/groups_api.rb, line 495 def list_groups(opts = {}) data, _status_code, _headers = list_groups_with_http_info(opts) return data end
List groups Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Gets a list of groups. You can use the include parameter to return additional information. You can use the where parameter to filter the returned groups by isRoot. For example, the following where clause will return just the root groups: ``` (isRoot=true) ``` The where parameter can also be used to filter by ***zone***. This may be combined with isRoot to narrow a result set even further. For example, the following where clause will only return groups belonging to the `MY.ZONE` zone. ``` where=(zones in ('MY.ZONE')) ``` This may be combined with the isRoot filter, as shown below: ``` where=(isRoot=false AND zones in ('MY.ZONE')) ``` ***Note:*** restrictions include * `AND` is the only supported operator when combining `isRoot` and `zones` filters * Only one zone is supported by the filter * The quoted zone name must be placed in parenthesis — a 400 error will result if these are omitted. The default sort order for the returned list is for groups to be sorted by ascending displayName. You can override the default by using the orderBy parameter. You can specify one of the following fields in the orderBy parameter: * id * displayName @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [Array<String>] :order_by A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field. @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [String] :where A string to restrict the returned objects by using a predicate. @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(GroupPaging
, Fixnum, Hash)>] GroupPaging
data, response status code and response headers
# File lib/alfresco_api/api/groups_api.rb, line 510 def list_groups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.list_groups ..." end if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0 fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling GroupsApi.list_groups, must be greater than or equal to 0.' end if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1 fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling GroupsApi.list_groups, must be greater than or equal to 1.' end # resource path local_var_path = "/groups" # query parameters query_params = {} query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GroupPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#list_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Update group details Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Update details (displayName) for group groupId. You must have admin rights to update a group. @param group_id The identifier of a group. @param group_body_update The group information to update. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [GroupEntry]
# File lib/alfresco_api/api/groups_api.rb, line 568 def update_group(group_id, group_body_update, opts = {}) data, _status_code, _headers = update_group_with_http_info(group_id, group_body_update, opts) return data end
Update group details Note: this endpoint is available in Alfresco 5.2.1 and newer versions. Update details (displayName) for group groupId. You must have admin rights to update a group. @param group_id The identifier of a group. @param group_body_update The group information to update. @param [Hash] opts the optional parameters @option opts [Array<String>] :include Returns additional information about the group. The following optional fields can be requested: * parentIds * zones @option opts [Array<String>] :fields A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter. @return [Array<(GroupEntry
, Fixnum, Hash)>] GroupEntry
data, response status code and response headers
# File lib/alfresco_api/api/groups_api.rb, line 581 def update_group_with_http_info(group_id, group_body_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: GroupsApi.update_group ..." end # verify the required parameter 'group_id' is set if @api_client.config.client_side_validation && group_id.nil? fail ArgumentError, "Missing the required parameter 'group_id' when calling GroupsApi.update_group" end # verify the required parameter 'group_body_update' is set if @api_client.config.client_side_validation && group_body_update.nil? fail ArgumentError, "Missing the required parameter 'group_body_update' when calling GroupsApi.update_group" end # resource path local_var_path = "/groups/{groupId}".sub('{' + 'groupId' + '}', group_id.to_s) # query parameters query_params = {} query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(group_body_update) auth_names = ['basicAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'GroupEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: GroupsApi#update_group\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end