Class: Falcon::MessageCenter

Inherits:
Object
  • Object
show all
Defined in:
lib/crimson-falcon/api/message_center.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ MessageCenter

Returns a new instance of MessageCenter.



35
36
37
# File 'lib/crimson-falcon/api/message_center.rb', line 35

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



33
34
35
# File 'lib/crimson-falcon/api/message_center.rb', line 33

def api_client
  @api_client
end

Instance Method Details

#aggregate_cases(body, opts = {}) ⇒ MsaAggregatesResponse

Retrieve aggregate case values based on the matched filter

Parameters:

Returns:



42
43
44
45
# File 'lib/crimson-falcon/api/message_center.rb', line 42

def aggregate_cases(body, opts = {})
  data, _status_code, _headers = aggregate_cases_with_http_info(body, opts)
  data
end

#aggregate_cases_with_http_info(body, opts = {}) ⇒ Array<(MsaAggregatesResponse, Integer, Hash)>

Retrieve aggregate case values based on the matched filter

Parameters:

Returns:

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

    MsaAggregatesResponse data, response status code and response headers



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
91
92
93
94
95
96
97
98
99
100
101
102
# File 'lib/crimson-falcon/api/message_center.rb', line 51

def aggregate_cases_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MessageCenter.aggregate_cases ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling MessageCenter.aggregate_cases"
  end
  # resource path
  local_var_path = '/message-center/aggregates/cases/GET/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'MsaAggregatesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"MessageCenter.aggregate_cases",
    :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: MessageCenter#aggregate_cases\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#case_add_activity(body, opts = {}) ⇒ MsaspecResponseFields

Add an activity to case. Only activities of type comment are allowed via API

Parameters:

Returns:



108
109
110
111
# File 'lib/crimson-falcon/api/message_center.rb', line 108

def case_add_activity(body, opts = {})
  data, _status_code, _headers = case_add_activity_with_http_info(body, opts)
  data
end

#case_add_activity_with_http_info(body, opts = {}) ⇒ Array<(MsaspecResponseFields, Integer, Hash)>

Add an activity to case. Only activities of type comment are allowed via API

Parameters:

Returns:

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

    MsaspecResponseFields data, response status code and response headers



117
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
# File 'lib/crimson-falcon/api/message_center.rb', line 117

def case_add_activity_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MessageCenter.case_add_activity ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling MessageCenter.case_add_activity"
  end
  # resource path
  local_var_path = '/message-center/entities/case-activity/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecResponseFields'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"MessageCenter.case_add_activity",
    :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: MessageCenter#case_add_activity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#case_add_attachment(case_id, user_uuid, file, opts = {}) ⇒ MessagecenterAttachmentUploadResponse

Upload an attachment for the case. Upload an attachment for the case. Maximum upload size allowed is *15 MB*. Filename must start with [a-zA-Z0-9_-]. Allowed characters in file name are *[a-zA-Z0-9-_.\s]*. Maximum file name is 255 characters Following attachment types are allowed: - png - bmp - jpg - jpeg - gif - pdf - doc - docx - xls - xlsx - pptx - txt - csv

Parameters:

  • case_id (String)

    Case ID

  • user_uuid (String)

    User UUID

  • file (File)

    File Body

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

    the optional parameters

Returns:



177
178
179
180
# File 'lib/crimson-falcon/api/message_center.rb', line 177

def case_add_attachment(case_id, user_uuid, file, opts = {})
  data, _status_code, _headers = case_add_attachment_with_http_info(case_id, user_uuid, file, opts)
  data
end

#case_add_attachment_with_http_info(case_id, user_uuid, file, opts = {}) ⇒ Array<(MessagecenterAttachmentUploadResponse, Integer, Hash)>

Upload an attachment for the case. Upload an attachment for the case. Maximum upload size allowed is *15 MB*. Filename must start with [a-zA-Z0-9_-]. Allowed characters in file name are *[a-zA-Z0-9-_.\s]*. Maximum file name is 255 characters Following attachment types are allowed: - png - bmp - jpg - jpeg - gif - pdf - doc - docx - xls - xlsx - pptx - txt - csv

Parameters:

  • case_id (String)

    Case ID

  • user_uuid (String)

    User UUID

  • file (File)

    File Body

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

    the optional parameters

Returns:



189
190
191
192
193
194
195
196
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
249
250
251
# File 'lib/crimson-falcon/api/message_center.rb', line 189

def case_add_attachment_with_http_info(case_id, user_uuid, file, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MessageCenter.case_add_attachment ...'
  end
  # verify the required parameter 'case_id' is set
  if @api_client.config.client_side_validation && case_id.nil?
    fail ArgumentError, "Missing the required parameter 'case_id' when calling MessageCenter.case_add_attachment"
  end
  # verify the required parameter 'user_uuid' is set
  if @api_client.config.client_side_validation && user_uuid.nil?
    fail ArgumentError, "Missing the required parameter 'user_uuid' when calling MessageCenter.case_add_attachment"
  end
  # verify the required parameter 'file' is set
  if @api_client.config.client_side_validation && file.nil?
    fail ArgumentError, "Missing the required parameter 'file' when calling MessageCenter.case_add_attachment"
  end
  # resource path
  local_var_path = '/message-center/entities/case-attachment/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['multipart/form-data'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['case_id'] = case_id
  form_params['user_uuid'] = user_uuid
  form_params['file'] = file

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MessagecenterAttachmentUploadResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"MessageCenter.case_add_attachment",
    :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: MessageCenter#case_add_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#case_download_attachment(id, opts = {}) ⇒ String

retrieves an attachment for the case, given the attachment id

Parameters:

  • id (String)

    attachment ID

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

    the optional parameters

Returns:

  • (String)


257
258
259
260
# File 'lib/crimson-falcon/api/message_center.rb', line 257

def case_download_attachment(id, opts = {})
  data, _status_code, _headers = case_download_attachment_with_http_info(id, opts)
  data
end

#case_download_attachment_with_http_info(id, opts = {}) ⇒ Array<(String, Integer, Hash)>

retrieves an attachment for the case, given the attachment id

Parameters:

  • id (String)

    attachment ID

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
# File 'lib/crimson-falcon/api/message_center.rb', line 266

def case_download_attachment_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MessageCenter.case_download_attachment ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling MessageCenter.case_download_attachment"
  end
  # resource path
  local_var_path = '/message-center/entities/case-attachment/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'id'] = id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'image/png', 'image/bmp', 'image/jpeg', 'image/jpg', 'image/gif', 'application/zip', 'application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'text/plain'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'String'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"MessageCenter.case_download_attachment",
    :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: MessageCenter#case_download_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_case_v2(body, opts = {}) ⇒ MsaReplyAffectedEntities

create a new case

Parameters:

Returns:



319
320
321
322
# File 'lib/crimson-falcon/api/message_center.rb', line 319

def create_case_v2(body, opts = {})
  data, _status_code, _headers = create_case_v2_with_http_info(body, opts)
  data
end

#create_case_v2_with_http_info(body, opts = {}) ⇒ Array<(MsaReplyAffectedEntities, Integer, Hash)>

create a new case

Parameters:

Returns:

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

    MsaReplyAffectedEntities data, response status code and response headers



328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
# File 'lib/crimson-falcon/api/message_center.rb', line 328

def create_case_v2_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MessageCenter.create_case_v2 ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling MessageCenter.create_case_v2"
  end
  # resource path
  local_var_path = '/message-center/entities/case/v2'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'MsaReplyAffectedEntities'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"MessageCenter.create_case_v2",
    :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: MessageCenter#create_case_v2\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_case_activity_by_ids(body, opts = {}) ⇒ ApiMessageCenterActivityResponse

Retrieve activities for given id’s

Parameters:

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

    the optional parameters

Returns:



385
386
387
388
# File 'lib/crimson-falcon/api/message_center.rb', line 385

def get_case_activity_by_ids(body, opts = {})
  data, _status_code, _headers = get_case_activity_by_ids_with_http_info(body, opts)
  data
end

#get_case_activity_by_ids_with_http_info(body, opts = {}) ⇒ Array<(ApiMessageCenterActivityResponse, Integer, Hash)>

Retrieve activities for given id&#39;s

Parameters:

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

    the optional parameters

Returns:



394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
# File 'lib/crimson-falcon/api/message_center.rb', line 394

def get_case_activity_by_ids_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MessageCenter.get_case_activity_by_ids ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling MessageCenter.get_case_activity_by_ids"
  end
  # resource path
  local_var_path = '/message-center/entities/case-activities/GET/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ApiMessageCenterActivityResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"MessageCenter.get_case_activity_by_ids",
    :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: MessageCenter#get_case_activity_by_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_case_entities_by_ids(body, opts = {}) ⇒ ApiMessageCenterCasesResponse

Retrieve message center cases

Parameters:

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

    the optional parameters

Returns:



451
452
453
454
# File 'lib/crimson-falcon/api/message_center.rb', line 451

def get_case_entities_by_ids(body, opts = {})
  data, _status_code, _headers = get_case_entities_by_ids_with_http_info(body, opts)
  data
end

#get_case_entities_by_ids_with_http_info(body, opts = {}) ⇒ Array<(ApiMessageCenterCasesResponse, Integer, Hash)>

Retrieve message center cases

Parameters:

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

    the optional parameters

Returns:



460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
# File 'lib/crimson-falcon/api/message_center.rb', line 460

def get_case_entities_by_ids_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MessageCenter.get_case_entities_by_ids ...'
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling MessageCenter.get_case_entities_by_ids"
  end
  # resource path
  local_var_path = '/message-center/entities/cases/GET/v1'

  # 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'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
    header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(body)

  # return_type
  return_type = opts[:debug_return_type] || 'ApiMessageCenterCasesResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"MessageCenter.get_case_entities_by_ids",
    :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: MessageCenter#get_case_entities_by_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#query_activity_by_case_id(case_id, opts = {}) ⇒ MsaspecQueryResponse

Retrieve activities id’s for a case

Parameters:

  • case_id (String)

    Case ID

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum records to return. [1-500]

  • :sort (String)

    The property to sort on, followed by a dot (.), followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot;.

  • :filter (String)

    Optional filter and sort criteria in the form of an FQL query. Allowed filters are: activity.created_time activity.type

  • :offset (Integer)

    Starting index of overall result set from which to return ids.

Returns:



521
522
523
524
# File 'lib/crimson-falcon/api/message_center.rb', line 521

def query_activity_by_case_id(case_id, opts = {})
  data, _status_code, _headers = query_activity_by_case_id_with_http_info(case_id, opts)
  data
end

#query_activity_by_case_id_with_http_info(case_id, opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Retrieve activities id&#39;s for a case

Parameters:

  • case_id (String)

    Case ID

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum records to return. [1-500]

  • :sort (String)

    The property to sort on, followed by a dot (.), followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot;.

  • :filter (String)

    Optional filter and sort criteria in the form of an FQL query. Allowed filters are: activity.created_time activity.type

  • :offset (Integer)

    Starting index of overall result set from which to return ids.

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
# File 'lib/crimson-falcon/api/message_center.rb', line 534

def query_activity_by_case_id_with_http_info(case_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MessageCenter.query_activity_by_case_id ...'
  end
  # verify the required parameter 'case_id' is set
  if @api_client.config.client_side_validation && case_id.nil?
    fail ArgumentError, "Missing the required parameter 'case_id' when calling MessageCenter.query_activity_by_case_id"
  end
  allowable_values = ["activity.type.asc", "activity.type.desc", "activity.created_time.asc", "activity.created_time.desc"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/message-center/queries/case-activities/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'case_id'] = case_id
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"MessageCenter.query_activity_by_case_id",
    :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: MessageCenter#query_activity_by_case_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#query_cases_ids_by_filter(opts = {}) ⇒ MsaspecQueryResponse

Retrieve case id’s that match the provided filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum records to return. [1-500]

  • :sort (String)

    The property to sort on, followed by a dot (.), followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot;.

  • :filter (String)

    Optional filter and sort criteria in the form of an FQL query. Allowed filters are: _all activity.body case.aids case.assigner.display_name case.assigner.first_name case.assigner.last_name case.assigner.uid case.assigner.uuid case.body case.created_time case.detections.id case.hosts case.id case.incidents.id case.ip_addresses case.key case.last_modified_time case.status case.status case.title case.type

  • :offset (Integer)

    Starting index of overall result set from which to return ids.

Returns:



598
599
600
601
# File 'lib/crimson-falcon/api/message_center.rb', line 598

def query_cases_ids_by_filter(opts = {})
  data, _status_code, _headers = query_cases_ids_by_filter_with_http_info(opts)
  data
end

#query_cases_ids_by_filter_with_http_info(opts = {}) ⇒ Array<(MsaspecQueryResponse, Integer, Hash)>

Retrieve case id&#39;s that match the provided filter criteria

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum records to return. [1-500]

  • :sort (String)

    The property to sort on, followed by a dot (.), followed by the sort direction, either &quot;asc&quot; or &quot;desc&quot;.

  • :filter (String)

    Optional filter and sort criteria in the form of an FQL query. Allowed filters are: _all activity.body case.aids case.assigner.display_name case.assigner.first_name case.assigner.last_name case.assigner.uid case.assigner.uuid case.body case.created_time case.detections.id case.hosts case.id case.incidents.id case.ip_addresses case.key case.last_modified_time case.status case.status case.title case.type

  • :offset (Integer)

    Starting index of overall result set from which to return ids.

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
# File 'lib/crimson-falcon/api/message_center.rb', line 610

def query_cases_ids_by_filter_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: MessageCenter.query_cases_ids_by_filter ...'
  end
  allowable_values = ["case.created_time.asc", "case.created_time.desc", "case.last_modified_time.asc", "case.last_modified_time.desc", "case.status.asc", "case.status.desc", "case.type.asc", "case.type.desc", "case.id.asc", "case.id.desc"]
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
    fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
  end
  # resource path
  local_var_path = '/message-center/queries/cases/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'MsaspecQueryResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['oauth2']

  new_options = opts.merge(
    :operation => :"MessageCenter.query_cases_ids_by_filter",
    :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: MessageCenter#query_cases_ids_by_filter\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end