class DependencyTracker::LdapApi
Attributes
Public Class Methods
# File lib/dependency-tracker-client/api/ldap_api.rb, line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Adds a mapping @param [Hash] opts the optional parameters @option opts [MappedLdapGroupRequest] :body @return [MappedLdapGroup]
# File lib/dependency-tracker-client/api/ldap_api.rb, line 26 def add_mapping(opts = {}) data, _status_code, _headers = add_mapping_with_http_info(opts) data end
Adds a mapping @param [Hash] opts the optional parameters @option opts [MappedLdapGroupRequest] :body @return [Array<(MappedLdapGroup
, Integer, Hash)>] MappedLdapGroup
data, response status code and response headers
# File lib/dependency-tracker-client/api/ldap_api.rb, line 35 def add_mapping_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LdapApi.add_mapping ...' end # resource path local_var_path = '/v1/ldap/mapping' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'MappedLdapGroup' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LdapApi#add_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Removes a mapping @param uuid [String] The UUID of the mapping to delete @param [Hash] opts the optional parameters @return [MappedLdapGroup]
# File lib/dependency-tracker-client/api/ldap_api.rb, line 82 def delete_mapping(uuid, opts = {}) data, _status_code, _headers = delete_mapping_with_http_info(uuid, opts) data end
Removes a mapping @param uuid [String] The UUID of the mapping to delete @param [Hash] opts the optional parameters @return [Array<(MappedLdapGroup
, Integer, Hash)>] MappedLdapGroup
data, response status code and response headers
# File lib/dependency-tracker-client/api/ldap_api.rb, line 91 def delete_mapping_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LdapApi.delete_mapping ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling LdapApi.delete_mapping" end # resource path local_var_path = '/v1/ldap/mapping/{uuid}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'MappedLdapGroup' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LdapApi#delete_mapping\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the DNs of all accessible groups within the directory This API performs a pass-thru query to the configured LDAP server. Search criteria results are cached using default Alpine CacheManager policy @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/dependency-tracker-client/api/ldap_api.rb, line 142 def retrieve_ldap_groups(opts = {}) data, _status_code, _headers = retrieve_ldap_groups_with_http_info(opts) data end
Returns the DNs of all groups mapped to the specified team @param uuid [String] The UUID of the team to retrieve mappings for @param [Hash] opts the optional parameters @return [Array<String>]
# File lib/dependency-tracker-client/api/ldap_api.rb, line 198 def retrieve_ldap_groups1(uuid, opts = {}) data, _status_code, _headers = retrieve_ldap_groups1_with_http_info(uuid, opts) data end
Returns the DNs of all groups mapped to the specified team @param uuid [String] The UUID of the team to retrieve mappings for @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
# File lib/dependency-tracker-client/api/ldap_api.rb, line 207 def retrieve_ldap_groups1_with_http_info(uuid, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LdapApi.retrieve_ldap_groups1 ...' end # verify the required parameter 'uuid' is set if @api_client.config.client_side_validation && uuid.nil? fail ArgumentError, "Missing the required parameter 'uuid' when calling LdapApi.retrieve_ldap_groups1" end # resource path local_var_path = '/v1/ldap/team/{uuid}'.sub('{' + 'uuid' + '}', CGI.escape(uuid.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<String>' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LdapApi#retrieve_ldap_groups1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Returns the DNs of all accessible groups within the directory This API performs a pass-thru query to the configured LDAP server. Search criteria results are cached using default Alpine CacheManager policy @param [Hash] opts the optional parameters @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
# File lib/dependency-tracker-client/api/ldap_api.rb, line 151 def retrieve_ldap_groups_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LdapApi.retrieve_ldap_groups ...' end # resource path local_var_path = '/v1/ldap/groups' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Array<String>' # auth_names auth_names = opts[:auth_names] || ['X-Api-Key'] new_options = opts.merge( :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: LdapApi#retrieve_ldap_groups\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end