class AlfrescoAPI::QueriesApi
Attributes
Public Class Methods
# File lib/alfresco_api/api/queries_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Find nodes Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of nodes that match the given search criteria. The search term is used to look for nodes that match against name, title, description, full text content or tags. The search term: - must contain a minimum of 3 alphanumeric characters - allows "quoted term" - can optionally use '*' for wildcard matching By default, file and folder types will be searched unless a specific type is provided as a query parameter. By default, the search will be across the repository unless a specific root node id is provided to start the search from. You can sort the result list using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * name * modifiedAt * createdAt @param term The term to search for. @param [Hash] opts the optional parameters @option opts [String] :root_node_id The id of the node to start the search from. Supports the aliases -my-, -root- and -shared-. @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 [String] :node_type Restrict the returned results to only those of the given node type and its sub-types @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties @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>] :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 [NodePaging]
# File lib/alfresco_api/api/queries_api.rb, line 35 def find_nodes(term, opts = {}) data, _status_code, _headers = find_nodes_with_http_info(term, opts) return data end
Find nodes Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of nodes that match the given search criteria. The search term is used to look for nodes that match against name, title, description, full text content or tags. The search term: - must contain a minimum of 3 alphanumeric characters - allows "quoted term" - can optionally use '*' for wildcard matching By default, file and folder types will be searched unless a specific type is provided as a query parameter. By default, the search will be across the repository unless a specific root node id is provided to start the search from. You can sort the result list using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * name * modifiedAt * createdAt @param term The term to search for. @param [Hash] opts the optional parameters @option opts [String] :root_node_id The id of the node to start the search from. Supports the aliases -my-, -root- and -shared-. @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 [String] :node_type Restrict the returned results to only those of the given node type and its sub-types @option opts [Array<String>] :include Returns additional information about the node. The following optional fields can be requested: * allowableOperations * aspectNames * isLink * isLocked * path * properties @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>] :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<(NodePaging
, Fixnum, Hash)>] NodePaging
data, response status code and response headers
# File lib/alfresco_api/api/queries_api.rb, line 52 def find_nodes_with_http_info(term, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QueriesApi.find_nodes ..." end # verify the required parameter 'term' is set if @api_client.config.client_side_validation && term.nil? fail ArgumentError, "Missing the required parameter 'term' when calling QueriesApi.find_nodes" 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 QueriesApi.find_nodes, 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 QueriesApi.find_nodes, must be greater than or equal to 1.' end # resource path local_var_path = "/queries/nodes" # query parameters query_params = {} query_params[:'term'] = term query_params[:'rootNodeId'] = opts[:'root_node_id'] if !opts[:'root_node_id'].nil? query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'nodeType'] = opts[:'node_type'] if !opts[:'node_type'].nil? query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil? query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].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 => 'NodePaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: QueriesApi#find_nodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Find people Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of people that match the given search criteria. The search term is used to look for matches against person id, firstname and lastname. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term You can sort the result list using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * firstName * lastName
@param term The term to search for. @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>] :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. @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. @return [PersonPaging]
# File lib/alfresco_api/api/queries_api.rb, line 117 def find_people(term, opts = {}) data, _status_code, _headers = find_people_with_http_info(term, opts) return data end
Find people Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of people that match the given search criteria. The search term is used to look for matches against person id, firstname and lastname. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term You can sort the result list using the orderBy parameter. You can specify one or more of the following fields in the orderBy parameter: * id * firstName * lastName
@param term The term to search for. @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>] :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. @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. @return [Array<(PersonPaging
, Fixnum, Hash)>] PersonPaging
data, response status code and response headers
# File lib/alfresco_api/api/queries_api.rb, line 131 def find_people_with_http_info(term, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QueriesApi.find_people ..." end # verify the required parameter 'term' is set if @api_client.config.client_side_validation && term.nil? fail ArgumentError, "Missing the required parameter 'term' when calling QueriesApi.find_people" 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 QueriesApi.find_people, 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 QueriesApi.find_people, must be greater than or equal to 1.' end # resource path local_var_path = "/queries/people" # query parameters query_params = {} query_params[:'term'] = term query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil? query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil? query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].nil? query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].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 => 'PersonPaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: QueriesApi#find_people\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Find sites Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of sites that match the given search criteria. The search term is used to look for sites that match against site id, title or description. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term The default sort order for the returned list is for sites to be sorted by ascending id. 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 * title * description @param term The term to search for. @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>] :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 [SitePaging]
# File lib/alfresco_api/api/queries_api.rb, line 193 def find_sites(term, opts = {}) data, _status_code, _headers = find_sites_with_http_info(term, opts) return data end
Find sites Note: this endpoint is available in Alfresco 5.2 and newer versions. Gets a list of sites that match the given search criteria. The search term is used to look for sites that match against site id, title or description. The search term: - must contain a minimum of 2 alphanumeric characters - can optionally use '*' for wildcard matching within the term The default sort order for the returned list is for sites to be sorted by ascending id. 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 * title * description @param term The term to search for. @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>] :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<(SitePaging
, Fixnum, Hash)>] SitePaging
data, response status code and response headers
# File lib/alfresco_api/api/queries_api.rb, line 207 def find_sites_with_http_info(term, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: QueriesApi.find_sites ..." end # verify the required parameter 'term' is set if @api_client.config.client_side_validation && term.nil? fail ArgumentError, "Missing the required parameter 'term' when calling QueriesApi.find_sites" 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 QueriesApi.find_sites, 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 QueriesApi.find_sites, must be greater than or equal to 1.' end # resource path local_var_path = "/queries/sites" # query parameters query_params = {} query_params[:'term'] = term 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[:'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 => 'SitePaging') if @api_client.config.debugging @api_client.config.logger.debug "API called: QueriesApi#find_sites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end