Class: Falcon::UserManagement

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ UserManagement

Returns a new instance of UserManagement.



36
37
38
# File 'lib/crimson-falcon/api/user_management.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.rb', line 34

def api_client
  @api_client
end

Instance Method Details

#aggregate_users_v1(body, opts = {}) ⇒ FlightcontrolapiAggregatesResponse

Get host aggregates as specified via json in request body.

Parameters:

Returns:



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

def aggregate_users_v1(body, opts = {})
  data, _status_code, _headers = aggregate_users_v1_with_http_info(body, opts)
  data
end

#aggregate_users_v1_with_http_info(body, opts = {}) ⇒ Array<(FlightcontrolapiAggregatesResponse, Integer, Hash)>

Get host aggregates as specified via json in request body.

Parameters:

Returns:



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

def aggregate_users_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.aggregate_users_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 UserManagement.aggregate_users_v1"
  end
  # resource path
  local_var_path = '/user-management/aggregates/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] || 'FlightcontrolapiAggregatesResponse'

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

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

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

Deprecated : Please use GET /user-management/combined/user-roles/v2. 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: expires_at, 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:



115
116
117
118
# File 'lib/crimson-falcon/api/user_management.rb', line 115

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<(FlightcontrolapiCombinedUserRolesResponseV1, Integer, Hash)>

Deprecated : Please use GET /user-management/combined/user-roles/v2. 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: expires_at, 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:



130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
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.rb', line 130

def combined_user_roles_v1_with_http_info(user_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 UserManagement.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 UserManagement.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 UserManagement.combined_user_roles_v1, must be greater than or equal to 1.'
  end

  allowable_values = ["cid|asc", "cid|desc", "expires_at|asc", "expires_at|desc", "role_name|asc", "role_name|desc", "type|asc", "type|desc", "user_uuid|asc", "user_uuid|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] || 'FlightcontrolapiCombinedUserRolesResponseV1'

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

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

#combined_user_roles_v2(user_uuid, opts = {}) ⇒ FlightcontrolapiCombinedUserRolesResponseV2

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: expires_at, 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:



211
212
213
214
# File 'lib/crimson-falcon/api/user_management.rb', line 211

def combined_user_roles_v2(user_uuid, opts = {})
  data, _status_code, _headers = combined_user_roles_v2_with_http_info(user_uuid, opts)
  data
end

#combined_user_roles_v2_with_http_info(user_uuid, opts = {}) ⇒ Array<(FlightcontrolapiCombinedUserRolesResponseV2, 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: expires_at, 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:



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

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

  allowable_values = ["cid|asc", "cid|desc", "expires_at|asc", "expires_at|desc", "role_name|asc", "role_name|desc", "type|asc", "type|desc", "user_uuid|asc", "user_uuid|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/v2'

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

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

  new_options = opts.merge(
    :operation => :"UserManagement.combined_user_roles_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(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: UserManagement#combined_user_roles_v2\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:



301
302
303
304
# File 'lib/crimson-falcon/api/user_management.rb', line 301

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:



368
369
370
371
# File 'lib/crimson-falcon/api/user_management.rb', line 368

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:



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

def create_user_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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



310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
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
# File 'lib/crimson-falcon/api/user_management.rb', line 310

def create_user_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



436
437
438
439
# File 'lib/crimson-falcon/api/user_management.rb', line 436

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:



498
499
500
501
# File 'lib/crimson-falcon/api/user_management.rb', line 498

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



507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
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
# File 'lib/crimson-falcon/api/user_management.rb', line 507

def delete_user_v1_with_http_info(user_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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



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

def delete_user_with_http_info(user_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



561
562
563
564
# File 'lib/crimson-falcon/api/user_management.rb', line 561

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:



571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
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
# File 'lib/crimson-falcon/api/user_management.rb', line 571

def entities_roles_v1_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



624
625
626
627
# File 'lib/crimson-falcon/api/user_management.rb', line 624

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



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
661
662
663
664
665
666
667
668
669
670
671
672
673
674
# File 'lib/crimson-falcon/api/user_management.rb', line 632

def get_available_role_ids_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 => :"UserManagement.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: UserManagement#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:



680
681
682
683
# File 'lib/crimson-falcon/api/user_management.rb', line 680

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



689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
# File 'lib/crimson-falcon/api/user_management.rb', line 689

def get_roles_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



742
743
744
745
# File 'lib/crimson-falcon/api/user_management.rb', line 742

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



751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
# File 'lib/crimson-falcon/api/user_management.rb', line 751

def get_user_role_ids_with_http_info(user_uuid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



805
806
807
808
# File 'lib/crimson-falcon/api/user_management.rb', line 805

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



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
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
# File 'lib/crimson-falcon/api/user_management.rb', line 815

def grant_user_role_ids_with_http_info(user_uuid, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



879
880
881
882
# File 'lib/crimson-falcon/api/user_management.rb', line 879

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



890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
# File 'lib/crimson-falcon/api/user_management.rb', line 890

def queries_roles_v1_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 => :"UserManagement.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: UserManagement#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, direct_assigned_cids, factors, first_name, has_temporary_roles, last_name, name, status, temporarily_assigned_cids, 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:



944
945
946
947
# File 'lib/crimson-falcon/api/user_management.rb', line 944

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, direct_assigned_cids, factors, first_name, has_temporary_roles, last_name, name, status, temporarily_assigned_cids, 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



956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
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
# File 'lib/crimson-falcon/api/user_management.rb', line 956

def query_user_v1_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 UserManagement.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 UserManagement.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", "has_temporary_roles|asc", "has_temporary_roles|desc", "last_login_at|asc", "last_login_at|desc", "last_name|asc", "last_name|desc", "name|asc", "name|desc", "status|asc", "status|desc", "temporarily_assigned_cids|asc", "temporarily_assigned_cids|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 => :"UserManagement.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: UserManagement#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:



1023
1024
1025
1026
# File 'lib/crimson-falcon/api/user_management.rb', line 1023

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



1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
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
# File 'lib/crimson-falcon/api/user_management.rb', line 1031

def retrieve_emails_by_cid_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 => :"UserManagement.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: UserManagement#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:



1079
1080
1081
1082
# File 'lib/crimson-falcon/api/user_management.rb', line 1079

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:



1141
1142
1143
1144
# File 'lib/crimson-falcon/api/user_management.rb', line 1141

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



1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
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
# File 'lib/crimson-falcon/api/user_management.rb', line 1150

def retrieve_user_uuid_with_http_info(uid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



1202
1203
1204
1205
# File 'lib/crimson-falcon/api/user_management.rb', line 1202

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



1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
# File 'lib/crimson-falcon/api/user_management.rb', line 1210

def retrieve_user_uuids_by_cid_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 => :"UserManagement.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: UserManagement#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



1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
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
# File 'lib/crimson-falcon/api/user_management.rb', line 1088

def retrieve_user_with_http_info(ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



1258
1259
1260
1261
# File 'lib/crimson-falcon/api/user_management.rb', line 1258

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:



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
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
# File 'lib/crimson-falcon/api/user_management.rb', line 1267

def retrieve_users_getv1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



1325
1326
1327
1328
# File 'lib/crimson-falcon/api/user_management.rb', line 1325

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



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
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
# File 'lib/crimson-falcon/api/user_management.rb', line 1335

def revoke_user_role_ids_with_http_info(user_uuid, ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



1394
1395
1396
1397
# File 'lib/crimson-falcon/api/user_management.rb', line 1394

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:



1467
1468
1469
1470
# File 'lib/crimson-falcon/api/user_management.rb', line 1467

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:



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
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
# File 'lib/crimson-falcon/api/user_management.rb', line 1477

def update_user_v1_with_http_info(user_uuid, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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



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
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
# File 'lib/crimson-falcon/api/user_management.rb', line 1404

def update_user_with_http_info(user_uuid, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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:



1539
1540
1541
1542
# File 'lib/crimson-falcon/api/user_management.rb', line 1539

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



1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
# File 'lib/crimson-falcon/api/user_management.rb', line 1548

def user_action_v1_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: UserManagement.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 UserManagement.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 => :"UserManagement.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: UserManagement#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 (FlightcontrolapiGrantInput)

    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:



1605
1606
1607
1608
# File 'lib/crimson-falcon/api/user_management.rb', line 1605

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 (FlightcontrolapiGrantInput)

    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



1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
# File 'lib/crimson-falcon/api/user_management.rb', line 1614

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