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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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

#delete_nodes(namespace_inc_global, opts = {}) ⇒ nil

Delete nodes Delete all nodes belonging to the given namespace.

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

Returns:

  • (nil)


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

def delete_nodes(namespace_inc_global, opts = {})
  delete_nodes_with_http_info(namespace_inc_global, opts)
  return nil
end

#delete_nodes_with_http_info(namespace_inc_global, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete nodes Delete all nodes belonging to the given namespace.

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

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 delete_nodes_with_http_info(namespace_inc_global, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: HierarchyApi.delete_nodes ..."
  end
  
  
  # verify the required parameter 'namespace_inc_global' is set
  fail ArgumentError, "Missing the required parameter 'namespace_inc_global' when calling HierarchyApi.delete_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 = {}

  # 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_nodes\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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

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

    the optional parameters

Returns:

  • (nil)


315
316
317
318
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 315

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 325

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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:



383
384
385
386
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 383

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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



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

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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:



486
487
488
489
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 486

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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



500
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
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
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 500

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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:



589
590
591
592
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 589

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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



603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 603

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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, nodes, and/or assets

Returns:



691
692
693
694
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 691

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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, nodes, and/or assets

Returns:

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

    NodeBody data, response status code and response headers



704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
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
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 704

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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:



786
787
788
789
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 786

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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



800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 800

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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:



888
889
890
891
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 888

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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



901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 901

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.nThe includes parameter can be set to either parents, children, assets.nnExamples: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 nodes that are descendants of DEP101 or DEP102:n`/1/abc/nodes?filter=departments%2Fdep101,departments%2Fdep102`nn###### Find all nodes that are descendants of DEP101 and DEP102:n`/1/abc/nodes?filter=departments%2Fdep101&filter=departments%2Fdep102“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`nn###### Find all nodes of type modules with assets which are also related to DEP101.n`/1/global/nodes?filter=Modules&filter=departments%2Fdep101`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, nodes, and/or assets

  • :filter_asset (Array<String>)

    limit to nodes that have an asset matching type/code

  • :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. This filters the results by asset type, but returns all the assets associated with the result.

  • :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;

  • :filter_asset_node (Array<String>)

    limit to nodes that have an asset related to another node matching type/code

Returns:



999
1000
1001
1002
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 999

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.nThe includes parameter can be set to either parents, children, assets.nnExamples: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 nodes that are descendants of DEP101 or DEP102:n`/1/abc/nodes?filter=departments%2Fdep101,departments%2Fdep102`nn###### Find all nodes that are descendants of DEP101 and DEP102:n`/1/abc/nodes?filter=departments%2Fdep101&amp;filter=departments%2Fdep102“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`nn###### Find all nodes of type modules with assets which are also related to DEP101.n`/1/global/nodes?filter=Modules&amp;filter=departments%2Fdep101`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, nodes, and/or assets

  • :filter_asset (Array<String>)

    limit to nodes that have an asset matching type/code

  • :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. This filters the results by asset type, but returns all the assets associated with the result.

  • :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;

  • :filter_asset_node (Array<String>)

    limit to nodes that have an asset related to another node matching type/code

Returns:

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

    NodeResultSet data, response status code and response headers



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
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
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
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 1028

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[asset]'] = @api_client.build_collection_param(opts[:'filter_asset'], :csv) if opts[:'filter_asset']
  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']
  query_params[:'filter[asset.node]'] = @api_client.build_collection_param(opts[:'filter_asset_node'], :csv) if opts[:'filter_asset_node']

  # 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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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:



1219
1220
1221
1222
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 1219

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. It must start with a letter or underscore and can only be followed by letters, numbers and underscores.

  • 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



1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
# File 'lib/blueprint_ruby_client/api/hierarchy_api.rb', line 1232

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