Class: CtdDocumentation::TasksQueriesController

Inherits:
BaseController show all
Defined in:
lib/ctd_documentation/controllers/tasks_queries_controller.rb

Overview

TasksQueriesController

Constant Summary

Constants inherited from BaseController

BaseController::GLOBAL_ERRORS

Instance Attribute Summary

Attributes inherited from BaseController

#config, #http_call_back

Instance Method Summary collapse

Methods inherited from BaseController

#initialize, #new_api_call_builder, #new_parameter, #new_request_builder, #new_response_handler, user_agent

Constructor Details

This class inherits a constructor from CtdDocumentation::BaseController

Instance Method Details

#get_queries_ids_and_assigned_task(site_id, scan_rid) ⇒ GetQueriesIdsAndAssignedTaskResponse

List all queries and their ids, and which queries are assigned to the task

Parameters:

  • site_id (Integer)

    Required parameter: Example:

  • scan_rid (String)

    Required parameter: Example:

Returns:



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/ctd_documentation/controllers/tasks_queries_controller.rb', line 13

def get_queries_ids_and_assigned_task(site_id,
                                      scan_rid)
  new_api_call_builder
    .request(new_request_builder(HttpMethodEnum::GET,
                                 '/ranger/task_query_configurations',
                                 Server::DEFAULT)
               .query_param(new_parameter(site_id, key: 'site_id'))
               .query_param(new_parameter(scan_rid, key: 'scan_rid'))
               .header_param(new_parameter('application/json', key: 'accept'))
               .auth(Single.new('global')))
    .response(new_response_handler
               .deserializer(APIHelper.method(:custom_type_deserializer))
               .deserialize_into(GetQueriesIdsAndAssignedTaskResponse.method(:from_hash)))
    .execute
end