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,528 @@
|
|
|
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 PermissionApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# bulk check api
|
|
23
|
+
# Check multiple permissions in a single request. Maximum 100 requests allowed.
|
|
24
|
+
# @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.
|
|
25
|
+
# @param body [BulkCheckBody]
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @return [PermissionBulkCheckResponse]
|
|
28
|
+
def permissions_bulk_check(tenant_id, body, opts = {})
|
|
29
|
+
data, _status_code, _headers = permissions_bulk_check_with_http_info(tenant_id, body, opts)
|
|
30
|
+
data
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# bulk check api
|
|
34
|
+
# Check multiple permissions in a single request. Maximum 100 requests allowed.
|
|
35
|
+
# @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.
|
|
36
|
+
# @param body [BulkCheckBody]
|
|
37
|
+
# @param [Hash] opts the optional parameters
|
|
38
|
+
# @return [Array<(PermissionBulkCheckResponse, Integer, Hash)>] PermissionBulkCheckResponse data, response status code and response headers
|
|
39
|
+
def permissions_bulk_check_with_http_info(tenant_id, body, opts = {})
|
|
40
|
+
if @api_client.config.debugging
|
|
41
|
+
@api_client.config.logger.debug 'Calling API: PermissionApi.permissions_bulk_check ...'
|
|
42
|
+
end
|
|
43
|
+
# verify the required parameter 'tenant_id' is set
|
|
44
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
45
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PermissionApi.permissions_bulk_check"
|
|
46
|
+
end
|
|
47
|
+
# verify the required parameter 'body' is set
|
|
48
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
49
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PermissionApi.permissions_bulk_check"
|
|
50
|
+
end
|
|
51
|
+
# resource path
|
|
52
|
+
local_var_path = '/v1/tenants/{tenant_id}/permissions/bulk-check'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
53
|
+
|
|
54
|
+
# query parameters
|
|
55
|
+
query_params = opts[:query_params] || {}
|
|
56
|
+
|
|
57
|
+
# header parameters
|
|
58
|
+
header_params = opts[:header_params] || {}
|
|
59
|
+
# HTTP header 'Accept' (if needed)
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
61
|
+
# HTTP header 'Content-Type'
|
|
62
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
63
|
+
if !content_type.nil?
|
|
64
|
+
header_params['Content-Type'] = content_type
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# form parameters
|
|
68
|
+
form_params = opts[:form_params] || {}
|
|
69
|
+
|
|
70
|
+
# http body (model)
|
|
71
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
72
|
+
|
|
73
|
+
# return_type
|
|
74
|
+
return_type = opts[:debug_return_type] || 'PermissionBulkCheckResponse'
|
|
75
|
+
|
|
76
|
+
# auth_names
|
|
77
|
+
auth_names = opts[:debug_auth_names] || []
|
|
78
|
+
|
|
79
|
+
new_options = opts.merge(
|
|
80
|
+
:operation => :"PermissionApi.permissions_bulk_check",
|
|
81
|
+
:header_params => header_params,
|
|
82
|
+
:query_params => query_params,
|
|
83
|
+
:form_params => form_params,
|
|
84
|
+
:body => post_body,
|
|
85
|
+
:auth_names => auth_names,
|
|
86
|
+
:return_type => return_type
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
90
|
+
if @api_client.config.debugging
|
|
91
|
+
@api_client.config.logger.debug "API called: PermissionApi#permissions_bulk_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
92
|
+
end
|
|
93
|
+
return data, status_code, headers
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# check api
|
|
97
|
+
# @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.
|
|
98
|
+
# @param body [CheckBody]
|
|
99
|
+
# @param [Hash] opts the optional parameters
|
|
100
|
+
# @return [PermissionCheckResponse]
|
|
101
|
+
def permissions_check(tenant_id, body, opts = {})
|
|
102
|
+
data, _status_code, _headers = permissions_check_with_http_info(tenant_id, body, opts)
|
|
103
|
+
data
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# check api
|
|
107
|
+
# @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.
|
|
108
|
+
# @param body [CheckBody]
|
|
109
|
+
# @param [Hash] opts the optional parameters
|
|
110
|
+
# @return [Array<(PermissionCheckResponse, Integer, Hash)>] PermissionCheckResponse data, response status code and response headers
|
|
111
|
+
def permissions_check_with_http_info(tenant_id, body, opts = {})
|
|
112
|
+
if @api_client.config.debugging
|
|
113
|
+
@api_client.config.logger.debug 'Calling API: PermissionApi.permissions_check ...'
|
|
114
|
+
end
|
|
115
|
+
# verify the required parameter 'tenant_id' is set
|
|
116
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
117
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PermissionApi.permissions_check"
|
|
118
|
+
end
|
|
119
|
+
# verify the required parameter 'body' is set
|
|
120
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
121
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PermissionApi.permissions_check"
|
|
122
|
+
end
|
|
123
|
+
# resource path
|
|
124
|
+
local_var_path = '/v1/tenants/{tenant_id}/permissions/check'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
125
|
+
|
|
126
|
+
# query parameters
|
|
127
|
+
query_params = opts[:query_params] || {}
|
|
128
|
+
|
|
129
|
+
# header parameters
|
|
130
|
+
header_params = opts[:header_params] || {}
|
|
131
|
+
# HTTP header 'Accept' (if needed)
|
|
132
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
133
|
+
# HTTP header 'Content-Type'
|
|
134
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
135
|
+
if !content_type.nil?
|
|
136
|
+
header_params['Content-Type'] = content_type
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# form parameters
|
|
140
|
+
form_params = opts[:form_params] || {}
|
|
141
|
+
|
|
142
|
+
# http body (model)
|
|
143
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
144
|
+
|
|
145
|
+
# return_type
|
|
146
|
+
return_type = opts[:debug_return_type] || 'PermissionCheckResponse'
|
|
147
|
+
|
|
148
|
+
# auth_names
|
|
149
|
+
auth_names = opts[:debug_auth_names] || []
|
|
150
|
+
|
|
151
|
+
new_options = opts.merge(
|
|
152
|
+
:operation => :"PermissionApi.permissions_check",
|
|
153
|
+
:header_params => header_params,
|
|
154
|
+
:query_params => query_params,
|
|
155
|
+
:form_params => form_params,
|
|
156
|
+
:body => post_body,
|
|
157
|
+
:auth_names => auth_names,
|
|
158
|
+
:return_type => return_type
|
|
159
|
+
)
|
|
160
|
+
|
|
161
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
162
|
+
if @api_client.config.debugging
|
|
163
|
+
@api_client.config.logger.debug "API called: PermissionApi#permissions_check\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
164
|
+
end
|
|
165
|
+
return data, status_code, headers
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
# expand api
|
|
169
|
+
# @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.
|
|
170
|
+
# @param body [PermissionExpandBody]
|
|
171
|
+
# @param [Hash] opts the optional parameters
|
|
172
|
+
# @return [PermissionExpandResponse]
|
|
173
|
+
def permissions_expand(tenant_id, body, opts = {})
|
|
174
|
+
data, _status_code, _headers = permissions_expand_with_http_info(tenant_id, body, opts)
|
|
175
|
+
data
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# expand api
|
|
179
|
+
# @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.
|
|
180
|
+
# @param body [PermissionExpandBody]
|
|
181
|
+
# @param [Hash] opts the optional parameters
|
|
182
|
+
# @return [Array<(PermissionExpandResponse, Integer, Hash)>] PermissionExpandResponse data, response status code and response headers
|
|
183
|
+
def permissions_expand_with_http_info(tenant_id, body, opts = {})
|
|
184
|
+
if @api_client.config.debugging
|
|
185
|
+
@api_client.config.logger.debug 'Calling API: PermissionApi.permissions_expand ...'
|
|
186
|
+
end
|
|
187
|
+
# verify the required parameter 'tenant_id' is set
|
|
188
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
189
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PermissionApi.permissions_expand"
|
|
190
|
+
end
|
|
191
|
+
# verify the required parameter 'body' is set
|
|
192
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
193
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PermissionApi.permissions_expand"
|
|
194
|
+
end
|
|
195
|
+
# resource path
|
|
196
|
+
local_var_path = '/v1/tenants/{tenant_id}/permissions/expand'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
197
|
+
|
|
198
|
+
# query parameters
|
|
199
|
+
query_params = opts[:query_params] || {}
|
|
200
|
+
|
|
201
|
+
# header parameters
|
|
202
|
+
header_params = opts[:header_params] || {}
|
|
203
|
+
# HTTP header 'Accept' (if needed)
|
|
204
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
205
|
+
# HTTP header 'Content-Type'
|
|
206
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
207
|
+
if !content_type.nil?
|
|
208
|
+
header_params['Content-Type'] = content_type
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# form parameters
|
|
212
|
+
form_params = opts[:form_params] || {}
|
|
213
|
+
|
|
214
|
+
# http body (model)
|
|
215
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
216
|
+
|
|
217
|
+
# return_type
|
|
218
|
+
return_type = opts[:debug_return_type] || 'PermissionExpandResponse'
|
|
219
|
+
|
|
220
|
+
# auth_names
|
|
221
|
+
auth_names = opts[:debug_auth_names] || []
|
|
222
|
+
|
|
223
|
+
new_options = opts.merge(
|
|
224
|
+
:operation => :"PermissionApi.permissions_expand",
|
|
225
|
+
:header_params => header_params,
|
|
226
|
+
:query_params => query_params,
|
|
227
|
+
:form_params => form_params,
|
|
228
|
+
:body => post_body,
|
|
229
|
+
:auth_names => auth_names,
|
|
230
|
+
:return_type => return_type
|
|
231
|
+
)
|
|
232
|
+
|
|
233
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
234
|
+
if @api_client.config.debugging
|
|
235
|
+
@api_client.config.logger.debug "API called: PermissionApi#permissions_expand\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
236
|
+
end
|
|
237
|
+
return data, status_code, headers
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# lookup entity
|
|
241
|
+
# @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.
|
|
242
|
+
# @param body [LookupEntityBody]
|
|
243
|
+
# @param [Hash] opts the optional parameters
|
|
244
|
+
# @return [PermissionLookupEntityResponse]
|
|
245
|
+
def permissions_lookup_entity(tenant_id, body, opts = {})
|
|
246
|
+
data, _status_code, _headers = permissions_lookup_entity_with_http_info(tenant_id, body, opts)
|
|
247
|
+
data
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
# lookup entity
|
|
251
|
+
# @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.
|
|
252
|
+
# @param body [LookupEntityBody]
|
|
253
|
+
# @param [Hash] opts the optional parameters
|
|
254
|
+
# @return [Array<(PermissionLookupEntityResponse, Integer, Hash)>] PermissionLookupEntityResponse data, response status code and response headers
|
|
255
|
+
def permissions_lookup_entity_with_http_info(tenant_id, body, opts = {})
|
|
256
|
+
if @api_client.config.debugging
|
|
257
|
+
@api_client.config.logger.debug 'Calling API: PermissionApi.permissions_lookup_entity ...'
|
|
258
|
+
end
|
|
259
|
+
# verify the required parameter 'tenant_id' is set
|
|
260
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
261
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PermissionApi.permissions_lookup_entity"
|
|
262
|
+
end
|
|
263
|
+
# verify the required parameter 'body' is set
|
|
264
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
265
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PermissionApi.permissions_lookup_entity"
|
|
266
|
+
end
|
|
267
|
+
# resource path
|
|
268
|
+
local_var_path = '/v1/tenants/{tenant_id}/permissions/lookup-entity'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
269
|
+
|
|
270
|
+
# query parameters
|
|
271
|
+
query_params = opts[:query_params] || {}
|
|
272
|
+
|
|
273
|
+
# header parameters
|
|
274
|
+
header_params = opts[:header_params] || {}
|
|
275
|
+
# HTTP header 'Accept' (if needed)
|
|
276
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
277
|
+
# HTTP header 'Content-Type'
|
|
278
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
279
|
+
if !content_type.nil?
|
|
280
|
+
header_params['Content-Type'] = content_type
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
# form parameters
|
|
284
|
+
form_params = opts[:form_params] || {}
|
|
285
|
+
|
|
286
|
+
# http body (model)
|
|
287
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
288
|
+
|
|
289
|
+
# return_type
|
|
290
|
+
return_type = opts[:debug_return_type] || 'PermissionLookupEntityResponse'
|
|
291
|
+
|
|
292
|
+
# auth_names
|
|
293
|
+
auth_names = opts[:debug_auth_names] || []
|
|
294
|
+
|
|
295
|
+
new_options = opts.merge(
|
|
296
|
+
:operation => :"PermissionApi.permissions_lookup_entity",
|
|
297
|
+
:header_params => header_params,
|
|
298
|
+
:query_params => query_params,
|
|
299
|
+
:form_params => form_params,
|
|
300
|
+
:body => post_body,
|
|
301
|
+
:auth_names => auth_names,
|
|
302
|
+
:return_type => return_type
|
|
303
|
+
)
|
|
304
|
+
|
|
305
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
306
|
+
if @api_client.config.debugging
|
|
307
|
+
@api_client.config.logger.debug "API called: PermissionApi#permissions_lookup_entity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
308
|
+
end
|
|
309
|
+
return data, status_code, headers
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# lookup entity stream
|
|
313
|
+
# @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.
|
|
314
|
+
# @param body [LookupEntityStreamBody]
|
|
315
|
+
# @param [Hash] opts the optional parameters
|
|
316
|
+
# @return [StreamResultOfPermissionLookupEntityStreamResponse]
|
|
317
|
+
def permissions_lookup_entity_stream(tenant_id, body, opts = {})
|
|
318
|
+
data, _status_code, _headers = permissions_lookup_entity_stream_with_http_info(tenant_id, body, opts)
|
|
319
|
+
data
|
|
320
|
+
end
|
|
321
|
+
|
|
322
|
+
# lookup entity stream
|
|
323
|
+
# @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.
|
|
324
|
+
# @param body [LookupEntityStreamBody]
|
|
325
|
+
# @param [Hash] opts the optional parameters
|
|
326
|
+
# @return [Array<(StreamResultOfPermissionLookupEntityStreamResponse, Integer, Hash)>] StreamResultOfPermissionLookupEntityStreamResponse data, response status code and response headers
|
|
327
|
+
def permissions_lookup_entity_stream_with_http_info(tenant_id, body, opts = {})
|
|
328
|
+
if @api_client.config.debugging
|
|
329
|
+
@api_client.config.logger.debug 'Calling API: PermissionApi.permissions_lookup_entity_stream ...'
|
|
330
|
+
end
|
|
331
|
+
# verify the required parameter 'tenant_id' is set
|
|
332
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
333
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PermissionApi.permissions_lookup_entity_stream"
|
|
334
|
+
end
|
|
335
|
+
# verify the required parameter 'body' is set
|
|
336
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
337
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PermissionApi.permissions_lookup_entity_stream"
|
|
338
|
+
end
|
|
339
|
+
# resource path
|
|
340
|
+
local_var_path = '/v1/tenants/{tenant_id}/permissions/lookup-entity-stream'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
341
|
+
|
|
342
|
+
# query parameters
|
|
343
|
+
query_params = opts[:query_params] || {}
|
|
344
|
+
|
|
345
|
+
# header parameters
|
|
346
|
+
header_params = opts[:header_params] || {}
|
|
347
|
+
# HTTP header 'Accept' (if needed)
|
|
348
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
349
|
+
# HTTP header 'Content-Type'
|
|
350
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
351
|
+
if !content_type.nil?
|
|
352
|
+
header_params['Content-Type'] = content_type
|
|
353
|
+
end
|
|
354
|
+
|
|
355
|
+
# form parameters
|
|
356
|
+
form_params = opts[:form_params] || {}
|
|
357
|
+
|
|
358
|
+
# http body (model)
|
|
359
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
360
|
+
|
|
361
|
+
# return_type
|
|
362
|
+
return_type = opts[:debug_return_type] || 'StreamResultOfPermissionLookupEntityStreamResponse'
|
|
363
|
+
|
|
364
|
+
# auth_names
|
|
365
|
+
auth_names = opts[:debug_auth_names] || []
|
|
366
|
+
|
|
367
|
+
new_options = opts.merge(
|
|
368
|
+
:operation => :"PermissionApi.permissions_lookup_entity_stream",
|
|
369
|
+
:header_params => header_params,
|
|
370
|
+
:query_params => query_params,
|
|
371
|
+
:form_params => form_params,
|
|
372
|
+
:body => post_body,
|
|
373
|
+
:auth_names => auth_names,
|
|
374
|
+
:return_type => return_type
|
|
375
|
+
)
|
|
376
|
+
|
|
377
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
378
|
+
if @api_client.config.debugging
|
|
379
|
+
@api_client.config.logger.debug "API called: PermissionApi#permissions_lookup_entity_stream\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
380
|
+
end
|
|
381
|
+
return data, status_code, headers
|
|
382
|
+
end
|
|
383
|
+
|
|
384
|
+
# lookup-subject
|
|
385
|
+
# @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.
|
|
386
|
+
# @param body [LookupSubjectBody]
|
|
387
|
+
# @param [Hash] opts the optional parameters
|
|
388
|
+
# @return [PermissionLookupSubjectResponse]
|
|
389
|
+
def permissions_lookup_subject(tenant_id, body, opts = {})
|
|
390
|
+
data, _status_code, _headers = permissions_lookup_subject_with_http_info(tenant_id, body, opts)
|
|
391
|
+
data
|
|
392
|
+
end
|
|
393
|
+
|
|
394
|
+
# lookup-subject
|
|
395
|
+
# @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.
|
|
396
|
+
# @param body [LookupSubjectBody]
|
|
397
|
+
# @param [Hash] opts the optional parameters
|
|
398
|
+
# @return [Array<(PermissionLookupSubjectResponse, Integer, Hash)>] PermissionLookupSubjectResponse data, response status code and response headers
|
|
399
|
+
def permissions_lookup_subject_with_http_info(tenant_id, body, opts = {})
|
|
400
|
+
if @api_client.config.debugging
|
|
401
|
+
@api_client.config.logger.debug 'Calling API: PermissionApi.permissions_lookup_subject ...'
|
|
402
|
+
end
|
|
403
|
+
# verify the required parameter 'tenant_id' is set
|
|
404
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
405
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PermissionApi.permissions_lookup_subject"
|
|
406
|
+
end
|
|
407
|
+
# verify the required parameter 'body' is set
|
|
408
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
409
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PermissionApi.permissions_lookup_subject"
|
|
410
|
+
end
|
|
411
|
+
# resource path
|
|
412
|
+
local_var_path = '/v1/tenants/{tenant_id}/permissions/lookup-subject'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
413
|
+
|
|
414
|
+
# query parameters
|
|
415
|
+
query_params = opts[:query_params] || {}
|
|
416
|
+
|
|
417
|
+
# header parameters
|
|
418
|
+
header_params = opts[:header_params] || {}
|
|
419
|
+
# HTTP header 'Accept' (if needed)
|
|
420
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
421
|
+
# HTTP header 'Content-Type'
|
|
422
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
423
|
+
if !content_type.nil?
|
|
424
|
+
header_params['Content-Type'] = content_type
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
# form parameters
|
|
428
|
+
form_params = opts[:form_params] || {}
|
|
429
|
+
|
|
430
|
+
# http body (model)
|
|
431
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
432
|
+
|
|
433
|
+
# return_type
|
|
434
|
+
return_type = opts[:debug_return_type] || 'PermissionLookupSubjectResponse'
|
|
435
|
+
|
|
436
|
+
# auth_names
|
|
437
|
+
auth_names = opts[:debug_auth_names] || []
|
|
438
|
+
|
|
439
|
+
new_options = opts.merge(
|
|
440
|
+
:operation => :"PermissionApi.permissions_lookup_subject",
|
|
441
|
+
:header_params => header_params,
|
|
442
|
+
:query_params => query_params,
|
|
443
|
+
:form_params => form_params,
|
|
444
|
+
:body => post_body,
|
|
445
|
+
:auth_names => auth_names,
|
|
446
|
+
:return_type => return_type
|
|
447
|
+
)
|
|
448
|
+
|
|
449
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
450
|
+
if @api_client.config.debugging
|
|
451
|
+
@api_client.config.logger.debug "API called: PermissionApi#permissions_lookup_subject\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
452
|
+
end
|
|
453
|
+
return data, status_code, headers
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# subject permission
|
|
457
|
+
# @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.
|
|
458
|
+
# @param body [SubjectPermissionBody]
|
|
459
|
+
# @param [Hash] opts the optional parameters
|
|
460
|
+
# @return [PermissionSubjectPermissionResponse]
|
|
461
|
+
def permissions_subject_permission(tenant_id, body, opts = {})
|
|
462
|
+
data, _status_code, _headers = permissions_subject_permission_with_http_info(tenant_id, body, opts)
|
|
463
|
+
data
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# subject permission
|
|
467
|
+
# @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.
|
|
468
|
+
# @param body [SubjectPermissionBody]
|
|
469
|
+
# @param [Hash] opts the optional parameters
|
|
470
|
+
# @return [Array<(PermissionSubjectPermissionResponse, Integer, Hash)>] PermissionSubjectPermissionResponse data, response status code and response headers
|
|
471
|
+
def permissions_subject_permission_with_http_info(tenant_id, body, opts = {})
|
|
472
|
+
if @api_client.config.debugging
|
|
473
|
+
@api_client.config.logger.debug 'Calling API: PermissionApi.permissions_subject_permission ...'
|
|
474
|
+
end
|
|
475
|
+
# verify the required parameter 'tenant_id' is set
|
|
476
|
+
if @api_client.config.client_side_validation && tenant_id.nil?
|
|
477
|
+
fail ArgumentError, "Missing the required parameter 'tenant_id' when calling PermissionApi.permissions_subject_permission"
|
|
478
|
+
end
|
|
479
|
+
# verify the required parameter 'body' is set
|
|
480
|
+
if @api_client.config.client_side_validation && body.nil?
|
|
481
|
+
fail ArgumentError, "Missing the required parameter 'body' when calling PermissionApi.permissions_subject_permission"
|
|
482
|
+
end
|
|
483
|
+
# resource path
|
|
484
|
+
local_var_path = '/v1/tenants/{tenant_id}/permissions/subject-permission'.sub('{' + 'tenant_id' + '}', CGI.escape(tenant_id.to_s))
|
|
485
|
+
|
|
486
|
+
# query parameters
|
|
487
|
+
query_params = opts[:query_params] || {}
|
|
488
|
+
|
|
489
|
+
# header parameters
|
|
490
|
+
header_params = opts[:header_params] || {}
|
|
491
|
+
# HTTP header 'Accept' (if needed)
|
|
492
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
493
|
+
# HTTP header 'Content-Type'
|
|
494
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
495
|
+
if !content_type.nil?
|
|
496
|
+
header_params['Content-Type'] = content_type
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# form parameters
|
|
500
|
+
form_params = opts[:form_params] || {}
|
|
501
|
+
|
|
502
|
+
# http body (model)
|
|
503
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
|
|
504
|
+
|
|
505
|
+
# return_type
|
|
506
|
+
return_type = opts[:debug_return_type] || 'PermissionSubjectPermissionResponse'
|
|
507
|
+
|
|
508
|
+
# auth_names
|
|
509
|
+
auth_names = opts[:debug_auth_names] || []
|
|
510
|
+
|
|
511
|
+
new_options = opts.merge(
|
|
512
|
+
:operation => :"PermissionApi.permissions_subject_permission",
|
|
513
|
+
:header_params => header_params,
|
|
514
|
+
:query_params => query_params,
|
|
515
|
+
:form_params => form_params,
|
|
516
|
+
:body => post_body,
|
|
517
|
+
:auth_names => auth_names,
|
|
518
|
+
:return_type => return_type
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
522
|
+
if @api_client.config.debugging
|
|
523
|
+
@api_client.config.logger.debug "API called: PermissionApi#permissions_subject_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
524
|
+
end
|
|
525
|
+
return data, status_code, headers
|
|
526
|
+
end
|
|
527
|
+
end
|
|
528
|
+
end
|