Class: Falcon::UserManagementApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UserManagementApi

Returns a new instance of UserManagementApi.



36
37
38
# File 'lib/crimson-falcon/api/user_management_api.rb', line 36

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



34
35
36
# File 'lib/crimson-falcon/api/user_management_api.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#combined_user_roles_v1(user_uuid, opts = {}) ⇒ FlightcontrolapiUserGrantResponse

Get User Grant(s). This endpoint lists both direct as well as flight control grants between a User and a Customer.

Parameters:

  • user_uuid (String)

    User UUID to get available roles for.

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

    the optional parameters

Options Hash (opts):

  • :cid (String)

    Customer ID to get grants for. Empty CID would result in Role IDs for user against current CID in view.

  • :direct_only (Boolean)

    Specifies if to request direct Only role grants or all role grants between user and CID (specified in query params) (default to false)

  • :filter (String)

    Filter using a query in Falcon Query Language (FQL). Supported filters: role_id, role_name

  • :offset (Integer)

    The offset to start retrieving records from (default to 0)

  • :limit (Integer)

    The maximum records to return. [1-500] (default to 100)

  • :sort (String)

    The property to sort by (default to ‘role_name|asc’)

Returns:



49
50
51
52
# File 'lib/crimson-falcon/api/user_management_api.rb', line 49

def combined_user_roles_v1(user_uuid, opts = {})
  data, _status_code, _headers = combined_user_roles_v1_with_http_info(user_uuid, opts)
  data
end

#combined_user_roles_v1_with_http_info(user_uuid, opts = {}) ⇒ Array<(FlightcontrolapiUserGrantResponse, Integer, Hash)>

Get User Grant(s). This endpoint lists both direct as well as flight control grants between a User and a Customer.

Parameters:

  • user_uuid (String)

    User UUID to get available roles for.

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

    the optional parameters

Options Hash (opts):

  • :cid (String)

    Customer ID to get grants for. Empty CID would result in Role IDs for user against current CID in view.

  • :direct_only (Boolean)

    Specifies if to request direct Only role grants or all role grants between user and CID (specified in query params) (default to false)

  • :filter (String)

    Filter using a query in Falcon Query Language (FQL). Supported filters: role_id, role_name

  • :offset (Integer)

    The offset to start retrieving records from (default to 0)

  • :limit (Integer)

    The maximum records to return. [1-500] (default to 100)

  • :sort (String)

    The property to sort by (default to ‘role_name|asc’)

Returns:



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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/crimson-falcon/api/user_management_api.rb', line 64

def combined_user_roles_v1_with_http_info(user_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.combined_user_roles_v1 ...'
  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 UserManagementApi.combined_user_roles_v1"
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UserManagementApi.combined_user_roles_v1, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UserManagementApi.combined_user_roles_v1, must be smaller than or equal to 500.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UserManagementApi.combined_user_roles_v1, must be greater than or equal to 1.'
  end

  allowable_values = ["cid|asc", "cid|desc", "role_name|asc", "role_name|desc", "type|asc", "type|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 = '/user-management/combined/user-roles/v1'

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

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

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

#create_user(body, opts = {}) ⇒ ApiUserMetadataResponse

Deprecated : Please use POST /user-management/entities/users/v1. Create a new user. After creating a user, assign one or more roles with POST /user-roles/entities/user-roles/v1

Parameters:

  • body (DomainUserCreateRequest)

    Attributes for this user. &#x60;uid&#x60; (required) is the user&#39;s email address, which is their username in Falcon. Optional attributes: &lt;ul&gt;&lt;li&gt;&#x60;firstName&#x60;&lt;/li&gt;&lt;li&gt;&#x60;lastName&#x60;&lt;/li&gt;&lt;li&gt;&#x60;password&#x60;&lt;/li&gt;&lt;/ul&gt; As a best practice, we recommend omitting &#x60;password&#x60;. If single sign-on is enabled for your customer account, the &#x60;password&#x60; attribute is ignored. If single sign-on is not enabled, we send a user activation request to their email address when you create the user with no &#x60;password&#x60;. The user should use the activation email to set their own password.

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

    the optional parameters

Returns:



139
140
141
142
# File 'lib/crimson-falcon/api/user_management_api.rb', line 139

def create_user(body, opts = {})
  data, _status_code, _headers = create_user_with_http_info(body, opts)
  data
end

#create_user_v1(body, opts = {}) ⇒ FlightcontrolapiUserResponse

Create a new user. After creating a user, assign one or more roles with POST ‘/user-management/entities/user-role-actions/v1’

Parameters:

  • body (DomainCreateUserRequest)

    Attributes for this user. &#x60;uid&#x60; (required) is the user&#39;s email address, which is their username in Falcon. Optional attributes: &lt;ul&gt;&lt;li&gt;&#x60;firstName&#x60;&lt;/li&gt;&lt;li&gt;&#x60;lastName&#x60;&lt;/li&gt;&lt;li&gt;&#x60;password&#x60;&lt;/li&gt;&lt;/ul&gt; As a best practice, we recommend omitting &#x60;password&#x60;. If single sign-on is enabled for your customer account, the &#x60;password&#x60; attribute is ignored. If single sign-on is not enabled, we send a user activation request to their email address when you create the user with no &#x60;password&#x60;. The user should use the activation email to set their own password.

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

    the optional parameters

Options Hash (opts):

  • :validate_only (Boolean)

    Validate of user is allowed, but do not create user. (default to false)

Returns:



206
207
208
209
# File 'lib/crimson-falcon/api/user_management_api.rb', line 206

def create_user_v1(body, opts = {})
  data, _status_code, _headers = create_user_v1_with_http_info(body, opts)
  data
end

#create_user_v1_with_http_info(body, opts = {}) ⇒ Array<(FlightcontrolapiUserResponse, Integer, Hash)>

Create a new user. After creating a user, assign one or more roles with POST &#39;/user-management/entities/user-role-actions/v1&#39;

Parameters:

  • body (DomainCreateUserRequest)

    Attributes for this user. &#x60;uid&#x60; (required) is the user&#39;s email address, which is their username in Falcon. Optional attributes: &lt;ul&gt;&lt;li&gt;&#x60;firstName&#x60;&lt;/li&gt;&lt;li&gt;&#x60;lastName&#x60;&lt;/li&gt;&lt;li&gt;&#x60;password&#x60;&lt;/li&gt;&lt;/ul&gt; As a best practice, we recommend omitting &#x60;password&#x60;. If single sign-on is enabled for your customer account, the &#x60;password&#x60; attribute is ignored. If single sign-on is not enabled, we send a user activation request to their email address when you create the user with no &#x60;password&#x60;. The user should use the activation email to set their own password.

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

    the optional parameters

Options Hash (opts):

  • :validate_only (Boolean)

    Validate of user is allowed, but do not create user. (default to false)

Returns:



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
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
# File 'lib/crimson-falcon/api/user_management_api.rb', line 216

def create_user_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.create_user_v1 ...'
  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 UserManagementApi.create_user_v1"
  end
  # resource path
  local_var_path = '/user-management/entities/users/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'validate_only'] = opts[:'validate_only'] if !opts[:'validate_only'].nil?

  # 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] || 'FlightcontrolapiUserResponse'

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

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

#create_user_with_http_info(body, opts = {}) ⇒ Array<(ApiUserMetadataResponse, Integer, Hash)>

Deprecated : Please use POST /user-management/entities/users/v1. Create a new user. After creating a user, assign one or more roles with POST /user-roles/entities/user-roles/v1

Parameters:

  • body (DomainUserCreateRequest)

    Attributes for this user. &#x60;uid&#x60; (required) is the user&#39;s email address, which is their username in Falcon. Optional attributes: &lt;ul&gt;&lt;li&gt;&#x60;firstName&#x60;&lt;/li&gt;&lt;li&gt;&#x60;lastName&#x60;&lt;/li&gt;&lt;li&gt;&#x60;password&#x60;&lt;/li&gt;&lt;/ul&gt; As a best practice, we recommend omitting &#x60;password&#x60;. If single sign-on is enabled for your customer account, the &#x60;password&#x60; attribute is ignored. If single sign-on is not enabled, we send a user activation request to their email address when you create the user with no &#x60;password&#x60;. The user should use the activation email to set their own password.

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

    the optional parameters

Returns:

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

    ApiUserMetadataResponse data, response status code and response headers



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# File 'lib/crimson-falcon/api/user_management_api.rb', line 148

def create_user_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.create_user ...'
  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 UserManagementApi.create_user"
  end
  # resource path
  local_var_path = '/users/entities/users/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] || 'ApiUserMetadataResponse'

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

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

#delete_user(user_uuid, opts = {}) ⇒ MsaReplyMetaOnly

Deprecated : Please use DELETE /user-management/entities/users/v1. Delete a user permanently

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

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

    the optional parameters

Returns:



274
275
276
277
# File 'lib/crimson-falcon/api/user_management_api.rb', line 274

def delete_user(user_uuid, opts = {})
  data, _status_code, _headers = delete_user_with_http_info(user_uuid, opts)
  data
end

#delete_user_v1(user_uuid, opts = {}) ⇒ MsaspecResponseFields

Delete a user permanently.

Parameters:

  • user_uuid (String)

    User UUID.

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

    the optional parameters

Returns:



336
337
338
339
# File 'lib/crimson-falcon/api/user_management_api.rb', line 336

def delete_user_v1(user_uuid, opts = {})
  data, _status_code, _headers = delete_user_v1_with_http_info(user_uuid, opts)
  data
end

#delete_user_v1_with_http_info(user_uuid, opts = {}) ⇒ Array<(MsaspecResponseFields, Integer, Hash)>

Delete a user permanently.

Parameters:

  • user_uuid (String)

    User UUID.

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

    the optional parameters

Returns:

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

    MsaspecResponseFields data, response status code and response headers



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
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/crimson-falcon/api/user_management_api.rb', line 345

def delete_user_v1_with_http_info(user_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.delete_user_v1 ...'
  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 UserManagementApi.delete_user_v1"
  end
  # resource path
  local_var_path = '/user-management/entities/users/v1'

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

  # 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] || 'MsaspecResponseFields'

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

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

#delete_user_with_http_info(user_uuid, opts = {}) ⇒ Array<(MsaReplyMetaOnly, Integer, Hash)>

Deprecated : Please use DELETE /user-management/entities/users/v1. Delete a user permanently

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

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

    the optional parameters

Returns:

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

    MsaReplyMetaOnly data, response status code and response headers



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
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/crimson-falcon/api/user_management_api.rb', line 283

def delete_user_with_http_info(user_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.delete_user ...'
  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 UserManagementApi.delete_user"
  end
  # resource path
  local_var_path = '/users/entities/users/v1'

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

  # 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] || 'MsaReplyMetaOnly'

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

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

#entities_roles_v1(ids, opts = {}) ⇒ FlightcontrolapiGetRolesResponse

Get info about a role

Parameters:

  • ids (Array<String>)

    ID of a role. Find a role ID from &#x60;/user-management/queries/roles/v1&#x60;.

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

    the optional parameters

Options Hash (opts):

  • :cid (String)

    Customer ID to get available roles for. Empty CID would result in Role IDs for current CID in view.

Returns:



399
400
401
402
# File 'lib/crimson-falcon/api/user_management_api.rb', line 399

def entities_roles_v1(ids, opts = {})
  data, _status_code, _headers = entities_roles_v1_with_http_info(ids, opts)
  data
end

#entities_roles_v1_with_http_info(ids, opts = {}) ⇒ Array<(FlightcontrolapiGetRolesResponse, Integer, Hash)>

Get info about a role

Parameters:

  • ids (Array<String>)

    ID of a role. Find a role ID from &#x60;/user-management/queries/roles/v1&#x60;.

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

    the optional parameters

Options Hash (opts):

  • :cid (String)

    Customer ID to get available roles for. Empty CID would result in Role IDs for current CID in view.

Returns:



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
446
447
448
449
450
451
452
453
454
455
456
457
# File 'lib/crimson-falcon/api/user_management_api.rb', line 409

def entities_roles_v1_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.entities_roles_v1 ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling UserManagementApi.entities_roles_v1"
  end
  # resource path
  local_var_path = '/user-management/entities/roles/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)
  query_params[:'cid'] = opts[:'cid'] if !opts[:'cid'].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] || 'FlightcontrolapiGetRolesResponse'

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

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

#get_available_role_ids(opts = {}) ⇒ MsaQueryResponse

Deprecated : Please use GET /user-management/queries/roles/v1. Show role IDs for all roles available in your customer account. For more information on each role, provide the role ID to ‘/customer/entities/roles/v1`.

Parameters:

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

    the optional parameters

Returns:



462
463
464
465
# File 'lib/crimson-falcon/api/user_management_api.rb', line 462

def get_available_role_ids(opts = {})
  data, _status_code, _headers = get_available_role_ids_with_http_info(opts)
  data
end

#get_available_role_ids_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Deprecated : Please use GET /user-management/queries/roles/v1. Show role IDs for all roles available in your customer account. For more information on each role, provide the role ID to &#x60;/customer/entities/roles/v1&#x60;.

Parameters:

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

    the optional parameters

Returns:

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

    MsaQueryResponse data, response status code and response headers



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

def get_available_role_ids_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.get_available_role_ids ...'
  end
  # resource path
  local_var_path = '/user-roles/queries/user-role-ids-by-cid/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'])

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

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

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

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

  new_options = opts.merge(
    :operation => :"UserManagementApi.get_available_role_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserManagementApi#get_available_role_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_roles(ids, opts = {}) ⇒ ApiUserRoleResponse

Deprecated : Please use GET /user-management/entities/roles/v1. Get info about a role

Parameters:

  • ids (Array<String>)

    ID of a role. Find a role ID from &#x60;/customer/queries/roles/v1&#x60; or &#x60;/users/queries/roles/v1&#x60;.

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

    the optional parameters

Returns:



518
519
520
521
# File 'lib/crimson-falcon/api/user_management_api.rb', line 518

def get_roles(ids, opts = {})
  data, _status_code, _headers = get_roles_with_http_info(ids, opts)
  data
end

#get_roles_with_http_info(ids, opts = {}) ⇒ Array<(ApiUserRoleResponse, Integer, Hash)>

Deprecated : Please use GET /user-management/entities/roles/v1. Get info about a role

Parameters:

  • ids (Array<String>)

    ID of a role. Find a role ID from &#x60;/customer/queries/roles/v1&#x60; or &#x60;/users/queries/roles/v1&#x60;.

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

    the optional parameters

Returns:

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

    ApiUserRoleResponse data, response status code and response headers



527
528
529
530
531
532
533
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
# File 'lib/crimson-falcon/api/user_management_api.rb', line 527

def get_roles_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.get_roles ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling UserManagementApi.get_roles"
  end
  # resource path
  local_var_path = '/user-roles/entities/user-roles/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

  # 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] || 'ApiUserRoleResponse'

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

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

#get_user_role_ids(user_uuid, opts = {}) ⇒ MsaQueryResponse

Deprecated : Please use GET /user-management/combined/user-roles/v1. Show role IDs of roles assigned to a user. For more information on each role, provide the role ID to ‘/customer/entities/roles/v1`.

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

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

    the optional parameters

Returns:



580
581
582
583
# File 'lib/crimson-falcon/api/user_management_api.rb', line 580

def get_user_role_ids(user_uuid, opts = {})
  data, _status_code, _headers = get_user_role_ids_with_http_info(user_uuid, opts)
  data
end

#get_user_role_ids_with_http_info(user_uuid, opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Deprecated : Please use GET /user-management/combined/user-roles/v1. Show role IDs of roles assigned to a user. For more information on each role, provide the role ID to &#x60;/customer/entities/roles/v1&#x60;.

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

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

    the optional parameters

Returns:

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

    MsaQueryResponse data, response status code and response headers



589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
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
# File 'lib/crimson-falcon/api/user_management_api.rb', line 589

def get_user_role_ids_with_http_info(user_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.get_user_role_ids ...'
  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 UserManagementApi.get_user_role_ids"
  end
  # resource path
  local_var_path = '/user-roles/queries/user-role-ids-by-user-uuid/v1'

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

  # 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] || 'MsaQueryResponse'

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

  new_options = opts.merge(
    :operation => :"UserManagementApi.get_user_role_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserManagementApi#get_user_role_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#grant_user_role_ids(user_uuid, body, opts = {}) ⇒ ApiUserRoleIDsResponse

Deprecated : Please use POST /user-management/entities/user-role-actions/v1. Assign one or more roles to a user

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

  • body (DomainRoleIDs)

    Role ID(s) of the role you want to assign

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

    the optional parameters

Returns:



643
644
645
646
# File 'lib/crimson-falcon/api/user_management_api.rb', line 643

def grant_user_role_ids(user_uuid, body, opts = {})
  data, _status_code, _headers = grant_user_role_ids_with_http_info(user_uuid, body, opts)
  data
end

#grant_user_role_ids_with_http_info(user_uuid, body, opts = {}) ⇒ Array<(ApiUserRoleIDsResponse, Integer, Hash)>

Deprecated : Please use POST /user-management/entities/user-role-actions/v1. Assign one or more roles to a user

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

  • body (DomainRoleIDs)

    Role ID(s) of the role you want to assign

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

    the optional parameters

Returns:

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

    ApiUserRoleIDsResponse data, response status code and response headers



653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
# File 'lib/crimson-falcon/api/user_management_api.rb', line 653

def grant_user_role_ids_with_http_info(user_uuid, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.grant_user_role_ids ...'
  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 UserManagementApi.grant_user_role_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 UserManagementApi.grant_user_role_ids"
  end
  # resource path
  local_var_path = '/user-roles/entities/user-roles/v1'

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

  # 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] || 'ApiUserRoleIDsResponse'

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

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

#queries_roles_v1(opts = {}) ⇒ MsaspecQueryResponse

Show role IDs for all roles available in your customer account. For more information on each role, provide the role ID to ‘/user-management/entities/roles/v1`.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cid (String)

    Customer ID to get available roles for. Empty CID would result in Role IDs for current CID in view.

  • :user_uuid (String)

    User UUID to get available roles for. Empty User UUID would returns all roles IDs available for customer.

  • :action (String)

    Actionable purpose of the query (default to ‘grant’)

Returns:



717
718
719
720
# File 'lib/crimson-falcon/api/user_management_api.rb', line 717

def queries_roles_v1(opts = {})
  data, _status_code, _headers = queries_roles_v1_with_http_info(opts)
  data
end

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

Show role IDs for all roles available in your customer account. For more information on each role, provide the role ID to &#x60;/user-management/entities/roles/v1&#x60;.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :cid (String)

    Customer ID to get available roles for. Empty CID would result in Role IDs for current CID in view.

  • :user_uuid (String)

    User UUID to get available roles for. Empty User UUID would returns all roles IDs available for customer.

  • :action (String)

    Actionable purpose of the query (default to ‘grant’)

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
# File 'lib/crimson-falcon/api/user_management_api.rb', line 728

def queries_roles_v1_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.queries_roles_v1 ...'
  end
  # resource path
  local_var_path = '/user-management/queries/roles/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'cid'] = opts[:'cid'] if !opts[:'cid'].nil?
  query_params[:'user_uuid'] = opts[:'user_uuid'] if !opts[:'user_uuid'].nil?
  query_params[:'action'] = opts[:'action'] if !opts[:'action'].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 => :"UserManagementApi.queries_roles_v1",
    :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: UserManagementApi#queries_roles_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#query_user_v1(opts = {}) ⇒ MsaspecQueryResponse

List user IDs for all users in your customer account. For more information on each user, provide the user ID to ‘/user-management/entities/users/GET/v1`.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter using a query in Falcon Query Language (FQL). Supported filters: assigned_cids, cid, first_name, last_name, name, uid

  • :offset (Integer)

    The offset to start retrieving records from (default to 0)

  • :limit (Integer)

    The maximum records to return. [1-500] (default to 100)

  • :sort (String)

    The property to sort by (default to ‘uid|asc’)

Returns:



782
783
784
785
# File 'lib/crimson-falcon/api/user_management_api.rb', line 782

def query_user_v1(opts = {})
  data, _status_code, _headers = query_user_v1_with_http_info(opts)
  data
end

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

List user IDs for all users in your customer account. For more information on each user, provide the user ID to &#x60;/user-management/entities/users/GET/v1&#x60;.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :filter (String)

    Filter using a query in Falcon Query Language (FQL). Supported filters: assigned_cids, cid, first_name, last_name, name, uid

  • :offset (Integer)

    The offset to start retrieving records from (default to 0)

  • :limit (Integer)

    The maximum records to return. [1-500] (default to 100)

  • :sort (String)

    The property to sort by (default to ‘uid|asc’)

Returns:

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

    MsaspecQueryResponse data, response status code and response headers



794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
# File 'lib/crimson-falcon/api/user_management_api.rb', line 794

def query_user_v1_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.query_user_v1 ...'
  end
  if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
    fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling UserManagementApi.query_user_v1, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UserManagementApi.query_user_v1, must be smaller than or equal to 500.'
  end

  if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
    fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling UserManagementApi.query_user_v1, must be greater than or equal to 1.'
  end

  allowable_values = ["cid_name|asc", "cid_name|desc", "created_at|asc", "created_at|desc", "first_name|asc", "first_name|desc", "last_login_at|asc", "last_login_at|desc", "last_name|asc", "last_name|desc", "name|asc", "name|desc", "uid|asc", "uid|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 = '/user-management/queries/users/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].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 => :"UserManagementApi.query_user_v1",
    :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: UserManagementApi#query_user_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#retrieve_emails_by_cid(opts = {}) ⇒ MsaQueryResponse

Deprecated : Please use POST /user-management/entities/users/GET/v1. List the usernames (usually an email address) for all users in your customer account

Parameters:

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

    the optional parameters

Returns:



861
862
863
864
# File 'lib/crimson-falcon/api/user_management_api.rb', line 861

def retrieve_emails_by_cid(opts = {})
  data, _status_code, _headers = retrieve_emails_by_cid_with_http_info(opts)
  data
end

#retrieve_emails_by_cid_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Deprecated : Please use POST /user-management/entities/users/GET/v1. List the usernames (usually an email address) for all users in your customer account

Parameters:

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

    the optional parameters

Returns:

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

    MsaQueryResponse data, response status code and response headers



869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
# File 'lib/crimson-falcon/api/user_management_api.rb', line 869

def retrieve_emails_by_cid_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.retrieve_emails_by_cid ...'
  end
  # resource path
  local_var_path = '/users/queries/emails-by-cid/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'])

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

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

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

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

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

#retrieve_user(ids, opts = {}) ⇒ ApiUserMetadataResponse

Deprecated : Please use POST /user-management/entities/users/GET/v1. Get info about a user

Parameters:

  • ids (Array<String>)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

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

    the optional parameters

Returns:



917
918
919
920
# File 'lib/crimson-falcon/api/user_management_api.rb', line 917

def retrieve_user(ids, opts = {})
  data, _status_code, _headers = retrieve_user_with_http_info(ids, opts)
  data
end

#retrieve_user_uuid(uid, opts = {}) ⇒ MsaQueryResponse

Deprecated : Please use GET /user-management/queries/users/v1. Get a user’s ID by providing a username (usually an email address)

Parameters:

  • uid (Array<String>)

    A username. This is usually the user&#39;s email address, but may vary based on your configuration.

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

    the optional parameters

Returns:



979
980
981
982
# File 'lib/crimson-falcon/api/user_management_api.rb', line 979

def retrieve_user_uuid(uid, opts = {})
  data, _status_code, _headers = retrieve_user_uuid_with_http_info(uid, opts)
  data
end

#retrieve_user_uuid_with_http_info(uid, opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Deprecated : Please use GET /user-management/queries/users/v1. Get a user&#39;s ID by providing a username (usually an email address)

Parameters:

  • uid (Array<String>)

    A username. This is usually the user&#39;s email address, but may vary based on your configuration.

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

    the optional parameters

Returns:

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

    MsaQueryResponse data, response status code and response headers



988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
# File 'lib/crimson-falcon/api/user_management_api.rb', line 988

def retrieve_user_uuid_with_http_info(uid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.retrieve_user_uuid ...'
  end
  # verify the required parameter 'uid' is set
  if @api_client.config.client_side_validation && uid.nil?
    fail ArgumentError, "Missing the required parameter 'uid' when calling UserManagementApi.retrieve_user_uuid"
  end
  # resource path
  local_var_path = '/users/queries/user-uuids-by-email/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'uid'] = @api_client.build_collection_param(uid, :multi)

  # 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] || 'MsaQueryResponse'

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

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

#retrieve_user_uuids_by_cid(opts = {}) ⇒ MsaQueryResponse

Deprecated : Please use GET /user-management/queries/users/v1. List user IDs for all users in your customer account. For more information on each user, provide the user ID to ‘/users/entities/user/v1`.

Parameters:

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

    the optional parameters

Returns:



1040
1041
1042
1043
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1040

def retrieve_user_uuids_by_cid(opts = {})
  data, _status_code, _headers = retrieve_user_uuids_by_cid_with_http_info(opts)
  data
end

#retrieve_user_uuids_by_cid_with_http_info(opts = {}) ⇒ Array<(MsaQueryResponse, Integer, Hash)>

Deprecated : Please use GET /user-management/queries/users/v1. List user IDs for all users in your customer account. For more information on each user, provide the user ID to &#x60;/users/entities/user/v1&#x60;.

Parameters:

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

    the optional parameters

Returns:

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

    MsaQueryResponse data, response status code and response headers



1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1048

def retrieve_user_uuids_by_cid_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.retrieve_user_uuids_by_cid ...'
  end
  # resource path
  local_var_path = '/users/queries/user-uuids-by-cid/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'])

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

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

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

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

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

#retrieve_user_with_http_info(ids, opts = {}) ⇒ Array<(ApiUserMetadataResponse, Integer, Hash)>

Deprecated : Please use POST /user-management/entities/users/GET/v1. Get info about a user

Parameters:

  • ids (Array<String>)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

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

    the optional parameters

Returns:

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

    ApiUserMetadataResponse data, response status code and response headers



926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
# File 'lib/crimson-falcon/api/user_management_api.rb', line 926

def retrieve_user_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.retrieve_user ...'
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling UserManagementApi.retrieve_user"
  end
  # resource path
  local_var_path = '/users/entities/users/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

  # 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] || 'ApiUserMetadataResponse'

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

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

#retrieve_users_getv1(body, opts = {}) ⇒ FlightcontrolapiUserResponse

Get info about users including their name, UID and CID by providing user UUIDs

Parameters:

  • body (MsaspecIdsRequest)

    Maximum of 5000 User UUIDs can be specified per request.

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

    the optional parameters

Returns:



1096
1097
1098
1099
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1096

def retrieve_users_getv1(body, opts = {})
  data, _status_code, _headers = retrieve_users_getv1_with_http_info(body, opts)
  data
end

#retrieve_users_getv1_with_http_info(body, opts = {}) ⇒ Array<(FlightcontrolapiUserResponse, Integer, Hash)>

Get info about users including their name, UID and CID by providing user UUIDs

Parameters:

  • body (MsaspecIdsRequest)

    Maximum of 5000 User UUIDs can be specified per request.

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

    the optional parameters

Returns:



1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1105

def retrieve_users_getv1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.retrieve_users_getv1 ...'
  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 UserManagementApi.retrieve_users_getv1"
  end
  # resource path
  local_var_path = '/user-management/entities/users/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] || 'FlightcontrolapiUserResponse'

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

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

#revoke_user_role_ids(user_uuid, ids, opts = {}) ⇒ ApiUserRoleIDsResponse

Deprecated : Please use POST /user-management/entities/user-role-actions/v1. Revoke one or more roles from a user

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

  • ids (Array<String>)

    One or more role IDs to revoke. Find a role&#39;s ID from &#x60;/users/queries/roles/v1&#x60;.

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

    the optional parameters

Returns:



1163
1164
1165
1166
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1163

def revoke_user_role_ids(user_uuid, ids, opts = {})
  data, _status_code, _headers = revoke_user_role_ids_with_http_info(user_uuid, ids, opts)
  data
end

#revoke_user_role_ids_with_http_info(user_uuid, ids, opts = {}) ⇒ Array<(ApiUserRoleIDsResponse, Integer, Hash)>

Deprecated : Please use POST /user-management/entities/user-role-actions/v1. Revoke one or more roles from a user

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

  • ids (Array<String>)

    One or more role IDs to revoke. Find a role&#39;s ID from &#x60;/users/queries/roles/v1&#x60;.

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

    the optional parameters

Returns:

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

    ApiUserRoleIDsResponse data, response status code and response headers



1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1173

def revoke_user_role_ids_with_http_info(user_uuid, ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.revoke_user_role_ids ...'
  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 UserManagementApi.revoke_user_role_ids"
  end
  # verify the required parameter 'ids' is set
  if @api_client.config.client_side_validation && ids.nil?
    fail ArgumentError, "Missing the required parameter 'ids' when calling UserManagementApi.revoke_user_role_ids"
  end
  # resource path
  local_var_path = '/user-roles/entities/user-roles/v1'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'user_uuid'] = user_uuid
  query_params[:'ids'] = @api_client.build_collection_param(ids, :multi)

  # 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] || 'ApiUserRoleIDsResponse'

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

  new_options = opts.merge(
    :operation => :"UserManagementApi.revoke_user_role_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(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserManagementApi#revoke_user_role_ids\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_user(user_uuid, body, opts = {}) ⇒ ApiUserMetadataResponse

Deprecated : Please use PATCH /user-management/entities/users/v1. Modify an existing user’s first or last name

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

  • body (DomainUpdateUserFields)

    Attributes for this user. All attributes (shown below) are optional.

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

    the optional parameters

Returns:



1232
1233
1234
1235
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1232

def update_user(user_uuid, body, opts = {})
  data, _status_code, _headers = update_user_with_http_info(user_uuid, body, opts)
  data
end

#update_user_v1(user_uuid, body, opts = {}) ⇒ FlightcontrolapiUserResponse

Modify an existing user’s first or last name.

Parameters:

  • user_uuid (String)

    user uuid

  • body (DomainUpdateUserRequest)

    Both firstName and lastName have to specified.

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

    the optional parameters

Returns:



1305
1306
1307
1308
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1305

def update_user_v1(user_uuid, body, opts = {})
  data, _status_code, _headers = update_user_v1_with_http_info(user_uuid, body, opts)
  data
end

#update_user_v1_with_http_info(user_uuid, body, opts = {}) ⇒ Array<(FlightcontrolapiUserResponse, Integer, Hash)>

Modify an existing user&#39;s first or last name.

Parameters:

  • user_uuid (String)

    user uuid

  • body (DomainUpdateUserRequest)

    Both firstName and lastName have to specified.

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

    the optional parameters

Returns:



1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1315

def update_user_v1_with_http_info(user_uuid, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.update_user_v1 ...'
  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 UserManagementApi.update_user_v1"
  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 UserManagementApi.update_user_v1"
  end
  # resource path
  local_var_path = '/user-management/entities/users/v1'

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

  # 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] || 'FlightcontrolapiUserResponse'

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

  new_options = opts.merge(
    :operation => :"UserManagementApi.update_user_v1",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserManagementApi#update_user_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_user_with_http_info(user_uuid, body, opts = {}) ⇒ Array<(ApiUserMetadataResponse, Integer, Hash)>

Deprecated : Please use PATCH /user-management/entities/users/v1. Modify an existing user&#39;s first or last name

Parameters:

  • user_uuid (String)

    ID of a user. Find a user&#39;s ID from &#x60;/users/entities/user/v1&#x60;.

  • body (DomainUpdateUserFields)

    Attributes for this user. All attributes (shown below) are optional.

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

    the optional parameters

Returns:

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

    ApiUserMetadataResponse data, response status code and response headers



1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1242

def update_user_with_http_info(user_uuid, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.update_user ...'
  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 UserManagementApi.update_user"
  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 UserManagementApi.update_user"
  end
  # resource path
  local_var_path = '/users/entities/users/v1'

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

  # 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] || 'ApiUserMetadataResponse'

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

  new_options = opts.merge(
    :operation => :"UserManagementApi.update_user",
    :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(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserManagementApi#update_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Apply actions to one or more User. Available action names: reset_2fa, reset_password. User UUIDs can be provided in ‘ids` param as part of request payload.

Parameters:

  • body (DomainUserActionRequest)

    User UUIDs and Action Name params are required. Allowed values for Action Name param includes &#39;reset_2fa&#39; and &#39;reset_password&#39;

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

    the optional parameters

Returns:



1377
1378
1379
1380
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1377

def user_action_v1(body, opts = {})
  data, _status_code, _headers = user_action_v1_with_http_info(body, opts)
  data
end

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

Apply actions to one or more User. Available action names: reset_2fa, reset_password. User UUIDs can be provided in &#x60;ids&#x60; param as part of request payload.

Parameters:

  • body (DomainUserActionRequest)

    User UUIDs and Action Name params are required. Allowed values for Action Name param includes &#39;reset_2fa&#39; and &#39;reset_password&#39;

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

    the optional parameters

Returns:

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

    MsaspecResponseFields data, response status code and response headers



1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1386

def user_action_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.user_action_v1 ...'
  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 UserManagementApi.user_action_v1"
  end
  # resource path
  local_var_path = '/user-management/entities/user-actions/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 => :"UserManagementApi.user_action_v1",
    :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: UserManagementApi#user_action_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Grant or Revoke one or more role(s) to a user against a CID. User UUID, CID and Role ID(s) can be provided in request payload. Available Action(s) : grant, revoke

Parameters:

  • body (DomainActionUserRolesRequest)

    All fields including CID, RoleID(s), User UUID and Action are required. Allowed values for Action param include &#39;grant&#39; and &#39;revoke&#39;.

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

    the optional parameters

Returns:



1443
1444
1445
1446
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1443

def user_roles_action_v1(body, opts = {})
  data, _status_code, _headers = user_roles_action_v1_with_http_info(body, opts)
  data
end

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

Grant or Revoke one or more role(s) to a user against a CID. User UUID, CID and Role ID(s) can be provided in request payload. Available Action(s) : grant, revoke

Parameters:

  • body (DomainActionUserRolesRequest)

    All fields including CID, RoleID(s), User UUID and Action are required. Allowed values for Action param include &#39;grant&#39; and &#39;revoke&#39;.

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

    the optional parameters

Returns:

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

    MsaspecResponseFields data, response status code and response headers



1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
# File 'lib/crimson-falcon/api/user_management_api.rb', line 1452

def user_roles_action_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagementApi.user_roles_action_v1 ...'
  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 UserManagementApi.user_roles_action_v1"
  end
  # resource path
  local_var_path = '/user-management/entities/user-role-actions/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 => :"UserManagementApi.user_roles_action_v1",
    :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: UserManagementApi#user_roles_action_v1\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end