permify 0.0.1 → 1.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Gemfile +6 -1
- data/README.md +241 -16
- data/Rakefile +7 -7
- data/generator/generate-sdk.sh +157 -0
- data/generator/openapi-generator-cli.jar +0 -0
- data/generator/openapi.json +3699 -0
- data/lib/permify/api/bundle_api.rb +238 -0
- data/lib/permify/api/data_api.rb +526 -0
- data/lib/permify/api/permission_api.rb +528 -0
- data/lib/permify/api/schema_api.rb +310 -0
- data/lib/permify/api/tenancy_api.rb +215 -0
- data/lib/permify/api/watch_api.rb +94 -0
- data/lib/permify/api_client.rb +394 -0
- data/lib/permify/api_error.rb +58 -0
- data/lib/permify/configuration.rb +298 -0
- data/lib/permify/models/abstract_type.rb +228 -0
- data/lib/permify/models/any.rb +216 -0
- data/lib/permify/models/argument.rb +215 -0
- data/lib/permify/models/attribute.rb +233 -0
- data/lib/permify/models/attribute_definition.rb +247 -0
- data/lib/permify/models/attribute_filter.rb +226 -0
- data/lib/permify/models/attribute_read_request_metadata.rb +216 -0
- data/lib/permify/models/attribute_read_response.rb +228 -0
- data/lib/permify/models/attribute_type.rb +46 -0
- data/lib/permify/models/bulk_check_body.rb +248 -0
- data/lib/permify/models/bundle_delete_body.rb +216 -0
- data/lib/permify/models/bundle_delete_response.rb +214 -0
- data/lib/permify/models/bundle_read_body.rb +214 -0
- data/lib/permify/models/bundle_read_response.rb +214 -0
- data/lib/permify/models/bundle_run_response.rb +216 -0
- data/lib/permify/models/bundle_write_body.rb +218 -0
- data/lib/permify/models/bundle_write_response.rb +218 -0
- data/lib/permify/models/check_body.rb +264 -0
- data/lib/permify/models/check_result.rb +40 -0
- data/lib/permify/models/checked_expr.rb +258 -0
- data/lib/permify/models/child.rb +224 -0
- data/lib/permify/models/component.rb +41 -0
- data/lib/permify/models/comprehension.rb +281 -0
- data/lib/permify/models/computed_attribute.rb +215 -0
- data/lib/permify/models/computed_user_set.rb +215 -0
- data/lib/permify/models/constant.rb +317 -0
- data/lib/permify/models/context.rb +240 -0
- data/lib/permify/models/create_list.rb +230 -0
- data/lib/permify/models/create_struct.rb +228 -0
- data/lib/permify/models/data_bundle.rb +240 -0
- data/lib/permify/models/data_change.rb +255 -0
- data/lib/permify/models/data_change_operation.rb +40 -0
- data/lib/permify/models/data_changes.rb +228 -0
- data/lib/permify/models/data_delete_body.rb +224 -0
- data/lib/permify/models/data_delete_response.rb +216 -0
- data/lib/permify/models/data_write_body.rb +239 -0
- data/lib/permify/models/data_write_request_metadata.rb +216 -0
- data/lib/permify/models/data_write_response.rb +216 -0
- data/lib/permify/models/delete_relationships_body.rb +214 -0
- data/lib/permify/models/entity.rb +224 -0
- data/lib/permify/models/entity_definition.rb +264 -0
- data/lib/permify/models/entity_definition_reference.rb +41 -0
- data/lib/permify/models/entity_filter.rb +226 -0
- data/lib/permify/models/entry.rb +254 -0
- data/lib/permify/models/expand_leaf.rb +233 -0
- data/lib/permify/models/expand_tree_node.rb +248 -0
- data/lib/permify/models/expand_tree_node_operation.rb +41 -0
- data/lib/permify/models/expr.rb +279 -0
- data/lib/permify/models/expr_call.rb +237 -0
- data/lib/permify/models/extension.rb +236 -0
- data/lib/permify/models/function_type.rb +227 -0
- data/lib/permify/models/ident.rb +216 -0
- data/lib/permify/models/leaf.rb +242 -0
- data/lib/permify/models/list_type.rb +215 -0
- data/lib/permify/models/lookup_entity_body.rb +285 -0
- data/lib/permify/models/lookup_entity_stream_body.rb +285 -0
- data/lib/permify/models/lookup_subject_body.rb +284 -0
- data/lib/permify/models/map_type.rb +224 -0
- data/lib/permify/models/partial_write_body.rb +225 -0
- data/lib/permify/models/partials.rb +238 -0
- data/lib/permify/models/permission_bulk_check_request_item.rb +233 -0
- data/lib/permify/models/permission_bulk_check_response.rb +218 -0
- data/lib/permify/models/permission_check_request_metadata.rb +236 -0
- data/lib/permify/models/permission_check_response.rb +246 -0
- data/lib/permify/models/permission_check_response_metadata.rb +216 -0
- data/lib/permify/models/permission_definition.rb +225 -0
- data/lib/permify/models/permission_expand_body.rb +255 -0
- data/lib/permify/models/permission_expand_request_metadata.rb +226 -0
- data/lib/permify/models/permission_expand_response.rb +215 -0
- data/lib/permify/models/permission_lookup_entity_request_metadata.rb +236 -0
- data/lib/permify/models/permission_lookup_entity_response.rb +228 -0
- data/lib/permify/models/permission_lookup_entity_stream_response.rb +226 -0
- data/lib/permify/models/permission_lookup_subject_request_metadata.rb +236 -0
- data/lib/permify/models/permission_lookup_subject_response.rb +228 -0
- data/lib/permify/models/permission_subject_permission_request_metadata.rb +246 -0
- data/lib/permify/models/permission_subject_permission_response.rb +218 -0
- data/lib/permify/models/primitive_type.rb +44 -0
- data/lib/permify/models/read_attributes_body.rb +244 -0
- data/lib/permify/models/read_relationships_body.rb +244 -0
- data/lib/permify/models/relation_definition.rb +228 -0
- data/lib/permify/models/relation_reference.rb +226 -0
- data/lib/permify/models/relationship_delete_response.rb +215 -0
- data/lib/permify/models/relationship_read_request_metadata.rb +216 -0
- data/lib/permify/models/relationship_read_response.rb +228 -0
- data/lib/permify/models/relationship_write_request_metadata.rb +214 -0
- data/lib/permify/models/relationship_write_response.rb +215 -0
- data/lib/permify/models/rewrite.rb +249 -0
- data/lib/permify/models/rewrite_operation.rb +41 -0
- data/lib/permify/models/rule_definition.rb +237 -0
- data/lib/permify/models/run_bundle_body.rb +228 -0
- data/lib/permify/models/schema_definition.rb +242 -0
- data/lib/permify/models/schema_definition_reference.rb +40 -0
- data/lib/permify/models/schema_list.rb +223 -0
- data/lib/permify/models/schema_list_body.rb +226 -0
- data/lib/permify/models/schema_list_response.rb +235 -0
- data/lib/permify/models/schema_partial_write_request_metadata.rb +216 -0
- data/lib/permify/models/schema_partial_write_response.rb +216 -0
- data/lib/permify/models/schema_read_body.rb +215 -0
- data/lib/permify/models/schema_read_request_metadata.rb +216 -0
- data/lib/permify/models/schema_read_response.rb +215 -0
- data/lib/permify/models/schema_write_body.rb +216 -0
- data/lib/permify/models/schema_write_response.rb +216 -0
- data/lib/permify/models/select.rb +235 -0
- data/lib/permify/models/source_info.rb +274 -0
- data/lib/permify/models/status.rb +234 -0
- data/lib/permify/models/stream_result_of_permission_lookup_entity_stream_response.rb +223 -0
- data/lib/permify/models/stream_result_of_watch_response.rb +223 -0
- data/lib/permify/models/string_array_value.rb +218 -0
- data/lib/permify/models/subject.rb +233 -0
- data/lib/permify/models/subject_filter.rb +235 -0
- data/lib/permify/models/subject_permission_body.rb +242 -0
- data/lib/permify/models/subjects.rb +218 -0
- data/lib/permify/models/tenant.rb +236 -0
- data/lib/permify/models/tenant_create_request.rb +226 -0
- data/lib/permify/models/tenant_create_response.rb +215 -0
- data/lib/permify/models/tenant_delete_response.rb +216 -0
- data/lib/permify/models/tenant_list_request.rb +226 -0
- data/lib/permify/models/tenant_list_response.rb +228 -0
- data/lib/permify/models/tuple.rb +233 -0
- data/lib/permify/models/tuple_filter.rb +233 -0
- data/lib/permify/models/tuple_set.rb +215 -0
- data/lib/permify/models/tuple_to_user_set.rb +224 -0
- data/lib/permify/models/v1_call.rb +226 -0
- data/lib/permify/models/v1_expand.rb +255 -0
- data/lib/permify/models/v1_operation.rb +254 -0
- data/lib/permify/models/v1alpha1_reference.rb +237 -0
- data/lib/permify/models/v1alpha1_type.rb +350 -0
- data/lib/permify/models/values.rb +216 -0
- data/lib/permify/models/version.rb +225 -0
- data/lib/permify/models/watch_body.rb +216 -0
- data/lib/permify/models/watch_response.rb +215 -0
- data/lib/permify/models/well_known_type.rb +41 -0
- data/lib/permify/models/write_relationships_body.rb +227 -0
- data/lib/permify/version.rb +13 -1
- data/lib/permify.rb +175 -15
- data/permify-ruby.gemspec +39 -0
- data/permify.gemspec +38 -27
- data/spec/api/bundle_api_spec.rb +71 -0
- data/spec/api/data_api_spec.rb +119 -0
- data/spec/api/permission_api_spec.rb +120 -0
- data/spec/api/schema_api_spec.rb +83 -0
- data/spec/api/tenancy_api_spec.rb +68 -0
- data/spec/api/watch_api_spec.rb +47 -0
- data/spec/models/abstract_type_spec.rb +42 -0
- data/spec/models/any_spec.rb +36 -0
- data/spec/models/argument_spec.rb +36 -0
- data/spec/models/attribute_definition_spec.rb +42 -0
- data/spec/models/attribute_filter_spec.rb +42 -0
- data/spec/models/attribute_read_request_metadata_spec.rb +36 -0
- data/spec/models/attribute_read_response_spec.rb +42 -0
- data/spec/models/attribute_spec.rb +48 -0
- data/spec/models/attribute_type_spec.rb +30 -0
- data/spec/models/bulk_check_body_spec.rb +54 -0
- data/spec/models/bundle_delete_body_spec.rb +36 -0
- data/spec/models/bundle_delete_response_spec.rb +36 -0
- data/spec/models/bundle_read_body_spec.rb +36 -0
- data/spec/models/bundle_read_response_spec.rb +36 -0
- data/spec/models/bundle_run_response_spec.rb +36 -0
- data/spec/models/bundle_write_body_spec.rb +36 -0
- data/spec/models/bundle_write_response_spec.rb +36 -0
- data/spec/models/check_body_spec.rb +66 -0
- data/spec/models/check_result_spec.rb +30 -0
- data/spec/models/checked_expr_spec.rb +60 -0
- data/spec/models/child_spec.rb +42 -0
- data/spec/models/component_spec.rb +30 -0
- data/spec/models/comprehension_spec.rb +78 -0
- data/spec/models/computed_attribute_spec.rb +36 -0
- data/spec/models/computed_user_set_spec.rb +36 -0
- data/spec/models/constant_spec.rb +84 -0
- data/spec/models/context_spec.rb +48 -0
- data/spec/models/create_list_spec.rb +42 -0
- data/spec/models/create_struct_spec.rb +42 -0
- data/spec/models/data_bundle_spec.rb +48 -0
- data/spec/models/data_change_operation_spec.rb +30 -0
- data/spec/models/data_change_spec.rb +48 -0
- data/spec/models/data_changes_spec.rb +42 -0
- data/spec/models/data_delete_body_spec.rb +42 -0
- data/spec/models/data_delete_response_spec.rb +36 -0
- data/spec/models/data_write_body_spec.rb +48 -0
- data/spec/models/data_write_request_metadata_spec.rb +36 -0
- data/spec/models/data_write_response_spec.rb +36 -0
- data/spec/models/delete_relationships_body_spec.rb +36 -0
- data/spec/models/entity_definition_reference_spec.rb +30 -0
- data/spec/models/entity_definition_spec.rb +60 -0
- data/spec/models/entity_filter_spec.rb +42 -0
- data/spec/models/entity_spec.rb +42 -0
- data/spec/models/entry_spec.rb +60 -0
- data/spec/models/expand_leaf_spec.rb +48 -0
- data/spec/models/expand_tree_node_operation_spec.rb +30 -0
- data/spec/models/expand_tree_node_spec.rb +42 -0
- data/spec/models/expr_call_spec.rb +48 -0
- data/spec/models/expr_spec.rb +78 -0
- data/spec/models/extension_spec.rb +48 -0
- data/spec/models/function_type_spec.rb +42 -0
- data/spec/models/ident_spec.rb +36 -0
- data/spec/models/leaf_spec.rb +54 -0
- data/spec/models/list_type_spec.rb +36 -0
- data/spec/models/lookup_entity_body_spec.rb +78 -0
- data/spec/models/lookup_entity_stream_body_spec.rb +78 -0
- data/spec/models/lookup_subject_body_spec.rb +78 -0
- data/spec/models/map_type_spec.rb +42 -0
- data/spec/models/partial_write_body_spec.rb +42 -0
- data/spec/models/partials_spec.rb +48 -0
- data/spec/models/permission_bulk_check_request_item_spec.rb +48 -0
- data/spec/models/permission_bulk_check_response_spec.rb +36 -0
- data/spec/models/permission_check_request_metadata_spec.rb +48 -0
- data/spec/models/permission_check_response_metadata_spec.rb +36 -0
- data/spec/models/permission_check_response_spec.rb +42 -0
- data/spec/models/permission_definition_spec.rb +42 -0
- data/spec/models/permission_expand_body_spec.rb +60 -0
- data/spec/models/permission_expand_request_metadata_spec.rb +42 -0
- data/spec/models/permission_expand_response_spec.rb +36 -0
- data/spec/models/permission_lookup_entity_request_metadata_spec.rb +48 -0
- data/spec/models/permission_lookup_entity_response_spec.rb +42 -0
- data/spec/models/permission_lookup_entity_stream_response_spec.rb +42 -0
- data/spec/models/permission_lookup_subject_request_metadata_spec.rb +48 -0
- data/spec/models/permission_lookup_subject_response_spec.rb +42 -0
- data/spec/models/permission_subject_permission_request_metadata_spec.rb +54 -0
- data/spec/models/permission_subject_permission_response_spec.rb +36 -0
- data/spec/models/primitive_type_spec.rb +30 -0
- data/spec/models/read_attributes_body_spec.rb +54 -0
- data/spec/models/read_relationships_body_spec.rb +54 -0
- data/spec/models/relation_definition_spec.rb +42 -0
- data/spec/models/relation_reference_spec.rb +42 -0
- data/spec/models/relationship_delete_response_spec.rb +36 -0
- data/spec/models/relationship_read_request_metadata_spec.rb +36 -0
- data/spec/models/relationship_read_response_spec.rb +42 -0
- data/spec/models/relationship_write_request_metadata_spec.rb +36 -0
- data/spec/models/relationship_write_response_spec.rb +36 -0
- data/spec/models/rewrite_operation_spec.rb +30 -0
- data/spec/models/rewrite_spec.rb +42 -0
- data/spec/models/rule_definition_spec.rb +48 -0
- data/spec/models/run_bundle_body_spec.rb +42 -0
- data/spec/models/schema_definition_reference_spec.rb +30 -0
- data/spec/models/schema_definition_spec.rb +48 -0
- data/spec/models/schema_list_body_spec.rb +42 -0
- data/spec/models/schema_list_response_spec.rb +48 -0
- data/spec/models/schema_list_spec.rb +42 -0
- data/spec/models/schema_partial_write_request_metadata_spec.rb +36 -0
- data/spec/models/schema_partial_write_response_spec.rb +36 -0
- data/spec/models/schema_read_body_spec.rb +36 -0
- data/spec/models/schema_read_request_metadata_spec.rb +36 -0
- data/spec/models/schema_read_response_spec.rb +36 -0
- data/spec/models/schema_write_body_spec.rb +36 -0
- data/spec/models/schema_write_response_spec.rb +36 -0
- data/spec/models/select_spec.rb +48 -0
- data/spec/models/source_info_spec.rb +66 -0
- data/spec/models/status_spec.rb +48 -0
- data/spec/models/stream_result_of_permission_lookup_entity_stream_response_spec.rb +42 -0
- data/spec/models/stream_result_of_watch_response_spec.rb +42 -0
- data/spec/models/string_array_value_spec.rb +36 -0
- data/spec/models/subject_filter_spec.rb +48 -0
- data/spec/models/subject_permission_body_spec.rb +54 -0
- data/spec/models/subject_spec.rb +48 -0
- data/spec/models/subjects_spec.rb +36 -0
- data/spec/models/tenant_create_request_spec.rb +42 -0
- data/spec/models/tenant_create_response_spec.rb +36 -0
- data/spec/models/tenant_delete_response_spec.rb +36 -0
- data/spec/models/tenant_list_request_spec.rb +42 -0
- data/spec/models/tenant_list_response_spec.rb +42 -0
- data/spec/models/tenant_spec.rb +48 -0
- data/spec/models/tuple_filter_spec.rb +48 -0
- data/spec/models/tuple_set_spec.rb +36 -0
- data/spec/models/tuple_spec.rb +48 -0
- data/spec/models/tuple_to_user_set_spec.rb +42 -0
- data/spec/models/v1_call_spec.rb +42 -0
- data/spec/models/v1_expand_spec.rb +60 -0
- data/spec/models/v1_operation_spec.rb +54 -0
- data/spec/models/v1alpha1_reference_spec.rb +48 -0
- data/spec/models/v1alpha1_type_spec.rb +108 -0
- data/spec/models/values_spec.rb +36 -0
- data/spec/models/version_spec.rb +42 -0
- data/spec/models/watch_body_spec.rb +36 -0
- data/spec/models/watch_response_spec.rb +36 -0
- data/spec/models/well_known_type_spec.rb +30 -0
- data/spec/models/write_relationships_body_spec.rb +42 -0
- data/spec/spec_helper.rb +101 -3
- metadata +449 -85
- data/.gitignore +0 -17
- data/.rspec +0 -2
- data/LICENSE.txt +0 -22
- data/lib/permify/authorization.rb +0 -17
- data/lib/permify/clearance.rb +0 -29
- data/lib/permify/permission/combination/any.rb +0 -13
- data/lib/permify/permission/combination.rb +0 -4
- data/lib/permify/permission/combination_map.rb +0 -23
- data/lib/permify/permission/dynamic.rb +0 -13
- data/lib/permify/permission/null.rb +0 -7
- data/lib/permify/permission/static.rb +0 -7
- data/lib/permify/permission.rb +0 -10
- data/lib/permify/permission_map.rb +0 -32
- data/lib/permify/repository.rb +0 -68
- data/spec/integration_spec.rb +0 -114
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Permify API
|
|
3
|
+
|
|
4
|
+
#Permify is an open source authorization service for creating fine-grained and scalable authorization systems.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v1.5.4
|
|
7
|
+
Contact: hello@permify.co
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 7.2.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module Permify
|
|
16
|
+
class DataApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# run bundle
|
|
23
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
24
|
+
# @param body [RunBundleBody]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [BundleRunResponse]
|
|
27
|
+
def bundle_run(tenant_id, body, opts = {})
|
|
28
|
+
data, _status_code, _headers = bundle_run_with_http_info(tenant_id, body, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# run bundle
|
|
33
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
34
|
+
# @param body [RunBundleBody]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(BundleRunResponse, Integer, Hash)>] BundleRunResponse data, response status code and response headers
|
|
37
|
+
def bundle_run_with_http_info(tenant_id, body, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: DataApi.bundle_run ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'tenant_id' is set
|
|
42
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DataApi.bundle_run"
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'body' is set
|
|
46
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DataApi.bundle_run"
|
|
48
|
+
end
|
|
49
|
+
# resource path
|
|
50
|
+
local_var_path = '/v1/tenants/{tenant_id}/data/run-bundle'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
51
|
+
|
|
52
|
+
# query parameters
|
|
53
|
+
query_params = opts[:query_params] || {}
|
|
54
|
+
|
|
55
|
+
# header parameters
|
|
56
|
+
header_params = opts[:header_params] || {}
|
|
57
|
+
# HTTP header 'Accept' (if needed)
|
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
59
|
+
# HTTP header 'Content-Type'
|
|
60
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
61
|
+
if !content_type.nil?
|
|
62
|
+
header_params['Content-Type'] = content_type
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# form parameters
|
|
66
|
+
form_params = opts[:form_params] || {}
|
|
67
|
+
|
|
68
|
+
# http body (model)
|
|
69
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
70
|
+
|
|
71
|
+
# return_type
|
|
72
|
+
return_type = opts[:debug_return_type] || 'BundleRunResponse'
|
|
73
|
+
|
|
74
|
+
# auth_names
|
|
75
|
+
auth_names = opts[:debug_auth_names] || []
|
|
76
|
+
|
|
77
|
+
new_options = opts.merge(
|
|
78
|
+
:operation => :"DataApi.bundle_run",
|
|
79
|
+
:header_params => header_params,
|
|
80
|
+
:query_params => query_params,
|
|
81
|
+
:form_params => form_params,
|
|
82
|
+
:body => post_body,
|
|
83
|
+
:auth_names => auth_names,
|
|
84
|
+
:return_type => return_type
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
88
|
+
if @api_client.config.debugging
|
|
89
|
+
@api_client.config.logger.debug "API called: DataApi#bundle_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
90
|
+
end
|
|
91
|
+
return data, status_code, headers
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# read attributes
|
|
95
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
96
|
+
# @param body [ReadAttributesBody]
|
|
97
|
+
# @param [Hash] opts the optional parameters
|
|
98
|
+
# @return [AttributeReadResponse]
|
|
99
|
+
def data_attributes_read(tenant_id, body, opts = {})
|
|
100
|
+
data, _status_code, _headers = data_attributes_read_with_http_info(tenant_id, body, opts)
|
|
101
|
+
data
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
# read attributes
|
|
105
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
106
|
+
# @param body [ReadAttributesBody]
|
|
107
|
+
# @param [Hash] opts the optional parameters
|
|
108
|
+
# @return [Array<(AttributeReadResponse, Integer, Hash)>] AttributeReadResponse data, response status code and response headers
|
|
109
|
+
def data_attributes_read_with_http_info(tenant_id, body, opts = {})
|
|
110
|
+
if @api_client.config.debugging
|
|
111
|
+
@api_client.config.logger.debug 'Calling API: DataApi.data_attributes_read ...'
|
|
112
|
+
end
|
|
113
|
+
# verify the required parameter 'tenant_id' is set
|
|
114
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
115
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DataApi.data_attributes_read"
|
|
116
|
+
end
|
|
117
|
+
# verify the required parameter 'body' is set
|
|
118
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
119
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DataApi.data_attributes_read"
|
|
120
|
+
end
|
|
121
|
+
# resource path
|
|
122
|
+
local_var_path = '/v1/tenants/{tenant_id}/data/attributes/read'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
123
|
+
|
|
124
|
+
# query parameters
|
|
125
|
+
query_params = opts[:query_params] || {}
|
|
126
|
+
|
|
127
|
+
# header parameters
|
|
128
|
+
header_params = opts[:header_params] || {}
|
|
129
|
+
# HTTP header 'Accept' (if needed)
|
|
130
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
131
|
+
# HTTP header 'Content-Type'
|
|
132
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
133
|
+
if !content_type.nil?
|
|
134
|
+
header_params['Content-Type'] = content_type
|
|
135
|
+
end
|
|
136
|
+
|
|
137
|
+
# form parameters
|
|
138
|
+
form_params = opts[:form_params] || {}
|
|
139
|
+
|
|
140
|
+
# http body (model)
|
|
141
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
142
|
+
|
|
143
|
+
# return_type
|
|
144
|
+
return_type = opts[:debug_return_type] || 'AttributeReadResponse'
|
|
145
|
+
|
|
146
|
+
# auth_names
|
|
147
|
+
auth_names = opts[:debug_auth_names] || []
|
|
148
|
+
|
|
149
|
+
new_options = opts.merge(
|
|
150
|
+
:operation => :"DataApi.data_attributes_read",
|
|
151
|
+
:header_params => header_params,
|
|
152
|
+
:query_params => query_params,
|
|
153
|
+
:form_params => form_params,
|
|
154
|
+
:body => post_body,
|
|
155
|
+
:auth_names => auth_names,
|
|
156
|
+
:return_type => return_type
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
160
|
+
if @api_client.config.debugging
|
|
161
|
+
@api_client.config.logger.debug "API called: DataApi#data_attributes_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
162
|
+
end
|
|
163
|
+
return data, status_code, headers
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# delete data
|
|
167
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
168
|
+
# @param body [DataDeleteBody]
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @return [DataDeleteResponse]
|
|
171
|
+
def data_delete(tenant_id, body, opts = {})
|
|
172
|
+
data, _status_code, _headers = data_delete_with_http_info(tenant_id, body, opts)
|
|
173
|
+
data
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# delete data
|
|
177
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
178
|
+
# @param body [DataDeleteBody]
|
|
179
|
+
# @param [Hash] opts the optional parameters
|
|
180
|
+
# @return [Array<(DataDeleteResponse, Integer, Hash)>] DataDeleteResponse data, response status code and response headers
|
|
181
|
+
def data_delete_with_http_info(tenant_id, body, opts = {})
|
|
182
|
+
if @api_client.config.debugging
|
|
183
|
+
@api_client.config.logger.debug 'Calling API: DataApi.data_delete ...'
|
|
184
|
+
end
|
|
185
|
+
# verify the required parameter 'tenant_id' is set
|
|
186
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
187
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DataApi.data_delete"
|
|
188
|
+
end
|
|
189
|
+
# verify the required parameter 'body' is set
|
|
190
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
191
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DataApi.data_delete"
|
|
192
|
+
end
|
|
193
|
+
# resource path
|
|
194
|
+
local_var_path = '/v1/tenants/{tenant_id}/data/delete'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
195
|
+
|
|
196
|
+
# query parameters
|
|
197
|
+
query_params = opts[:query_params] || {}
|
|
198
|
+
|
|
199
|
+
# header parameters
|
|
200
|
+
header_params = opts[:header_params] || {}
|
|
201
|
+
# HTTP header 'Accept' (if needed)
|
|
202
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
203
|
+
# HTTP header 'Content-Type'
|
|
204
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
205
|
+
if !content_type.nil?
|
|
206
|
+
header_params['Content-Type'] = content_type
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
# form parameters
|
|
210
|
+
form_params = opts[:form_params] || {}
|
|
211
|
+
|
|
212
|
+
# http body (model)
|
|
213
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
214
|
+
|
|
215
|
+
# return_type
|
|
216
|
+
return_type = opts[:debug_return_type] || 'DataDeleteResponse'
|
|
217
|
+
|
|
218
|
+
# auth_names
|
|
219
|
+
auth_names = opts[:debug_auth_names] || []
|
|
220
|
+
|
|
221
|
+
new_options = opts.merge(
|
|
222
|
+
:operation => :"DataApi.data_delete",
|
|
223
|
+
:header_params => header_params,
|
|
224
|
+
:query_params => query_params,
|
|
225
|
+
:form_params => form_params,
|
|
226
|
+
:body => post_body,
|
|
227
|
+
:auth_names => auth_names,
|
|
228
|
+
:return_type => return_type
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
232
|
+
if @api_client.config.debugging
|
|
233
|
+
@api_client.config.logger.debug "API called: DataApi#data_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
234
|
+
end
|
|
235
|
+
return data, status_code, headers
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
# read relationships
|
|
239
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
240
|
+
# @param body [ReadRelationshipsBody]
|
|
241
|
+
# @param [Hash] opts the optional parameters
|
|
242
|
+
# @return [RelationshipReadResponse]
|
|
243
|
+
def data_relationships_read(tenant_id, body, opts = {})
|
|
244
|
+
data, _status_code, _headers = data_relationships_read_with_http_info(tenant_id, body, opts)
|
|
245
|
+
data
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# read relationships
|
|
249
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
250
|
+
# @param body [ReadRelationshipsBody]
|
|
251
|
+
# @param [Hash] opts the optional parameters
|
|
252
|
+
# @return [Array<(RelationshipReadResponse, Integer, Hash)>] RelationshipReadResponse data, response status code and response headers
|
|
253
|
+
def data_relationships_read_with_http_info(tenant_id, body, opts = {})
|
|
254
|
+
if @api_client.config.debugging
|
|
255
|
+
@api_client.config.logger.debug 'Calling API: DataApi.data_relationships_read ...'
|
|
256
|
+
end
|
|
257
|
+
# verify the required parameter 'tenant_id' is set
|
|
258
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
259
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DataApi.data_relationships_read"
|
|
260
|
+
end
|
|
261
|
+
# verify the required parameter 'body' is set
|
|
262
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
263
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DataApi.data_relationships_read"
|
|
264
|
+
end
|
|
265
|
+
# resource path
|
|
266
|
+
local_var_path = '/v1/tenants/{tenant_id}/data/relationships/read'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
267
|
+
|
|
268
|
+
# query parameters
|
|
269
|
+
query_params = opts[:query_params] || {}
|
|
270
|
+
|
|
271
|
+
# header parameters
|
|
272
|
+
header_params = opts[:header_params] || {}
|
|
273
|
+
# HTTP header 'Accept' (if needed)
|
|
274
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
275
|
+
# HTTP header 'Content-Type'
|
|
276
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
277
|
+
if !content_type.nil?
|
|
278
|
+
header_params['Content-Type'] = content_type
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# form parameters
|
|
282
|
+
form_params = opts[:form_params] || {}
|
|
283
|
+
|
|
284
|
+
# http body (model)
|
|
285
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
286
|
+
|
|
287
|
+
# return_type
|
|
288
|
+
return_type = opts[:debug_return_type] || 'RelationshipReadResponse'
|
|
289
|
+
|
|
290
|
+
# auth_names
|
|
291
|
+
auth_names = opts[:debug_auth_names] || []
|
|
292
|
+
|
|
293
|
+
new_options = opts.merge(
|
|
294
|
+
:operation => :"DataApi.data_relationships_read",
|
|
295
|
+
:header_params => header_params,
|
|
296
|
+
:query_params => query_params,
|
|
297
|
+
:form_params => form_params,
|
|
298
|
+
:body => post_body,
|
|
299
|
+
:auth_names => auth_names,
|
|
300
|
+
:return_type => return_type
|
|
301
|
+
)
|
|
302
|
+
|
|
303
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
304
|
+
if @api_client.config.debugging
|
|
305
|
+
@api_client.config.logger.debug "API called: DataApi#data_relationships_read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
306
|
+
end
|
|
307
|
+
return data, status_code, headers
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
# write data
|
|
311
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
312
|
+
# @param body [DataWriteBody]
|
|
313
|
+
# @param [Hash] opts the optional parameters
|
|
314
|
+
# @return [DataWriteResponse]
|
|
315
|
+
def data_write(tenant_id, body, opts = {})
|
|
316
|
+
data, _status_code, _headers = data_write_with_http_info(tenant_id, body, opts)
|
|
317
|
+
data
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
# write data
|
|
321
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
322
|
+
# @param body [DataWriteBody]
|
|
323
|
+
# @param [Hash] opts the optional parameters
|
|
324
|
+
# @return [Array<(DataWriteResponse, Integer, Hash)>] DataWriteResponse data, response status code and response headers
|
|
325
|
+
def data_write_with_http_info(tenant_id, body, opts = {})
|
|
326
|
+
if @api_client.config.debugging
|
|
327
|
+
@api_client.config.logger.debug 'Calling API: DataApi.data_write ...'
|
|
328
|
+
end
|
|
329
|
+
# verify the required parameter 'tenant_id' is set
|
|
330
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
331
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DataApi.data_write"
|
|
332
|
+
end
|
|
333
|
+
# verify the required parameter 'body' is set
|
|
334
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
335
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DataApi.data_write"
|
|
336
|
+
end
|
|
337
|
+
# resource path
|
|
338
|
+
local_var_path = '/v1/tenants/{tenant_id}/data/write'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
339
|
+
|
|
340
|
+
# query parameters
|
|
341
|
+
query_params = opts[:query_params] || {}
|
|
342
|
+
|
|
343
|
+
# header parameters
|
|
344
|
+
header_params = opts[:header_params] || {}
|
|
345
|
+
# HTTP header 'Accept' (if needed)
|
|
346
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
347
|
+
# HTTP header 'Content-Type'
|
|
348
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
349
|
+
if !content_type.nil?
|
|
350
|
+
header_params['Content-Type'] = content_type
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# form parameters
|
|
354
|
+
form_params = opts[:form_params] || {}
|
|
355
|
+
|
|
356
|
+
# http body (model)
|
|
357
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
358
|
+
|
|
359
|
+
# return_type
|
|
360
|
+
return_type = opts[:debug_return_type] || 'DataWriteResponse'
|
|
361
|
+
|
|
362
|
+
# auth_names
|
|
363
|
+
auth_names = opts[:debug_auth_names] || []
|
|
364
|
+
|
|
365
|
+
new_options = opts.merge(
|
|
366
|
+
:operation => :"DataApi.data_write",
|
|
367
|
+
:header_params => header_params,
|
|
368
|
+
:query_params => query_params,
|
|
369
|
+
:form_params => form_params,
|
|
370
|
+
:body => post_body,
|
|
371
|
+
:auth_names => auth_names,
|
|
372
|
+
:return_type => return_type
|
|
373
|
+
)
|
|
374
|
+
|
|
375
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
376
|
+
if @api_client.config.debugging
|
|
377
|
+
@api_client.config.logger.debug "API called: DataApi#data_write\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
378
|
+
end
|
|
379
|
+
return data, status_code, headers
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# delete relationships
|
|
383
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
384
|
+
# @param body [DeleteRelationshipsBody]
|
|
385
|
+
# @param [Hash] opts the optional parameters
|
|
386
|
+
# @return [RelationshipDeleteResponse]
|
|
387
|
+
def relationships_delete(tenant_id, body, opts = {})
|
|
388
|
+
data, _status_code, _headers = relationships_delete_with_http_info(tenant_id, body, opts)
|
|
389
|
+
data
|
|
390
|
+
end
|
|
391
|
+
|
|
392
|
+
# delete relationships
|
|
393
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
394
|
+
# @param body [DeleteRelationshipsBody]
|
|
395
|
+
# @param [Hash] opts the optional parameters
|
|
396
|
+
# @return [Array<(RelationshipDeleteResponse, Integer, Hash)>] RelationshipDeleteResponse data, response status code and response headers
|
|
397
|
+
def relationships_delete_with_http_info(tenant_id, body, opts = {})
|
|
398
|
+
if @api_client.config.debugging
|
|
399
|
+
@api_client.config.logger.debug 'Calling API: DataApi.relationships_delete ...'
|
|
400
|
+
end
|
|
401
|
+
# verify the required parameter 'tenant_id' is set
|
|
402
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
403
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DataApi.relationships_delete"
|
|
404
|
+
end
|
|
405
|
+
# verify the required parameter 'body' is set
|
|
406
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
407
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DataApi.relationships_delete"
|
|
408
|
+
end
|
|
409
|
+
# resource path
|
|
410
|
+
local_var_path = '/v1/tenants/{tenant_id}/relationships/delete'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
411
|
+
|
|
412
|
+
# query parameters
|
|
413
|
+
query_params = opts[:query_params] || {}
|
|
414
|
+
|
|
415
|
+
# header parameters
|
|
416
|
+
header_params = opts[:header_params] || {}
|
|
417
|
+
# HTTP header 'Accept' (if needed)
|
|
418
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
419
|
+
# HTTP header 'Content-Type'
|
|
420
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
421
|
+
if !content_type.nil?
|
|
422
|
+
header_params['Content-Type'] = content_type
|
|
423
|
+
end
|
|
424
|
+
|
|
425
|
+
# form parameters
|
|
426
|
+
form_params = opts[:form_params] || {}
|
|
427
|
+
|
|
428
|
+
# http body (model)
|
|
429
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
430
|
+
|
|
431
|
+
# return_type
|
|
432
|
+
return_type = opts[:debug_return_type] || 'RelationshipDeleteResponse'
|
|
433
|
+
|
|
434
|
+
# auth_names
|
|
435
|
+
auth_names = opts[:debug_auth_names] || []
|
|
436
|
+
|
|
437
|
+
new_options = opts.merge(
|
|
438
|
+
:operation => :"DataApi.relationships_delete",
|
|
439
|
+
:header_params => header_params,
|
|
440
|
+
:query_params => query_params,
|
|
441
|
+
:form_params => form_params,
|
|
442
|
+
:body => post_body,
|
|
443
|
+
:auth_names => auth_names,
|
|
444
|
+
:return_type => return_type
|
|
445
|
+
)
|
|
446
|
+
|
|
447
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
448
|
+
if @api_client.config.debugging
|
|
449
|
+
@api_client.config.logger.debug "API called: DataApi#relationships_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
450
|
+
end
|
|
451
|
+
return data, status_code, headers
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
# write relationships
|
|
455
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
456
|
+
# @param body [WriteRelationshipsBody]
|
|
457
|
+
# @param [Hash] opts the optional parameters
|
|
458
|
+
# @return [RelationshipWriteResponse]
|
|
459
|
+
def relationships_write(tenant_id, body, opts = {})
|
|
460
|
+
data, _status_code, _headers = relationships_write_with_http_info(tenant_id, body, opts)
|
|
461
|
+
data
|
|
462
|
+
end
|
|
463
|
+
|
|
464
|
+
# write relationships
|
|
465
|
+
# @param tenant_id [String] Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \\“[a-zA-Z0-9-,]+\\“, max 64 bytes.
|
|
466
|
+
# @param body [WriteRelationshipsBody]
|
|
467
|
+
# @param [Hash] opts the optional parameters
|
|
468
|
+
# @return [Array<(RelationshipWriteResponse, Integer, Hash)>] RelationshipWriteResponse data, response status code and response headers
|
|
469
|
+
def relationships_write_with_http_info(tenant_id, body, opts = {})
|
|
470
|
+
if @api_client.config.debugging
|
|
471
|
+
@api_client.config.logger.debug 'Calling API: DataApi.relationships_write ...'
|
|
472
|
+
end
|
|
473
|
+
# verify the required parameter 'tenant_id' is set
|
|
474
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
475
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling DataApi.relationships_write"
|
|
476
|
+
end
|
|
477
|
+
# verify the required parameter 'body' is set
|
|
478
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
479
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling DataApi.relationships_write"
|
|
480
|
+
end
|
|
481
|
+
# resource path
|
|
482
|
+
local_var_path = '/v1/tenants/{tenant_id}/relationships/write'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
483
|
+
|
|
484
|
+
# query parameters
|
|
485
|
+
query_params = opts[:query_params] || {}
|
|
486
|
+
|
|
487
|
+
# header parameters
|
|
488
|
+
header_params = opts[:header_params] || {}
|
|
489
|
+
# HTTP header 'Accept' (if needed)
|
|
490
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
491
|
+
# HTTP header 'Content-Type'
|
|
492
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
493
|
+
if !content_type.nil?
|
|
494
|
+
header_params['Content-Type'] = content_type
|
|
495
|
+
end
|
|
496
|
+
|
|
497
|
+
# form parameters
|
|
498
|
+
form_params = opts[:form_params] || {}
|
|
499
|
+
|
|
500
|
+
# http body (model)
|
|
501
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
502
|
+
|
|
503
|
+
# return_type
|
|
504
|
+
return_type = opts[:debug_return_type] || 'RelationshipWriteResponse'
|
|
505
|
+
|
|
506
|
+
# auth_names
|
|
507
|
+
auth_names = opts[:debug_auth_names] || []
|
|
508
|
+
|
|
509
|
+
new_options = opts.merge(
|
|
510
|
+
:operation => :"DataApi.relationships_write",
|
|
511
|
+
:header_params => header_params,
|
|
512
|
+
:query_params => query_params,
|
|
513
|
+
:form_params => form_params,
|
|
514
|
+
:body => post_body,
|
|
515
|
+
:auth_names => auth_names,
|
|
516
|
+
:return_type => return_type
|
|
517
|
+
)
|
|
518
|
+
|
|
519
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
520
|
+
if @api_client.config.debugging
|
|
521
|
+
@api_client.config.logger.debug "API called: DataApi#relationships_write\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
522
|
+
end
|
|
523
|
+
return data, status_code, headers
|
|
524
|
+
end
|
|
525
|
+
end
|
|
526
|
+
end
|