Class: stcloud::TagApiControllerApi

Inherits:
Object
  • Object
show all
Defined in:
lib/stcloud/api/tag_api_controller_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ TagApiControllerApi

Returns a new instance of TagApiControllerApi.



16
17
18
# File 'lib/stcloud/api/tag_api_controller_api.rb', line 16

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



14
15
16
# File 'lib/stcloud/api/tag_api_controller_api.rb', line 14

def api_client
  @api_client
end

Instance Method Details

#get_tag_names_using_get(app_ids, opts = {}) ⇒ TagNamesResponse

Gets tag names for the given application identifiers appearing in the given time frame.

Parameters:

  • app_ids

    appIds

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (Integer)

    from

  • :to (Integer)

    to

  • :metrics (BOOLEAN)

    metrics (default to true)

  • :logs (BOOLEAN)

    logs (default to true)

  • :events (BOOLEAN)

    events (default to false)

  • :rum (BOOLEAN)

    rum (default to true)

Returns:



29
30
31
32
# File 'lib/stcloud/api/tag_api_controller_api.rb', line 29

def get_tag_names_using_get(app_ids, opts = {})
  data, _status_code, _headers = get_tag_names_using_get_with_http_info(app_ids, opts)
  data
end

#get_tag_names_using_get_with_http_info(app_ids, opts = {}) ⇒ Array<(TagNamesResponse, Integer, Hash)>

Gets tag names for the given application identifiers appearing in the given time frame.

Parameters:

  • app_ids

    appIds

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (Integer)

    from

  • :to (Integer)

    to

  • :metrics (BOOLEAN)

    metrics

  • :logs (BOOLEAN)

    logs

  • :events (BOOLEAN)

    events

  • :rum (BOOLEAN)

    rum

Returns:

  • (Array<(TagNamesResponse, Integer, Hash)>)

    TagNamesResponse data, response status code and response headers



44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/stcloud/api/tag_api_controller_api.rb', line 44

def get_tag_names_using_get_with_http_info(app_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TagApiControllerApi.get_tag_names_using_get ...'
  end
  # verify the required parameter 'app_ids' is set
  if @api_client.config.client_side_validation && app_ids.nil?
    fail ArgumentError, "Missing the required parameter 'app_ids' when calling TagApiControllerApi.get_tag_names_using_get"
  end
  # resource path
  local_var_path = '/spm-reports/api/v3/apps/{appIds}/tagNames'.sub('{' + 'appIds' + '}', app_ids.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'metrics'] = opts[:'metrics'] if !opts[:'metrics'].nil?
  query_params[:'logs'] = opts[:'logs'] if !opts[:'logs'].nil?
  query_params[:'events'] = opts[:'events'] if !opts[:'events'].nil?
  query_params[:'rum'] = opts[:'rum'] if !opts[:'rum'].nil?

  # 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 = opts[:return_type] || 'TagNamesResponse' 

  auth_names = opts[:auth_names] || ['api_key']
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TagApiControllerApi#get_tag_names_using_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_using_get2(app_ids, tag, opts = {}) ⇒ Hash<String, Dimension>

Gets values for specified tags for the given application identifiers appearing in the given time frame.

Parameters:

  • app_ids

    appIds

  • tag

    tag

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (Integer)

    from

  • :to (Integer)

    to

  • :metrics (BOOLEAN)

    metrics (default to true)

  • :logs (BOOLEAN)

    logs (default to true)

  • :events (BOOLEAN)

    events (default to false)

  • :rum (BOOLEAN)

    rum (default to true)

Returns:



102
103
104
105
# File 'lib/stcloud/api/tag_api_controller_api.rb', line 102

def get_using_get2(app_ids, tag, opts = {})
  data, _status_code, _headers = get_using_get2_with_http_info(app_ids, tag, opts)
  data
end

#get_using_get2_with_http_info(app_ids, tag, opts = {}) ⇒ Array<(Hash<String, Dimension>, Integer, Hash)>

Gets values for specified tags for the given application identifiers appearing in the given time frame.

Parameters:

  • app_ids

    appIds

  • tag

    tag

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (Integer)

    from

  • :to (Integer)

    to

  • :metrics (BOOLEAN)

    metrics

  • :logs (BOOLEAN)

    logs

  • :events (BOOLEAN)

    events

  • :rum (BOOLEAN)

    rum

Returns:

  • (Array<(Hash<String, Dimension>, Integer, Hash)>)

    Hash<String, Dimension> data, response status code and response headers



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
# File 'lib/stcloud/api/tag_api_controller_api.rb', line 118

def get_using_get2_with_http_info(app_ids, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TagApiControllerApi.get_using_get2 ...'
  end
  # verify the required parameter 'app_ids' is set
  if @api_client.config.client_side_validation && app_ids.nil?
    fail ArgumentError, "Missing the required parameter 'app_ids' when calling TagApiControllerApi.get_using_get2"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling TagApiControllerApi.get_using_get2"
  end
  # resource path
  local_var_path = '/spm-reports/api/v3/apps/{appIds}/metrics/filters'.sub('{' + 'appIds' + '}', app_ids.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tag'] = @api_client.build_collection_param(tag, :multi)
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'metrics'] = opts[:'metrics'] if !opts[:'metrics'].nil?
  query_params[:'logs'] = opts[:'logs'] if !opts[:'logs'].nil?
  query_params[:'events'] = opts[:'events'] if !opts[:'events'].nil?
  query_params[:'rum'] = opts[:'rum'] if !opts[:'rum'].nil?

  # 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 = opts[:return_type] || 'Hash<String, Dimension>' 

  auth_names = opts[:auth_names] || ['api_key']
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TagApiControllerApi#get_using_get2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_using_get3(app_ids, tag, opts = {}) ⇒ Hash<String, Dimension>

Gets values for specified tags for the given application identifiers appearing in the given time frame.

Parameters:

  • app_ids

    appIds

  • tag

    tag

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (Integer)

    from

  • :to (Integer)

    to

  • :metrics (BOOLEAN)

    metrics (default to true)

  • :logs (BOOLEAN)

    logs (default to true)

  • :events (BOOLEAN)

    events (default to false)

  • :rum (BOOLEAN)

    rum (default to true)

Returns:



181
182
183
184
# File 'lib/stcloud/api/tag_api_controller_api.rb', line 181

def get_using_get3(app_ids, tag, opts = {})
  data, _status_code, _headers = get_using_get3_with_http_info(app_ids, tag, opts)
  data
end

#get_using_get3_with_http_info(app_ids, tag, opts = {}) ⇒ Array<(Hash<String, Dimension>, Integer, Hash)>

Gets values for specified tags for the given application identifiers appearing in the given time frame.

Parameters:

  • app_ids

    appIds

  • tag

    tag

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :from (Integer)

    from

  • :to (Integer)

    to

  • :metrics (BOOLEAN)

    metrics

  • :logs (BOOLEAN)

    logs

  • :events (BOOLEAN)

    events

  • :rum (BOOLEAN)

    rum

Returns:

  • (Array<(Hash<String, Dimension>, Integer, Hash)>)

    Hash<String, Dimension> data, response status code and response headers



197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
# File 'lib/stcloud/api/tag_api_controller_api.rb', line 197

def get_using_get3_with_http_info(app_ids, tag, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: TagApiControllerApi.get_using_get3 ...'
  end
  # verify the required parameter 'app_ids' is set
  if @api_client.config.client_side_validation && app_ids.nil?
    fail ArgumentError, "Missing the required parameter 'app_ids' when calling TagApiControllerApi.get_using_get3"
  end
  # verify the required parameter 'tag' is set
  if @api_client.config.client_side_validation && tag.nil?
    fail ArgumentError, "Missing the required parameter 'tag' when calling TagApiControllerApi.get_using_get3"
  end
  # resource path
  local_var_path = '/spm-reports/api/v3/apps/{appIds}/tags'.sub('{' + 'appIds' + '}', app_ids.to_s)

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tag'] = @api_client.build_collection_param(tag, :multi)
  query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
  query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
  query_params[:'metrics'] = opts[:'metrics'] if !opts[:'metrics'].nil?
  query_params[:'logs'] = opts[:'logs'] if !opts[:'logs'].nil?
  query_params[:'events'] = opts[:'events'] if !opts[:'events'].nil?
  query_params[:'rum'] = opts[:'rum'] if !opts[:'rum'].nil?

  # 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 = opts[:return_type] || 'Hash<String, Dimension>' 

  auth_names = opts[:auth_names] || ['api_key']
  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 => return_type)

  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: TagApiControllerApi#get_using_get3\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end