apis/lib/influxdb2/apis/generated/api/users_api.rb
# Add a member to a scraper target
# @param scraper_target_id [String] The scraper target ID.
# @param add_resource_member_request_body [AddResourceMemberRequestBody] User to add as member
# @param [Hash] opts the optional parameters
# @option opts [String] :zap_trace_span OpenTracing span context
# @return [Array<(ResourceMember, Integer, Hash)>] ResourceMember data, response status code and response headers
Add a member to a scraper target
Add a member to a scraper target
def post_scrapers_id_members_with_http_info(scraper_target_id, add_resource_member_request_body, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: UsersApi.post_scrapers_id_members ...'
      end
      if @api_client.config.client_side_validation && scraper_target_id.nil?
        fail ArgumentError, "Missing the required parameter 'scraper_target_id' when calling UsersApi.post_scrapers_id_members"
      end
      if @api_client.config.client_side_validation && add_resource_member_request_body.nil?
        fail ArgumentError, "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_scrapers_id_members"
      end
      local_var_path = '/scrapers/{scraperTargetID}/members'.sub('{' + 'scraperTargetID' + '}', CGI.escape(scraper_target_id.to_s))
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
      header_params[:'Zap-Trace-Span'] = opts[:'zap_trace_span'] if !opts[:'zap_trace_span'].nil?
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(add_resource_member_request_body)
      return_type = opts[:debug_return_type] || 'ResourceMember'
      auth_names = opts[:debug_auth_names] || ['header']
      new_options = opts.merge(
        :operation => :"UsersApi.post_scrapers_id_members",
        :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(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: UsersApi#post_scrapers_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def post_scrapers_id_members_with_http_info ( scraper_target_id , add_resource_member_request_body , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: UsersApi.post_scrapers_id_members ...' end if @api_client . config . client_side_validation && scraper_target_id . nil? fail ArgumentError , "Missing the required parameter 'scraper_target_id' when calling UsersApi.post_scrapers_id_members" end if @api_client . config . client_side_validation && add_resource_member_request_body . nil? fail ArgumentError , "Missing the required parameter 'add_resource_member_request_body' when calling UsersApi.post_scrapers_id_members" end local_var_path = '/scrapers/{scraperTargetID}/members' . sub ( '{' + 'scraperTargetID' + '}' , CGI . escape ( scraper_target_id . to_s ) ) query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] ) header_params [ :' Zap-Trace-Span ' ] = opts [ :' zap_trace_span ' ] if ! opts [ :' zap_trace_span ' ] . nil? form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( add_resource_member_request_body ) return_type = opts [ :debug_return_type ] || 'ResourceMember' auth_names = opts [ :debug_auth_names ] || [ 'header' ] new_options = opts . merge ( :operation => :" UsersApi.post_scrapers_id_members " , :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 ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: UsersApi#post_scrapers_id_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Add a member to a scraper target
Add a member to a scraper target
# verify the required parameter 'scraper_target_id' is set # verify the required parameter 'add_resource_member_request_body' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
ResourceMember data, response status code and response headers
ResourceMember data response status code and response headers
Array<(ResourceMember, Integer, Hash)>
scraper_target_id
The scraper target ID.
The scraper target ID .
add_resource_member_request_body
User to add as member
User to add as member
opts
:zap_trace_span OpenTracing span context
: zap_trace_span OpenTracing span context
opts the optional parameters
opts the optional parameters