Class: RusticiSoftwareCloudV2::RegistrationApi

Inherits:
Object
  • Object
show all
Defined in:
lib/rustici_software_cloud_v2/api/registration_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ RegistrationApi

Returns a new instance of RegistrationApi.



19
20
21
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

Get registration launch link. Returns the link to use to launch this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:



28
29
30
31
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 28

def build_registration_launch_link(registration_id, launch_link_request, opts = {})
  data, _status_code, _headers = build_registration_launch_link_with_http_info(registration_id, launch_link_request, opts)
  data
end

Get registration launch link. Returns the link to use to launch this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(LaunchLinkSchema, Fixnum, Hash)>)

    LaunchLinkSchema data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 39

def build_registration_launch_link_with_http_info(registration_id, launch_link_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.build_registration_launch_link ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.build_registration_launch_link"
  end
  # verify the required parameter 'launch_link_request' is set
  if @api_client.config.client_side_validation && launch_link_request.nil?
    fail ArgumentError, "Missing the required parameter 'launch_link_request' when calling RegistrationApi.build_registration_launch_link"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/launchLink'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(launch_link_request)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LaunchLinkSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#build_registration_launch_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_new_registration_instance(registration_id, opts = {}) ⇒ nil

Create a new instance for this registration specified by the registration ID.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (nil)


86
87
88
89
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 86

def create_new_registration_instance(registration_id, opts = {})
  create_new_registration_instance_with_http_info(registration_id, opts)
  nil
end

#create_new_registration_instance_with_http_info(registration_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create a new instance for this registration specified by the registration ID.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 95

def create_new_registration_instance_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.create_new_registration_instance ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.create_new_registration_instance"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/instances'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#create_new_registration_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_registration(registration, opts = {}) ⇒ nil

Create a registration. This method is used to create a new registration. A registration will contain a few pieces of information such as a learner name, a learner id, and optionally, information about where activity data should be posted (for client consumption), as well as a way to specify simple authentication schemes for posting said data. A registration must be tied to a specific course at creation time. When the created registration is “launched”, the course specified at creation time will be launched.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :course_version (Integer)

    The version of the course you want to create the registration for. Unless you have a reason for using this you probably do not need to.

Returns:

  • (nil)


139
140
141
142
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 139

def create_registration(registration, opts = {})
  create_registration_with_http_info(registration, opts)
  nil
end

#create_registration_with_http_info(registration, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Create a registration. This method is used to create a new registration. A registration will contain a few pieces of information such as a learner name, a learner id, and optionally, information about where activity data should be posted (for client consumption), as well as a way to specify simple authentication schemes for posting said data. A registration must be tied to a specific course at creation time. When the created registration is “launched”, the course specified at creation time will be launched.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :course_version (Integer)

    The version of the course you want to create the registration for. Unless you have a reason for using this you probably do not need to.

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 150

def create_registration_with_http_info(registration, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.create_registration ...'
  end
  # verify the required parameter 'registration' is set
  if @api_client.config.client_side_validation && registration.nil?
    fail ArgumentError, "Missing the required parameter 'registration' when calling RegistrationApi.create_registration"
  end
  # resource path
  local_var_path = '/registrations'

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(registration)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#create_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_registration(registration_id, opts = {}) ⇒ nil

Delete a registration. Delete ‘registrationId`. This includes all instances of this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (nil)


194
195
196
197
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 194

def delete_registration(registration_id, opts = {})
  delete_registration_with_http_info(registration_id, opts)
  nil
end

#delete_registration_configuration_setting(registration_id, setting_id, opts = {}) ⇒ nil

Clear a registration configuration. Clears the ‘settingId` value for this registration. The effective value will become the value at the next level which has an explicit value set. Possibilities are course, application, or default.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (nil)


248
249
250
251
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 248

def delete_registration_configuration_setting(registration_id, setting_id, opts = {})
  delete_registration_configuration_setting_with_http_info(registration_id, setting_id, opts)
  nil
end

#delete_registration_configuration_setting_with_http_info(registration_id, setting_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Clear a registration configuration. Clears the &#x60;settingId&#x60; value for this registration. The effective value will become the value at the next level which has an explicit value set. Possibilities are course, application, or default.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
296
297
298
299
300
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 259

def delete_registration_configuration_setting_with_http_info(registration_id, setting_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.delete_registration_configuration_setting ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.delete_registration_configuration_setting"
  end
  # verify the required parameter 'setting_id' is set
  if @api_client.config.client_side_validation && setting_id.nil?
    fail ArgumentError, "Missing the required parameter 'setting_id' when calling RegistrationApi.delete_registration_configuration_setting"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/configuration/{settingId}'.sub('{' + 'registrationId' + '}', registration_id.to_s).sub('{' + 'settingId' + '}', setting_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#delete_registration_configuration_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_registration_global_data(registration_id, opts = {}) ⇒ nil

Delete the global data of a registration. Delete global data associated with ‘registrationId`’. Calling this method will reset all global objectives associated with this registration, if any exist.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (nil)


306
307
308
309
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 306

def delete_registration_global_data(registration_id, opts = {})
  delete_registration_global_data_with_http_info(registration_id, opts)
  nil
end

#delete_registration_global_data_with_http_info(registration_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete the global data of a registration. Delete global data associated with &#x60;registrationId&#x60;&#39;. Calling this method will reset all global objectives associated with this registration, if any exist.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 316

def delete_registration_global_data_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.delete_registration_global_data ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.delete_registration_global_data"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/globalData'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#delete_registration_global_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_registration_instance(registration_id, instance_id, opts = {}) ⇒ nil

Delete instance ‘instanceId` of `registrationId`. Delete instance `instanceId` of `registrationId`. If this is the only existing instance of this registration, the registration will be deleted in its entirety along with any associated data.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Returns:

  • (nil)


360
361
362
363
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 360

def delete_registration_instance(registration_id, instance_id, opts = {})
  delete_registration_instance_with_http_info(registration_id, instance_id, opts)
  nil
end

#delete_registration_instance_configuration_setting(registration_id, instance_id, setting_id, opts = {}) ⇒ nil

Clear a configuration for an instance of a registration. Clears the ‘settingId` value for this registration instance.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Returns:

  • (nil)


424
425
426
427
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 424

def delete_registration_instance_configuration_setting(registration_id, instance_id, setting_id, opts = {})
  delete_registration_instance_configuration_setting_with_http_info(registration_id, instance_id, setting_id, opts)
  nil
end

#delete_registration_instance_configuration_setting_with_http_info(registration_id, instance_id, setting_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Clear a configuration for an instance of a registration. Clears the &#x60;settingId&#x60; value for this registration instance.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



436
437
438
439
440
441
442
443
444
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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 436

def delete_registration_instance_configuration_setting_with_http_info(registration_id, instance_id, setting_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.delete_registration_instance_configuration_setting ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.delete_registration_instance_configuration_setting"
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling RegistrationApi.delete_registration_instance_configuration_setting"
  end
  if @api_client.config.client_side_validation && instance_id < 0
    fail ArgumentError, 'invalid value for "instance_id" when calling RegistrationApi.delete_registration_instance_configuration_setting, must be greater than or equal to 0.'
  end

  # verify the required parameter 'setting_id' is set
  if @api_client.config.client_side_validation && setting_id.nil?
    fail ArgumentError, "Missing the required parameter 'setting_id' when calling RegistrationApi.delete_registration_instance_configuration_setting"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/instances/{instanceId}/configuration/{settingId}'.sub('{' + 'registrationId' + '}', registration_id.to_s).sub('{' + 'instanceId' + '}', instance_id.to_s).sub('{' + 'settingId' + '}', setting_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#delete_registration_instance_configuration_setting\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_registration_instance_with_http_info(registration_id, instance_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete instance &#x60;instanceId&#x60; of &#x60;registrationId&#x60;. Delete instance &#x60;instanceId&#x60; of &#x60;registrationId&#x60;. If this is the only existing instance of this registration, the registration will be deleted in its entirety along with any associated data.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



371
372
373
374
375
376
377
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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 371

def delete_registration_instance_with_http_info(registration_id, instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.delete_registration_instance ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.delete_registration_instance"
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling RegistrationApi.delete_registration_instance"
  end
  if @api_client.config.client_side_validation && instance_id < 0
    fail ArgumentError, 'invalid value for "instance_id" when calling RegistrationApi.delete_registration_instance, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/registrations/{registrationId}/instances/{instanceId}'.sub('{' + 'registrationId' + '}', registration_id.to_s).sub('{' + 'instanceId' + '}', instance_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#delete_registration_instance\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_registration_progress(registration_id, opts = {}) ⇒ nil

Reset a registration. This method will reset the specified registration. This is essentially the same as deleting and recreating the registration, and as such, will delete all the data associated with the registration (including launch history, etc.). If the course for which the registration is registered has multiple versions, the registration being reset will automatically be registered for the latest version.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (nil)


491
492
493
494
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 491

def delete_registration_progress(registration_id, opts = {})
  delete_registration_progress_with_http_info(registration_id, opts)
  nil
end

#delete_registration_progress_with_http_info(registration_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Reset a registration. This method will reset the specified registration. This is essentially the same as deleting and recreating the registration, and as such, will delete all the data associated with the registration (including launch history, etc.). If the course for which the registration is registered has multiple versions, the registration being reset will automatically be registered for the latest version.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



501
502
503
504
505
506
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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 501

def delete_registration_progress_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.delete_registration_progress ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.delete_registration_progress"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/progress'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#delete_registration_progress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_registration_tags(registration_id, tags, opts = {}) ⇒ nil

Delete tags from a registration. Delete the provided tags for this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (nil)


545
546
547
548
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 545

def delete_registration_tags(registration_id, tags, opts = {})
  delete_registration_tags_with_http_info(registration_id, tags, opts)
  nil
end

#delete_registration_tags_with_http_info(registration_id, tags, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete tags from a registration. Delete the provided tags for this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 556

def delete_registration_tags_with_http_info(registration_id, tags, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.delete_registration_tags ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.delete_registration_tags"
  end
  # verify the required parameter 'tags' is set
  if @api_client.config.client_side_validation && tags.nil?
    fail ArgumentError, "Missing the required parameter 'tags' when calling RegistrationApi.delete_registration_tags"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/tags'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(tags)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#delete_registration_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_registration_with_http_info(registration_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a registration. Delete &#x60;registrationId&#x60;. This includes all instances of this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 204

def delete_registration_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.delete_registration ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.delete_registration"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#delete_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration(registration_id, opts = {}) ⇒ nil

See if a registration exists. This method is meant to check if a registration with ‘registrationId` exists in the system.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (nil)


603
604
605
606
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 603

def get_registration(registration_id, opts = {})
  get_registration_with_http_info(registration_id, opts)
  nil
end

#get_registration_configuration(registration_id, opts = {}) ⇒ SettingListSchema

Get registration configuration. Returns all configuration settings for this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN) — default: default to false

Returns:



657
658
659
660
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 657

def get_registration_configuration(registration_id, opts = {})
  data, _status_code, _headers = get_registration_configuration_with_http_info(registration_id, opts)
  data
end

#get_registration_configuration_with_http_info(registration_id, opts = {}) ⇒ Array<(SettingListSchema, Fixnum, Hash)>

Get registration configuration. Returns all configuration settings for this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN)

Returns:

  • (Array<(SettingListSchema, Fixnum, Hash)>)

    SettingListSchema data, response status code and response headers



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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 668

def get_registration_configuration_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_configuration ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_configuration"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/configuration'.sub('{' + 'registrationId' + '}', registration_id.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SettingListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_instance_configuration(registration_id, instance_id, opts = {}) ⇒ SettingListSchema

Get configuration for instance of registration. Returns all configuration settings for this registration instance.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN) — default: default to false

Returns:



715
716
717
718
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 715

def get_registration_instance_configuration(registration_id, instance_id, opts = {})
  data, _status_code, _headers = get_registration_instance_configuration_with_http_info(registration_id, instance_id, opts)
  data
end

#get_registration_instance_configuration_with_http_info(registration_id, instance_id, opts = {}) ⇒ Array<(SettingListSchema, Fixnum, Hash)>

Get configuration for instance of registration. Returns all configuration settings for this registration instance.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Options Hash (opts):

  • :include_metadata (BOOLEAN)

Returns:

  • (Array<(SettingListSchema, Fixnum, Hash)>)

    SettingListSchema data, response status code and response headers



727
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
774
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 727

def get_registration_instance_configuration_with_http_info(registration_id, instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_instance_configuration ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_instance_configuration"
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling RegistrationApi.get_registration_instance_configuration"
  end
  if @api_client.config.client_side_validation && instance_id < 0
    fail ArgumentError, 'invalid value for "instance_id" when calling RegistrationApi.get_registration_instance_configuration, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/registrations/{registrationId}/instances/{instanceId}/configuration'.sub('{' + 'registrationId' + '}', registration_id.to_s).sub('{' + 'instanceId' + '}', instance_id.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'SettingListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_instance_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_instance_launch_history(registration_id, instance_id, opts = {}) ⇒ LaunchHistoryListSchema

Get launch history for an instance of a registration. Returns history of the launches of the specified instance of this registration.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Options Hash (opts):

  • :include_history_log (BOOLEAN)

    Whether to include the history log in the launch history (default to false)

Returns:



782
783
784
785
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 782

def get_registration_instance_launch_history(registration_id, instance_id, opts = {})
  data, _status_code, _headers = get_registration_instance_launch_history_with_http_info(registration_id, instance_id, opts)
  data
end

#get_registration_instance_launch_history_with_http_info(registration_id, instance_id, opts = {}) ⇒ Array<(LaunchHistoryListSchema, Fixnum, Hash)>

Get launch history for an instance of a registration. Returns history of the launches of the specified instance of this registration.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Options Hash (opts):

  • :include_history_log (BOOLEAN)

    Whether to include the history log in the launch history

Returns:

  • (Array<(LaunchHistoryListSchema, Fixnum, Hash)>)

    LaunchHistoryListSchema 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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 794

def get_registration_instance_launch_history_with_http_info(registration_id, instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_instance_launch_history ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_instance_launch_history"
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling RegistrationApi.get_registration_instance_launch_history"
  end
  if @api_client.config.client_side_validation && instance_id < 0
    fail ArgumentError, 'invalid value for "instance_id" when calling RegistrationApi.get_registration_instance_launch_history, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/registrations/{registrationId}/instances/{instanceId}/launchHistory'.sub('{' + 'registrationId' + '}', registration_id.to_s).sub('{' + 'instanceId' + '}', instance_id.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LaunchHistoryListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_instance_launch_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_instance_progress(registration_id, instance_id, opts = {}) ⇒ RegistrationSchema

Get details of an instance of a registration. Get registration progress for instance ‘instanceId` of `registrationId`’

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Options Hash (opts):

  • :include_child_results (BOOLEAN)

    Include information about each learning object, not just the top level in the results (default to false)

  • :include_interactions_and_objectives (BOOLEAN)

    Include interactions and objectives in the results (default to false)

  • :include_runtime (BOOLEAN)

    Include runtime details in the results (default to false)

Returns:



851
852
853
854
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 851

def get_registration_instance_progress(registration_id, instance_id, opts = {})
  data, _status_code, _headers = get_registration_instance_progress_with_http_info(registration_id, instance_id, opts)
  data
end

#get_registration_instance_progress_with_http_info(registration_id, instance_id, opts = {}) ⇒ Array<(RegistrationSchema, Fixnum, Hash)>

Get details of an instance of a registration. Get registration progress for instance &#x60;instanceId&#x60; of &#x60;registrationId&#x60;&#39;

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Options Hash (opts):

  • :include_child_results (BOOLEAN)

    Include information about each learning object, not just the top level in the results

  • :include_interactions_and_objectives (BOOLEAN)

    Include interactions and objectives in the results

  • :include_runtime (BOOLEAN)

    Include runtime details in the results

Returns:

  • (Array<(RegistrationSchema, Fixnum, Hash)>)

    RegistrationSchema data, response status code and response headers



865
866
867
868
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
912
913
914
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 865

def get_registration_instance_progress_with_http_info(registration_id, instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_instance_progress ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_instance_progress"
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling RegistrationApi.get_registration_instance_progress"
  end
  if @api_client.config.client_side_validation && instance_id < 0
    fail ArgumentError, 'invalid value for "instance_id" when calling RegistrationApi.get_registration_instance_progress, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/registrations/{registrationId}/instances/{instanceId}'.sub('{' + 'registrationId' + '}', registration_id.to_s).sub('{' + 'instanceId' + '}', instance_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'includeChildResults'] = opts[:'include_child_results'] if !opts[:'include_child_results'].nil?
  query_params[:'includeInteractionsAndObjectives'] = opts[:'include_interactions_and_objectives'] if !opts[:'include_interactions_and_objectives'].nil?
  query_params[:'includeRuntime'] = opts[:'include_runtime'] if !opts[:'include_runtime'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RegistrationSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_instance_progress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_instance_statements(registration_id, instance_id, opts = {}) ⇒ XapiStatementResult

Get xAPI statements for an instance of a registration. Get xAPI statements for instance ‘instanceId` of `registrationId`.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:



924
925
926
927
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 924

def get_registration_instance_statements(registration_id, instance_id, opts = {})
  data, _status_code, _headers = get_registration_instance_statements_with_http_info(registration_id, instance_id, opts)
  data
end

#get_registration_instance_statements_with_http_info(registration_id, instance_id, opts = {}) ⇒ Array<(XapiStatementResult, Fixnum, Hash)>

Get xAPI statements for an instance of a registration. Get xAPI statements for instance &#x60;instanceId&#x60; of &#x60;registrationId&#x60;.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:

  • (Array<(XapiStatementResult, Fixnum, Hash)>)

    XapiStatementResult data, response status code and response headers



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
974
975
976
977
978
979
980
981
982
983
984
985
986
987
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 938

def get_registration_instance_statements_with_http_info(registration_id, instance_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_instance_statements ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_instance_statements"
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling RegistrationApi.get_registration_instance_statements"
  end
  if @api_client.config.client_side_validation && instance_id < 0
    fail ArgumentError, 'invalid value for "instance_id" when calling RegistrationApi.get_registration_instance_statements, must be greater than or equal to 0.'
  end

  # resource path
  local_var_path = '/registrations/{registrationId}/instances/{instanceId}/xAPIStatements'.sub('{' + 'registrationId' + '}', registration_id.to_s).sub('{' + 'instanceId' + '}', instance_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XapiStatementResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_instance_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_instances(registration_id, opts = {}) ⇒ RegistrationListSchema

Get all instances of a registration. Get all the instances of this the registration specified by the registration ID

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

  • :include_child_results (BOOLEAN)

    Include information about each learning object, not just the top level in the results (default to false)

  • :include_interactions_and_objectives (BOOLEAN)

    Include interactions and objectives in the results (default to false)

  • :include_runtime (BOOLEAN)

    Include runtime details in the results (default to false)

Returns:



999
1000
1001
1002
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 999

def get_registration_instances(registration_id, opts = {})
  data, _status_code, _headers = get_registration_instances_with_http_info(registration_id, opts)
  data
end

#get_registration_instances_with_http_info(registration_id, opts = {}) ⇒ Array<(RegistrationListSchema, Fixnum, Hash)>

Get all instances of a registration. Get all the instances of this the registration specified by the registration ID

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

  • :include_child_results (BOOLEAN)

    Include information about each learning object, not just the top level in the results

  • :include_interactions_and_objectives (BOOLEAN)

    Include interactions and objectives in the results

  • :include_runtime (BOOLEAN)

    Include runtime details in the results

Returns:

  • (Array<(RegistrationListSchema, Fixnum, Hash)>)

    RegistrationListSchema data, response status code and response headers



1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1015

def get_registration_instances_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_instances ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_instances"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/instances'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?
  query_params[:'includeChildResults'] = opts[:'include_child_results'] if !opts[:'include_child_results'].nil?
  query_params[:'includeInteractionsAndObjectives'] = opts[:'include_interactions_and_objectives'] if !opts[:'include_interactions_and_objectives'].nil?
  query_params[:'includeRuntime'] = opts[:'include_runtime'] if !opts[:'include_runtime'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RegistrationListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_instances\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_launch_history(registration_id, opts = {}) ⇒ LaunchHistoryListSchema

Get launch history for a registration. Returns history of this registration’s launches.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :include_history_log (BOOLEAN)

    Whether to include the history log in the launch history (default to false)

Returns:



1066
1067
1068
1069
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1066

def get_registration_launch_history(registration_id, opts = {})
  data, _status_code, _headers = get_registration_launch_history_with_http_info(registration_id, opts)
  data
end

#get_registration_launch_history_with_http_info(registration_id, opts = {}) ⇒ Array<(LaunchHistoryListSchema, Fixnum, Hash)>

Get launch history for a registration. Returns history of this registration&#39;s launches.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :include_history_log (BOOLEAN)

    Whether to include the history log in the launch history

Returns:

  • (Array<(LaunchHistoryListSchema, Fixnum, Hash)>)

    LaunchHistoryListSchema data, response status code and response headers



1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1077

def get_registration_launch_history_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_launch_history ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_launch_history"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/launchHistory'.sub('{' + 'registrationId' + '}', registration_id.to_s)

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

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'LaunchHistoryListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_launch_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_progress(registration_id, opts = {}) ⇒ RegistrationSchema

Get details of a registration. Get detailed information about the latest instance of ‘registrationId`. Additional detail may be obtained by using the optional query parameters.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :include_child_results (BOOLEAN)

    Include information about each learning object, not just the top level in the results (default to false)

  • :include_interactions_and_objectives (BOOLEAN)

    Include interactions and objectives in the results (default to false)

  • :include_runtime (BOOLEAN)

    Include runtime details in the results (default to false)

Returns:



1125
1126
1127
1128
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1125

def get_registration_progress(registration_id, opts = {})
  data, _status_code, _headers = get_registration_progress_with_http_info(registration_id, opts)
  data
end

#get_registration_progress_with_http_info(registration_id, opts = {}) ⇒ Array<(RegistrationSchema, Fixnum, Hash)>

Get details of a registration. Get detailed information about the latest instance of &#x60;registrationId&#x60;. Additional detail may be obtained by using the optional query parameters.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :include_child_results (BOOLEAN)

    Include information about each learning object, not just the top level in the results

  • :include_interactions_and_objectives (BOOLEAN)

    Include interactions and objectives in the results

  • :include_runtime (BOOLEAN)

    Include runtime details in the results

Returns:

  • (Array<(RegistrationSchema, Fixnum, Hash)>)

    RegistrationSchema data, response status code and response headers



1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1138

def get_registration_progress_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_progress ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_progress"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'includeChildResults'] = opts[:'include_child_results'] if !opts[:'include_child_results'].nil?
  query_params[:'includeInteractionsAndObjectives'] = opts[:'include_interactions_and_objectives'] if !opts[:'include_interactions_and_objectives'].nil?
  query_params[:'includeRuntime'] = opts[:'include_runtime'] if !opts[:'include_runtime'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RegistrationSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_progress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_statements(registration_id, opts = {}) ⇒ XapiStatementResult

Get xAPI statements for a registration. Get xAPI statements for ‘registrationId`.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:



1188
1189
1190
1191
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1188

def get_registration_statements(registration_id, opts = {})
  data, _status_code, _headers = get_registration_statements_with_http_info(registration_id, opts)
  data
end

#get_registration_statements_with_http_info(registration_id, opts = {}) ⇒ Array<(XapiStatementResult, Fixnum, Hash)>

Get xAPI statements for a registration. Get xAPI statements for &#x60;registrationId&#x60;.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Options Hash (opts):

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

Returns:

  • (Array<(XapiStatementResult, Fixnum, Hash)>)

    XapiStatementResult data, response status code and response headers



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
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1201

def get_registration_statements_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_statements ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_statements"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/xAPIStatements'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'XapiStatementResult')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_statements\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_tags(registration_id, opts = {}) ⇒ TagListSchema

Get tags for a registration. Get a list of the tags applied to this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:



1248
1249
1250
1251
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1248

def get_registration_tags(registration_id, opts = {})
  data, _status_code, _headers = get_registration_tags_with_http_info(registration_id, opts)
  data
end

#get_registration_tags_with_http_info(registration_id, opts = {}) ⇒ Array<(TagListSchema, Fixnum, Hash)>

Get tags for a registration. Get a list of the tags applied to this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(TagListSchema, Fixnum, Hash)>)

    TagListSchema data, response status code and response headers



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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1258

def get_registration_tags_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration_tags ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration_tags"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/tags'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'TagListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registration_with_http_info(registration_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

See if a registration exists. This method is meant to check if a registration with &#x60;registrationId&#x60; exists in the system.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 613

def get_registration_with_http_info(registration_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registration ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.get_registration"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:HEAD, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_registrations(opts = {}) ⇒ RegistrationListSchema

Get a list of all registrations. Gets a list of registrations including a summary of the status of each registration.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :course_id (String)

    Only registrations for the specified course id will be included.

  • :learner_id (String)

    Only registrations for the specified learner id will be included.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

  • :include_child_results (BOOLEAN)

    Include information about each learning object, not just the top level in the results (default to false)

  • :include_interactions_and_objectives (BOOLEAN)

    Include interactions and objectives in the results (default to false)

  • :include_runtime (BOOLEAN)

    Include runtime details in the results (default to false)

  • :tags (Array<String>)

Returns:



1310
1311
1312
1313
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1310

def get_registrations(opts = {})
  data, _status_code, _headers = get_registrations_with_http_info(opts)
  data
end

#get_registrations_with_http_info(opts = {}) ⇒ Array<(RegistrationListSchema, Fixnum, Hash)>

Get a list of all registrations. Gets a list of registrations including a summary of the status of each registration.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :course_id (String)

    Only registrations for the specified course id will be included.

  • :learner_id (String)

    Only registrations for the specified learner id will be included.

  • :since (DateTime)

    Only items updated since the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :_until (DateTime)

    Only items updated before the specified ISO 8601 TimeStamp (inclusive) are included. If a time zone is not specified, UTC time zone will be used.

  • :more (String)

    Value for this parameter will be provided in the &#39;more&#39; property of registration lists, where needed. An opaque value, construction and parsing may change without notice.

  • :include_child_results (BOOLEAN)

    Include information about each learning object, not just the top level in the results

  • :include_interactions_and_objectives (BOOLEAN)

    Include interactions and objectives in the results

  • :include_runtime (BOOLEAN)

    Include runtime details in the results

  • :tags (Array<String>)

Returns:

  • (Array<(RegistrationListSchema, Fixnum, Hash)>)

    RegistrationListSchema data, response status code and response headers



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/rustici_software_cloud_v2/api/registration_api.rb', line 1328

def get_registrations_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.get_registrations ...'
  end
  # resource path
  local_var_path = '/registrations'

  # query parameters
  query_params = {}
  query_params[:'courseId'] = opts[:'course_id'] if !opts[:'course_id'].nil?
  query_params[:'learnerId'] = opts[:'learner_id'] if !opts[:'learner_id'].nil?
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
  query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil?
  query_params[:'more'] = opts[:'more'] if !opts[:'more'].nil?
  query_params[:'includeChildResults'] = opts[:'include_child_results'] if !opts[:'include_child_results'].nil?
  query_params[:'includeInteractionsAndObjectives'] = opts[:'include_interactions_and_objectives'] if !opts[:'include_interactions_and_objectives'].nil?
  query_params[:'includeRuntime'] = opts[:'include_runtime'] if !opts[:'include_runtime'].nil?
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :csv) if !opts[:'tags'].nil?

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:GET, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'RegistrationListSchema')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#get_registrations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_registration_tags(registration_id, tags, opts = {}) ⇒ nil

Set tags on a registration. Set the tags for this registration. Note: any tags currently on this registration will be overwritten with the new array of tags.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (nil)


1378
1379
1380
1381
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1378

def put_registration_tags(registration_id, tags, opts = {})
  put_registration_tags_with_http_info(registration_id, tags, opts)
  nil
end

#put_registration_tags_batch(batch, opts = {}) ⇒ nil

Set tags on registrations. Sets all of the provided tags on all of the provided registrations.

Parameters:

  • batch

    Object representing an array of ids to apply an array of tags to.

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

    the optional parameters

Returns:

  • (nil)


1436
1437
1438
1439
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1436

def put_registration_tags_batch(batch, opts = {})
  put_registration_tags_batch_with_http_info(batch, opts)
  nil
end

#put_registration_tags_batch_with_http_info(batch, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Set tags on registrations. Sets all of the provided tags on all of the provided registrations.

Parameters:

  • batch

    Object representing an array of ids to apply an array of tags to.

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



1446
1447
1448
1449
1450
1451
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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1446

def put_registration_tags_batch_with_http_info(batch, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.put_registration_tags_batch ...'
  end
  # verify the required parameter 'batch' is set
  if @api_client.config.client_side_validation && batch.nil?
    fail ArgumentError, "Missing the required parameter 'batch' when calling RegistrationApi.put_registration_tags_batch"
  end
  # resource path
  local_var_path = '/registrations/tags'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(batch)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#put_registration_tags_batch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#put_registration_tags_with_http_info(registration_id, tags, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Set tags on a registration. Set the tags for this registration. Note: any tags currently on this registration will be overwritten with the new array of tags.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1389

def put_registration_tags_with_http_info(registration_id, tags, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.put_registration_tags ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.put_registration_tags"
  end
  # verify the required parameter 'tags' is set
  if @api_client.config.client_side_validation && tags.nil?
    fail ArgumentError, "Missing the required parameter 'tags' when calling RegistrationApi.put_registration_tags"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/tags'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(tags)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#put_registration_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_registration_configuration(registration_id, configuration_settings, opts = {}) ⇒ nil

Set registration configuration. Set configuration settings for this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (nil)


1490
1491
1492
1493
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1490

def set_registration_configuration(registration_id, configuration_settings, opts = {})
  set_registration_configuration_with_http_info(registration_id, configuration_settings, opts)
  nil
end

#set_registration_configuration_with_http_info(registration_id, configuration_settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Set registration configuration. Set configuration settings for this registration.

Parameters:

  • registration_id

    id for this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
1534
1535
1536
1537
1538
1539
1540
1541
1542
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1501

def set_registration_configuration_with_http_info(registration_id, configuration_settings, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.set_registration_configuration ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.set_registration_configuration"
  end
  # verify the required parameter 'configuration_settings' is set
  if @api_client.config.client_side_validation && configuration_settings.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling RegistrationApi.set_registration_configuration"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/configuration'.sub('{' + 'registrationId' + '}', registration_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(configuration_settings)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#set_registration_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_registration_instance_configuration(registration_id, instance_id, configuration_settings, opts = {}) ⇒ nil

Set configuration for instance of registration. Set configuration settings for this registration instance.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Returns:

  • (nil)


1550
1551
1552
1553
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1550

def set_registration_instance_configuration(registration_id, instance_id, configuration_settings, opts = {})
  set_registration_instance_configuration_with_http_info(registration_id, instance_id, configuration_settings, opts)
  nil
end

#set_registration_instance_configuration_with_http_info(registration_id, instance_id, configuration_settings, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Set configuration for instance of registration. Set configuration settings for this registration instance.

Parameters:

  • registration_id

    id for this registration

  • instance_id

    The instance of this registration

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1562

def set_registration_instance_configuration_with_http_info(registration_id, instance_id, configuration_settings, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.set_registration_instance_configuration ...'
  end
  # verify the required parameter 'registration_id' is set
  if @api_client.config.client_side_validation && registration_id.nil?
    fail ArgumentError, "Missing the required parameter 'registration_id' when calling RegistrationApi.set_registration_instance_configuration"
  end
  # verify the required parameter 'instance_id' is set
  if @api_client.config.client_side_validation && instance_id.nil?
    fail ArgumentError, "Missing the required parameter 'instance_id' when calling RegistrationApi.set_registration_instance_configuration"
  end
  if @api_client.config.client_side_validation && instance_id < 0
    fail ArgumentError, 'invalid value for "instance_id" when calling RegistrationApi.set_registration_instance_configuration, must be greater than or equal to 0.'
  end

  # verify the required parameter 'configuration_settings' is set
  if @api_client.config.client_side_validation && configuration_settings.nil?
    fail ArgumentError, "Missing the required parameter 'configuration_settings' when calling RegistrationApi.set_registration_instance_configuration"
  end
  # resource path
  local_var_path = '/registrations/{registrationId}/instances/{instanceId}/configuration'.sub('{' + 'registrationId' + '}', registration_id.to_s).sub('{' + 'instanceId' + '}', instance_id.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(configuration_settings)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#set_registration_instance_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#test_registration_postback(post_back, opts = {}) ⇒ nil

Send a test postback with a provided configuration. This method will allow testing a postback configuration that you provide by sending dummy data to the url specified, with the format you specify.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1617
1618
1619
1620
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1617

def test_registration_postback(post_back, opts = {})
  test_registration_postback_with_http_info(post_back, opts)
  nil
end

#test_registration_postback_with_http_info(post_back, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Send a test postback with a provided configuration. This method will allow testing a postback configuration that you provide by sending dummy data to the url specified, with the format you specify.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



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
# File 'lib/rustici_software_cloud_v2/api/registration_api.rb', line 1627

def test_registration_postback_with_http_info(post_back, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RegistrationApi.test_registration_postback ...'
  end
  # verify the required parameter 'post_back' is set
  if @api_client.config.client_side_validation && post_back.nil?
    fail ArgumentError, "Missing the required parameter 'post_back' when calling RegistrationApi.test_registration_postback"
  end
  # resource path
  local_var_path = '/registrations/postBackTest'

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(post_back)
  auth_names = ['APP_NORMAL', 'OAUTH']
  data, status_code, headers = @api_client.call_api(:POST, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RegistrationApi#test_registration_postback\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end