Class: BlueprintClient::HierarchyApi

Inherits:
Object
  • Object
show all
Defined in:
lib/blueprint_ruby_client/api/hierarchy_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ HierarchyApi

Returns a new instance of HierarchyApi.



19
20
21
# File 'lib/blueprint_ruby_client/api/hierarchy_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/blueprint_ruby_client/api/hierarchy_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#add_node(namespace_inc_global, body, opts = {}) ⇒ NodeBody

Add a node

Parameters:

  • namespace_inc_global

    identifier namespacing the blueprint. ‘global` is a special namespace which references data from all blueprints in the call.

  • body

    node

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

    the optional parameters

Returns:



29
30
31
32
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 29

def add_node(namespace_inc_global, body, opts = {})
  data, _status_code, _headers = add_node_with_http_info(namespace_inc_global, body, opts)
  return data
end

#add_node_with_http_info(namespace_inc_global, body, opts = {}) ⇒ Array<(NodeBody, Fixnum, Hash)>

Add a node

Parameters:

  • namespace_inc_global

    identifier namespacing the blueprint. ‘global` is a special namespace which references data from all blueprints in the call.

  • body

    node

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

    the optional parameters

Returns:

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

    NodeBody data, response status code and response headers



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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 40

def add_node_with_http_info(namespace_inc_global, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.add_node ..."
  end
  
  
  # verify the required parameter 'namespace_inc_global' is set
  fail ArgumentError, "Missing the required parameter 'namespace_inc_global' when calling HierarchyApi.add_node" if namespace_inc_global.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling HierarchyApi.add_node" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespaceIncGlobal}/nodes".sub('{format}','json').sub('{' + 'namespaceIncGlobal' + '}', namespace_inc_global.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['oauth2']
  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 => 'NodeBody')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#add_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#bulk_upload(namespace, opts = {}) ⇒ nil

Send operations to modify nodes in bulk, to be applied/rejected as a single transaction.nFormat will be:nn OLD NODE TYPE, OLD NODE ID, NEW NODE TYPE, NEW NODE ID, PARENTS, TITLE, DESCRIPTION, DOMAIN IDS, STUDENT NUMBERSn

Parameters:

  • namespace

    identifier namespacing the blueprint.

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

    the optional parameters

Returns:

  • (nil)


103
104
105
106
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 103

def bulk_upload(namespace, opts = {})
  bulk_upload_with_http_info(namespace, opts)
  return nil
end

#bulk_upload_with_http_info(namespace, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Send operations to modify nodes in bulk, to be applied/rejected as a single transaction.nFormat will be:nn OLD NODE TYPE, OLD NODE ID, NEW NODE TYPE, NEW NODE ID, PARENTS, TITLE, DESCRIPTION, DOMAIN IDS, STUDENT NUMBERSn

Parameters:

  • namespace

    identifier namespacing the blueprint.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 113

def bulk_upload_with_http_info(namespace, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.bulk_upload ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.bulk_upload" if namespace.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes.csv".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['text/plain', 'application/octet-stream']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  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: HierarchyApi#bulk_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_node(namespace, id, type, opts = {}) ⇒ nil

Delete a node

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • id

    id identifying a domain model

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Returns:

  • (nil)


169
170
171
172
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 169

def delete_node(namespace, id, type, opts = {})
  delete_node_with_http_info(namespace, id, type, opts)
  return nil
end

#delete_node_with_http_info(namespace, id, type, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete a node

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • id

    id identifying a domain model

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 181

def delete_node_with_http_info(namespace, id, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.delete_node ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.delete_node" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling HierarchyApi.delete_node" if id.nil?
  
  
  
  
  
  
  # verify the required parameter 'type' is set
  fail ArgumentError, "Missing the required parameter 'type' when calling HierarchyApi.delete_node" if type.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes/{type}/{id}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'id' + '}', id.to_s).sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  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: HierarchyApi#delete_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#export_hierarchy(namespace, opts = {}) ⇒ nil

Download the blueprint’s nodes in CSV formatnFormat will be:nn OLD NODE TYPE, OLD NODE ID, NEW NODE TYPE, NEW NODE ID, PARENTS, TITLE, DESCRIPTION, DOMAIN IDS, STUDENT NUMBERSnnOLD NODE TYPE and OLD NODE ID are left intentionally blank to allow direct upload of the output back into the bulk importern

Parameters:

  • namespace

    identifier namespacing the blueprint.

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

    the optional parameters

Returns:

  • (nil)


251
252
253
254
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 251

def export_hierarchy(namespace, opts = {})
  export_hierarchy_with_http_info(namespace, opts)
  return nil
end

#export_hierarchy_with_http_info(namespace, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Download the blueprint&#39;s nodes in CSV formatnFormat will be:nn OLD NODE TYPE, OLD NODE ID, NEW NODE TYPE, NEW NODE ID, PARENTS, TITLE, DESCRIPTION, DOMAIN IDS, STUDENT NUMBERSnnOLD NODE TYPE and OLD NODE ID are left intentionally blank to allow direct upload of the output back into the bulk importern

Parameters:

  • namespace

    identifier namespacing the blueprint.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
301
302
303
304
305
306
307
308
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 261

def export_hierarchy_with_http_info(namespace, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.export_hierarchy ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.export_hierarchy" if namespace.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes.csv".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  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)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#export_hierarchy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_ancestors(id, namespace, type, opts = {}) ⇒ NodeResultSet

Get ancestor nodes A proxy for finding ancestors of a given node, equivalent ton‘/1/abc/nodes?filter=department%2Fdep101`n

Parameters:

  • id

    id identifying a domain model

  • namespace

    identifier namespacing the blueprint.

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

Returns:



319
320
321
322
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 319

def get_ancestors(id, namespace, type, opts = {})
  data, _status_code, _headers = get_ancestors_with_http_info(id, namespace, type, opts)
  return data
end

#get_ancestors_with_http_info(id, namespace, type, opts = {}) ⇒ Array<(NodeResultSet, Fixnum, Hash)>

Get ancestor nodes A proxy for finding ancestors of a given node, equivalent ton‘/1/abc/nodes?filter=department%2Fdep101`n

Parameters:

  • id

    id identifying a domain model

  • namespace

    identifier namespacing the blueprint.

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

Returns:

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

    NodeResultSet data, response status code and response headers



333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
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
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 333

def get_ancestors_with_http_info(id, namespace, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.get_ancestors ..."
  end
  
  
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling HierarchyApi.get_ancestors" if id.nil?
  
  
  
  
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.get_ancestors" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'type' is set
  fail ArgumentError, "Missing the required parameter 'type' when calling HierarchyApi.get_ancestors" if type.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes/{type}/{id}/ancestors".sub('{format}','json').sub('{' + 'id' + '}', id.to_s).sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}
  query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  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 => 'NodeResultSet')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#get_ancestors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_children(id, namespace, type, opts = {}) ⇒ NodeResultSet

Get child nodes A proxy for finding children of a given node, equivalent ton‘/1/abc/nodes?filter=department%2Fdep101`n

Parameters:

  • id

    id identifying a domain model

  • namespace

    identifier namespacing the blueprint.

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

Returns:



422
423
424
425
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 422

def get_children(id, namespace, type, opts = {})
  data, _status_code, _headers = get_children_with_http_info(id, namespace, type, opts)
  return data
end

#get_children_with_http_info(id, namespace, type, opts = {}) ⇒ Array<(NodeResultSet, Fixnum, Hash)>

Get child nodes A proxy for finding children of a given node, equivalent ton‘/1/abc/nodes?filter=department%2Fdep101`n

Parameters:

  • id

    id identifying a domain model

  • namespace

    identifier namespacing the blueprint.

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

Returns:

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

    NodeResultSet data, 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
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 436

def get_children_with_http_info(id, namespace, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.get_children ..."
  end
  
  
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling HierarchyApi.get_children" if id.nil?
  
  
  
  
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.get_children" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'type' is set
  fail ArgumentError, "Missing the required parameter 'type' when calling HierarchyApi.get_children" if type.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes/{type}/{id}/children".sub('{format}','json').sub('{' + 'id' + '}', id.to_s).sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}
  query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  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 => 'NodeResultSet')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#get_children\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_descendants(id, namespace, type, opts = {}) ⇒ NodeResultSet

Get descendant nodes A proxy for finding descendants of a given node, equivalent ton‘/1/abc/nodes?filter=department%2Fdep101`n

Parameters:

  • id

    id identifying a domain model

  • namespace

    identifier namespacing the blueprint.

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

Returns:



525
526
527
528
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 525

def get_descendants(id, namespace, type, opts = {})
  data, _status_code, _headers = get_descendants_with_http_info(id, namespace, type, opts)
  return data
end

#get_descendants_with_http_info(id, namespace, type, opts = {}) ⇒ Array<(NodeResultSet, Fixnum, Hash)>

Get descendant nodes A proxy for finding descendants of a given node, equivalent ton‘/1/abc/nodes?filter=department%2Fdep101`n

Parameters:

  • id

    id identifying a domain model

  • namespace

    identifier namespacing the blueprint.

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

Returns:

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

    NodeResultSet data, response status code and response headers



539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 539

def get_descendants_with_http_info(id, namespace, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.get_descendants ..."
  end
  
  
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling HierarchyApi.get_descendants" if id.nil?
  
  
  
  
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.get_descendants" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'type' is set
  fail ArgumentError, "Missing the required parameter 'type' when calling HierarchyApi.get_descendants" if type.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes/{type}/{id}/descendants".sub('{format}','json').sub('{' + 'id' + '}', id.to_s).sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}
  query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  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 => 'NodeResultSet')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#get_descendants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_node(namespace, id, type, opts = {}) ⇒ NodeBody

Get details of a given node

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • id

    id identifying a domain model

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :include (Array<String>)

    comma separated list of elements to hydrate. Can include children, parents, and/or assets

Returns:



627
628
629
630
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 627

def get_node(namespace, id, type, opts = {})
  data, _status_code, _headers = get_node_with_http_info(namespace, id, type, opts)
  return data
end

#get_node_with_http_info(namespace, id, type, opts = {}) ⇒ Array<(NodeBody, Fixnum, Hash)>

Get details of a given node

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • id

    id identifying a domain model

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :include (Array<String>)

    comma separated list of elements to hydrate. Can include children, parents, and/or assets

Returns:

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

    NodeBody data, response status code and response headers



640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 640

def get_node_with_http_info(namespace, id, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.get_node ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.get_node" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling HierarchyApi.get_node" if id.nil?
  
  
  
  
  
  
  # verify the required parameter 'type' is set
  fail ArgumentError, "Missing the required parameter 'type' when calling HierarchyApi.get_node" if type.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes/{type}/{id}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'id' + '}', id.to_s).sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}
  query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if opts[:'include']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  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 => 'NodeBody')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#get_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_parents(id, namespace, type, opts = {}) ⇒ NodeResultSet

Get parent nodes A proxy for finding parents of a given node, equivalent ton‘/1/abc/nodes?filter=department%2Fdep101`n

Parameters:

  • id

    id identifying a domain model

  • namespace

    identifier namespacing the blueprint.

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

Returns:



722
723
724
725
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 722

def get_parents(id, namespace, type, opts = {})
  data, _status_code, _headers = get_parents_with_http_info(id, namespace, type, opts)
  return data
end

#get_parents_with_http_info(id, namespace, type, opts = {}) ⇒ Array<(NodeResultSet, Fixnum, Hash)>

Get parent nodes A proxy for finding parents of a given node, equivalent ton‘/1/abc/nodes?filter=department%2Fdep101`n

Parameters:

  • id

    id identifying a domain model

  • namespace

    identifier namespacing the blueprint.

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

Returns:

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

    NodeResultSet data, response status code and response headers



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
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 736

def get_parents_with_http_info(id, namespace, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.get_parents ..."
  end
  
  
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling HierarchyApi.get_parents" if id.nil?
  
  
  
  
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.get_parents" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'type' is set
  fail ArgumentError, "Missing the required parameter 'type' when calling HierarchyApi.get_parents" if type.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes/{type}/{id}/parents".sub('{format}','json').sub('{' + 'id' + '}', id.to_s).sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}
  query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  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 => 'NodeResultSet')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#get_parents\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#replace_node(namespace, id, body, type, opts = {}) ⇒ NodeBody

Replaces the node with the data sent in the body

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • id

    id identifying a domain model

  • body

    node

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Returns:



824
825
826
827
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 824

def replace_node(namespace, id, body, type, opts = {})
  data, _status_code, _headers = replace_node_with_http_info(namespace, id, body, type, opts)
  return data
end

#replace_node_with_http_info(namespace, id, body, type, opts = {}) ⇒ Array<(NodeBody, Fixnum, Hash)>

Replaces the node with the data sent in the body

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • id

    id identifying a domain model

  • body

    node

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Returns:

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

    NodeBody data, response status code and response headers



837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
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
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 837

def replace_node_with_http_info(namespace, id, body, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.replace_node ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.replace_node" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling HierarchyApi.replace_node" if id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling HierarchyApi.replace_node" if body.nil?
  
  
  
  
  
  
  # verify the required parameter 'type' is set
  fail ArgumentError, "Missing the required parameter 'type' when calling HierarchyApi.replace_node" if type.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes/{type}/{id}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'id' + '}', id.to_s).sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['oauth2']
  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,
    :return_type => 'NodeBody')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#replace_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#search_nodes(namespace_inc_global, opts = {}) ⇒ NodeResultSet

Search nodes This endpoint is a really flexible way to ask questions about the hierarchy. for example:nn###### Find all nodes for abc:n‘/1/abc/nodes`nn###### Find all modules for abc:n`/1/abc/nodes?filter=Modules`nn###### Find all nodes that are descendants of DEP101:n`/1/abc/nodes?filter=departments%2Fdep101`nn###### Find all Departments that are ancestors of ABF203:n`/1/abc/nodes?filter=modules%2Fabf203&filter=Departments` # <= case insensitivenn###### Find all nodes with list assets that are descendants of DEP101 for abc:n`/1/abc/nodes?filter=Modules&filter=departments%2FDEP101&filter=true&filter=Lists`nn###### Globally, find all modules that have no list assetsn`/1/global/nodes?filter=Modules&filter=false&filter=Lists`nn###### Find all nodes of type modules during 2015 that have no assets. Note a node’s valid_from/valid_to just need to overlap from/to to qualifyn‘/1/global/nodes?filter=Modules&filter=false&filter=20150101&filter=20151231`n

Parameters:

  • namespace_inc_global

    identifier namespacing the blueprint. ‘global` is a special namespace which references data from all blueprints in the call.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

  • :include (Array<String>)

    comma separated list of elements to hydrate. Can include children, parents, and/or assets

  • :filter_node_type (Array<String>)

    type of nodes to return

  • :filter_child (Array<String>)

    limit to nodes with children matching type/code

  • :filter_parent (Array<String>)

    limit to nodes with parent matching type/code

  • :filter_ancestor (Array<String>)

    limit to nodes with ancestor matching type/code

  • :filter_descendant (Array<String>)

    limit to nodes with descendant matching type/code

  • :filter_has_assets (BOOLEAN)

    limit to either nodes that have assets (true) nodes that have no assets (false) or omit to consider both nodes with and without assets

  • :filter_asset_type (Array<String>)

    type of asset to return

  • :filter_from (Date)

    limit to results valid after this date, format is ISO8601 date

  • :filter_to (Date)

    limit to results valid before this date, format is ISO8601

  • :q_node (String)

    query term(s) to search for nodes. Allows wildcard searching with &#39;*&#39;

  • :q_child (String)

    query id/title terms to search for child nodes. Allows wildcard searching with &#39;*&#39;

  • :q_parent (String)

    query id/title terms to search for parent nodes. Allows wildcard searching with &#39;*&#39;

  • :q_descendant (String)

    query id/title terms to search for descendant nodes. Allows wildcard searching with &#39;*&#39;

  • :q_ancestor (String)

    query id/title terms to search for ancestor nodes. Allows wildcard searching with &#39;*&#39;

Returns:



933
934
935
936
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 933

def search_nodes(namespace_inc_global, opts = {})
  data, _status_code, _headers = search_nodes_with_http_info(namespace_inc_global, opts)
  return data
end

#search_nodes_with_http_info(namespace_inc_global, opts = {}) ⇒ Array<(NodeResultSet, Fixnum, Hash)>

Search nodes This endpoint is a really flexible way to ask questions about the hierarchy. for example:nn###### Find all nodes for abc:n‘/1/abc/nodes`nn###### Find all modules for abc:n`/1/abc/nodes?filter=Modules`nn###### Find all nodes that are descendants of DEP101:n`/1/abc/nodes?filter=departments%2Fdep101`nn###### Find all Departments that are ancestors of ABF203:n`/1/abc/nodes?filter=modules%2Fabf203&amp;filter=Departments` # &lt;= case insensitivenn###### Find all nodes with list assets that are descendants of DEP101 for abc:n`/1/abc/nodes?filter=Modules&amp;filter=departments%2FDEP101&amp;filter=true&amp;filter=Lists`nn###### Globally, find all modules that have no list assetsn`/1/global/nodes?filter=Modules&amp;filter=false&amp;filter=Lists`nn###### Find all nodes of type modules during 2015 that have no assets. Note a node&#39;s valid_from/valid_to just need to overlap from/to to qualifyn`/1/global/nodes?filter=Modules&amp;filter=false&amp;filter=20150101&amp;filter=20151231`n

Parameters:

  • namespace_inc_global

    identifier namespacing the blueprint. ‘global` is a special namespace which references data from all blueprints in the call.

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

    the optional parameters

Options Hash (opts):

  • :offset (Float)

    index to start result set from

  • :limit (Float)

    number of records to return

  • :include (Array<String>)

    comma separated list of elements to hydrate. Can include children, parents, and/or assets

  • :filter_node_type (Array<String>)

    type of nodes to return

  • :filter_child (Array<String>)

    limit to nodes with children matching type/code

  • :filter_parent (Array<String>)

    limit to nodes with parent matching type/code

  • :filter_ancestor (Array<String>)

    limit to nodes with ancestor matching type/code

  • :filter_descendant (Array<String>)

    limit to nodes with descendant matching type/code

  • :filter_has_assets (BOOLEAN)

    limit to either nodes that have assets (true) nodes that have no assets (false) or omit to consider both nodes with and without assets

  • :filter_asset_type (Array<String>)

    type of asset to return

  • :filter_from (Date)

    limit to results valid after this date, format is ISO8601 date

  • :filter_to (Date)

    limit to results valid before this date, format is ISO8601

  • :q_node (String)

    query term(s) to search for nodes. Allows wildcard searching with &#39;*&#39;

  • :q_child (String)

    query id/title terms to search for child nodes. Allows wildcard searching with &#39;*&#39;

  • :q_parent (String)

    query id/title terms to search for parent nodes. Allows wildcard searching with &#39;*&#39;

  • :q_descendant (String)

    query id/title terms to search for descendant nodes. Allows wildcard searching with &#39;*&#39;

  • :q_ancestor (String)

    query id/title terms to search for ancestor nodes. Allows wildcard searching with &#39;*&#39;

Returns:

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

    NodeResultSet data, response status code and response headers



960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
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
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 960

def search_nodes_with_http_info(namespace_inc_global, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.search_nodes ..."
  end
  
  
  # verify the required parameter 'namespace_inc_global' is set
  fail ArgumentError, "Missing the required parameter 'namespace_inc_global' when calling HierarchyApi.search_nodes" if namespace_inc_global.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/{namespaceIncGlobal}/nodes".sub('{format}','json').sub('{' + 'namespaceIncGlobal' + '}', namespace_inc_global.to_s)

  # query parameters
  query_params = {}
  query_params[:'offset'] = opts[:'offset'] if opts[:'offset']
  query_params[:'limit'] = opts[:'limit'] if opts[:'limit']
  query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if opts[:'include']
  query_params[:'filter[nodeType]'] = @api_client.build_collection_param(opts[:'filter_node_type'], :csv) if opts[:'filter_node_type']
  query_params[:'filter[child]'] = @api_client.build_collection_param(opts[:'filter_child'], :csv) if opts[:'filter_child']
  query_params[:'filter[parent]'] = @api_client.build_collection_param(opts[:'filter_parent'], :csv) if opts[:'filter_parent']
  query_params[:'filter[ancestor]'] = @api_client.build_collection_param(opts[:'filter_ancestor'], :csv) if opts[:'filter_ancestor']
  query_params[:'filter[descendant]'] = @api_client.build_collection_param(opts[:'filter_descendant'], :csv) if opts[:'filter_descendant']
  query_params[:'filter[hasAssets]'] = opts[:'filter_has_assets'] if opts[:'filter_has_assets']
  query_params[:'filter[assetType]'] = @api_client.build_collection_param(opts[:'filter_asset_type'], :csv) if opts[:'filter_asset_type']
  query_params[:'filter[from]'] = opts[:'filter_from'] if opts[:'filter_from']
  query_params[:'filter[to]'] = opts[:'filter_to'] if opts[:'filter_to']
  query_params[:'q[node]'] = opts[:'q_node'] if opts[:'q_node']
  query_params[:'q[child]'] = opts[:'q_child'] if opts[:'q_child']
  query_params[:'q[parent]'] = opts[:'q_parent'] if opts[:'q_parent']
  query_params[:'q[descendant]'] = opts[:'q_descendant'] if opts[:'q_descendant']
  query_params[:'q[ancestor]'] = opts[:'q_ancestor'] if opts[:'q_ancestor']

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = nil
  
  auth_names = ['oauth2']
  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 => 'NodeResultSet')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#search_nodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_node(namespace, id, body, type, opts = {}) ⇒ NodeBody

Perform a partial update of a node

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • id

    id identifying a domain model

  • body

    node

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Returns:



1137
1138
1139
1140
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 1137

def update_node(namespace, id, body, type, opts = {})
  data, _status_code, _headers = update_node_with_http_info(namespace, id, body, type, opts)
  return data
end

#update_node_with_http_info(namespace, id, body, type, opts = {}) ⇒ Array<(NodeBody, Fixnum, Hash)>

Perform a partial update of a node

Parameters:

  • namespace

    identifier namespacing the blueprint.

  • id

    id identifying a domain model

  • body

    node

  • type

    subtype of Node, e.g. &#39;modules&#39;, &#39;departments&#39;, etc.

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

    the optional parameters

Returns:

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

    NodeBody data, response status code and response headers



1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 1150

def update_node_with_http_info(namespace, id, body, type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.update_node ..."
  end
  
  
  # verify the required parameter 'namespace' is set
  fail ArgumentError, "Missing the required parameter 'namespace' when calling HierarchyApi.update_node" if namespace.nil?
  
  
  
  
  
  
  # verify the required parameter 'id' is set
  fail ArgumentError, "Missing the required parameter 'id' when calling HierarchyApi.update_node" if id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling HierarchyApi.update_node" if body.nil?
  
  
  
  
  
  
  # verify the required parameter 'type' is set
  fail ArgumentError, "Missing the required parameter 'type' when calling HierarchyApi.update_node" if type.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/{namespace}/nodes/{type}/{id}".sub('{format}','json').sub('{' + 'namespace' + '}', namespace.to_s).sub('{' + 'id' + '}', id.to_s).sub('{' + 'type' + '}', type.to_s)

  # query parameters
  query_params = {}

  # header parameters
  header_params = {}

  # HTTP header 'Accept' (if needed)
  local_header_accept = ['application/vnd.api+json']
  local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result

  # HTTP header 'Content-Type'
  local_header_content_type = ['application/json']
  header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)

  # form parameters
  form_params = {}

  # http body (model)
  post_body = @api_client.object_to_http_body(body)
  
  auth_names = ['oauth2']
  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'NodeBody')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: HierarchyApi#update_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end