keynetra-client 0.1.1
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 +7 -0
- data/Gemfile +9 -0
- data/README.md +49 -0
- data/Rakefile +10 -0
- data/docs/ACLCreate.md +28 -0
- data/docs/ACLOut.md +34 -0
- data/docs/AccessApi.md +234 -0
- data/docs/AccessDecisionResponse.md +30 -0
- data/docs/AccessRequest.md +28 -0
- data/docs/AdminLoginRequest.md +20 -0
- data/docs/AdminLoginResponse.md +26 -0
- data/docs/AuditRecordOut.md +42 -0
- data/docs/AuthApi.md +133 -0
- data/docs/AuthModelCreate.md +18 -0
- data/docs/AuthModelOut.md +26 -0
- data/docs/BatchAccessItem.md +20 -0
- data/docs/BatchAccessRequest.md +24 -0
- data/docs/BatchAccessResponse.md +20 -0
- data/docs/BatchAccessResult.md +22 -0
- data/docs/DataValue.md +15 -0
- data/docs/DevApi.md +132 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HealthApi.md +187 -0
- data/docs/ImpactAnalysisRequest.md +18 -0
- data/docs/ImpactAnalysisResponse.md +20 -0
- data/docs/LocationInner.md +15 -0
- data/docs/ManagementApi.md +2096 -0
- data/docs/MetaBody.md +24 -0
- data/docs/PermissionCreate.md +18 -0
- data/docs/PermissionOut.md +20 -0
- data/docs/PermissionUpdate.md +18 -0
- data/docs/PlaygroundApi.md +80 -0
- data/docs/PlaygroundEvaluateRequest.md +20 -0
- data/docs/PlaygroundInput.md +24 -0
- data/docs/PlaygroundPolicy.md +26 -0
- data/docs/PolicyCreate.md +26 -0
- data/docs/PolicyOut.md +28 -0
- data/docs/PolicySimulationInput.md +22 -0
- data/docs/PolicySimulationRequest.md +20 -0
- data/docs/PolicySimulationResponse.md +20 -0
- data/docs/RelationshipCreate.md +26 -0
- data/docs/RelationshipOut.md +28 -0
- data/docs/RoleCreate.md +18 -0
- data/docs/RoleOut.md +20 -0
- data/docs/RoleUpdate.md +18 -0
- data/docs/SimulationResponse.md +30 -0
- data/docs/SuccessResponseACLOut.md +22 -0
- data/docs/SuccessResponseAccessDecisionResponse.md +22 -0
- data/docs/SuccessResponseAdminLoginResponse.md +22 -0
- data/docs/SuccessResponseAuthModelOut.md +22 -0
- data/docs/SuccessResponseBatchAccessResponse.md +22 -0
- data/docs/SuccessResponseDictStrAny.md +22 -0
- data/docs/SuccessResponseDictStrInt.md +22 -0
- data/docs/SuccessResponseDictStrObject.md +22 -0
- data/docs/SuccessResponseDictStrStr.md +22 -0
- data/docs/SuccessResponseDictStrUnionIntStr.md +22 -0
- data/docs/SuccessResponseImpactAnalysisResponse.md +22 -0
- data/docs/SuccessResponseListACLOut.md +22 -0
- data/docs/SuccessResponseListAuditRecordOut.md +22 -0
- data/docs/SuccessResponseListDictStrStr.md +22 -0
- data/docs/SuccessResponseListPermissionOut.md +22 -0
- data/docs/SuccessResponseListPolicyOut.md +22 -0
- data/docs/SuccessResponseListRoleOut.md +22 -0
- data/docs/SuccessResponsePermissionOut.md +22 -0
- data/docs/SuccessResponsePolicyOut.md +22 -0
- data/docs/SuccessResponsePolicySimulationResponse.md +22 -0
- data/docs/SuccessResponseRelationshipOut.md +22 -0
- data/docs/SuccessResponseSimulationResponse.md +22 -0
- data/docs/ValidationError.md +26 -0
- data/git_push.sh +57 -0
- data/keynetra-client.gemspec +39 -0
- data/lib/keynetra-client/api/access_api.rb +226 -0
- data/lib/keynetra-client/api/auth_api.rb +154 -0
- data/lib/keynetra-client/api/dev_api.rb +135 -0
- data/lib/keynetra-client/api/health_api.rb +187 -0
- data/lib/keynetra-client/api/management_api.rb +1851 -0
- data/lib/keynetra-client/api/playground_api.rb +88 -0
- data/lib/keynetra-client/api_client.rb +397 -0
- data/lib/keynetra-client/api_error.rb +58 -0
- data/lib/keynetra-client/api_model_base.rb +88 -0
- data/lib/keynetra-client/configuration.rb +315 -0
- data/lib/keynetra-client/models/access_decision_response.rb +242 -0
- data/lib/keynetra-client/models/access_request.rb +219 -0
- data/lib/keynetra-client/models/acl_create.rb +294 -0
- data/lib/keynetra-client/models/acl_out.rb +356 -0
- data/lib/keynetra-client/models/admin_login_request.rb +190 -0
- data/lib/keynetra-client/models/admin_login_response.rb +238 -0
- data/lib/keynetra-client/models/audit_record_out.rb +454 -0
- data/lib/keynetra-client/models/auth_model_create.rb +164 -0
- data/lib/keynetra-client/models/auth_model_out.rb +272 -0
- data/lib/keynetra-client/models/batch_access_item.rb +175 -0
- data/lib/keynetra-client/models/batch_access_request.rb +198 -0
- data/lib/keynetra-client/models/batch_access_response.rb +176 -0
- data/lib/keynetra-client/models/batch_access_result.rb +200 -0
- data/lib/keynetra-client/models/data_value.rb +103 -0
- data/lib/keynetra-client/models/http_validation_error.rb +149 -0
- data/lib/keynetra-client/models/impact_analysis_request.rb +164 -0
- data/lib/keynetra-client/models/impact_analysis_response.rb +160 -0
- data/lib/keynetra-client/models/location_inner.rb +103 -0
- data/lib/keynetra-client/models/meta_body.rb +179 -0
- data/lib/keynetra-client/models/permission_create.rb +164 -0
- data/lib/keynetra-client/models/permission_out.rb +190 -0
- data/lib/keynetra-client/models/permission_update.rb +164 -0
- data/lib/keynetra-client/models/playground_evaluate_request.rb +192 -0
- data/lib/keynetra-client/models/playground_input.rb +182 -0
- data/lib/keynetra-client/models/playground_policy.rb +207 -0
- data/lib/keynetra-client/models/policy_create.rb +208 -0
- data/lib/keynetra-client/models/policy_out.rb +281 -0
- data/lib/keynetra-client/models/policy_simulation_input.rb +172 -0
- data/lib/keynetra-client/models/policy_simulation_request.rb +158 -0
- data/lib/keynetra-client/models/policy_simulation_response.rb +194 -0
- data/lib/keynetra-client/models/relationship_create.rb +268 -0
- data/lib/keynetra-client/models/relationship_out.rb +294 -0
- data/lib/keynetra-client/models/role_create.rb +164 -0
- data/lib/keynetra-client/models/role_out.rb +190 -0
- data/lib/keynetra-client/models/role_update.rb +164 -0
- data/lib/keynetra-client/models/simulation_response.rb +244 -0
- data/lib/keynetra-client/models/success_response_access_decision_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_acl_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_admin_login_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_auth_model_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_batch_access_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_dict_str_any.rb +184 -0
- data/lib/keynetra-client/models/success_response_dict_str_int.rb +184 -0
- data/lib/keynetra-client/models/success_response_dict_str_object.rb +184 -0
- data/lib/keynetra-client/models/success_response_dict_str_str.rb +184 -0
- data/lib/keynetra-client/models/success_response_dict_str_union_int_str.rb +184 -0
- data/lib/keynetra-client/models/success_response_impact_analysis_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_list_acl_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_audit_record_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_dict_str_str.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_permission_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_policy_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_list_role_out.rb +184 -0
- data/lib/keynetra-client/models/success_response_permission_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_policy_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_policy_simulation_response.rb +182 -0
- data/lib/keynetra-client/models/success_response_relationship_out.rb +182 -0
- data/lib/keynetra-client/models/success_response_simulation_response.rb +182 -0
- data/lib/keynetra-client/models/validation_error.rb +237 -0
- data/lib/keynetra-client/version.rb +15 -0
- data/lib/keynetra-client.rb +105 -0
- data/spec/api/access_api_spec.rb +70 -0
- data/spec/api/auth_api_spec.rb +57 -0
- data/spec/api/dev_api_spec.rb +56 -0
- data/spec/api/health_api_spec.rb +65 -0
- data/spec/api/management_api_spec.rb +361 -0
- data/spec/api/playground_api_spec.rb +46 -0
- data/spec/models/access_decision_response_spec.rb +72 -0
- data/spec/models/access_request_spec.rb +66 -0
- data/spec/models/acl_create_spec.rb +66 -0
- data/spec/models/acl_out_spec.rb +84 -0
- data/spec/models/admin_login_request_spec.rb +42 -0
- data/spec/models/admin_login_response_spec.rb +60 -0
- data/spec/models/audit_record_out_spec.rb +108 -0
- data/spec/models/auth_model_create_spec.rb +36 -0
- data/spec/models/auth_model_out_spec.rb +60 -0
- data/spec/models/batch_access_item_spec.rb +42 -0
- data/spec/models/batch_access_request_spec.rb +54 -0
- data/spec/models/batch_access_response_spec.rb +42 -0
- data/spec/models/batch_access_result_spec.rb +48 -0
- data/spec/models/data_value_spec.rb +21 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/impact_analysis_request_spec.rb +36 -0
- data/spec/models/impact_analysis_response_spec.rb +42 -0
- data/spec/models/location_inner_spec.rb +21 -0
- data/spec/models/meta_body_spec.rb +54 -0
- data/spec/models/permission_create_spec.rb +36 -0
- data/spec/models/permission_out_spec.rb +42 -0
- data/spec/models/permission_update_spec.rb +36 -0
- data/spec/models/playground_evaluate_request_spec.rb +42 -0
- data/spec/models/playground_input_spec.rb +54 -0
- data/spec/models/playground_policy_spec.rb +60 -0
- data/spec/models/policy_create_spec.rb +60 -0
- data/spec/models/policy_out_spec.rb +66 -0
- data/spec/models/policy_simulation_input_spec.rb +48 -0
- data/spec/models/policy_simulation_request_spec.rb +42 -0
- data/spec/models/policy_simulation_response_spec.rb +42 -0
- data/spec/models/relationship_create_spec.rb +60 -0
- data/spec/models/relationship_out_spec.rb +66 -0
- data/spec/models/role_create_spec.rb +36 -0
- data/spec/models/role_out_spec.rb +42 -0
- data/spec/models/role_update_spec.rb +36 -0
- data/spec/models/simulation_response_spec.rb +72 -0
- data/spec/models/success_response_access_decision_response_spec.rb +48 -0
- data/spec/models/success_response_acl_out_spec.rb +48 -0
- data/spec/models/success_response_admin_login_response_spec.rb +48 -0
- data/spec/models/success_response_auth_model_out_spec.rb +48 -0
- data/spec/models/success_response_batch_access_response_spec.rb +48 -0
- data/spec/models/success_response_dict_str_any_spec.rb +48 -0
- data/spec/models/success_response_dict_str_int_spec.rb +48 -0
- data/spec/models/success_response_dict_str_object_spec.rb +48 -0
- data/spec/models/success_response_dict_str_str_spec.rb +48 -0
- data/spec/models/success_response_dict_str_union_int_str_spec.rb +48 -0
- data/spec/models/success_response_impact_analysis_response_spec.rb +48 -0
- data/spec/models/success_response_list_acl_out_spec.rb +48 -0
- data/spec/models/success_response_list_audit_record_out_spec.rb +48 -0
- data/spec/models/success_response_list_dict_str_str_spec.rb +48 -0
- data/spec/models/success_response_list_permission_out_spec.rb +48 -0
- data/spec/models/success_response_list_policy_out_spec.rb +48 -0
- data/spec/models/success_response_list_role_out_spec.rb +48 -0
- data/spec/models/success_response_permission_out_spec.rb +48 -0
- data/spec/models/success_response_policy_out_spec.rb +48 -0
- data/spec/models/success_response_policy_simulation_response_spec.rb +48 -0
- data/spec/models/success_response_relationship_out_spec.rb +48 -0
- data/spec/models/success_response_simulation_response_spec.rb +48 -0
- data/spec/models/validation_error_spec.rb +60 -0
- data/spec/spec_helper.rb +111 -0
- metadata +356 -0
|
@@ -0,0 +1,2096 @@
|
|
|
1
|
+
# KeyNetra::ManagementApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *http://localhost*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**add_permission_to_role_roles_role_id_permissions_permission_id_post**](ManagementApi.md#add_permission_to_role_roles_role_id_permissions_permission_id_post) | **POST** /roles/{role_id}/permissions/{permission_id} | Add Permission To Role |
|
|
8
|
+
| [**create_acl_entry_acl_post**](ManagementApi.md#create_acl_entry_acl_post) | **POST** /acl | Create Acl Entry |
|
|
9
|
+
| [**create_auth_model_auth_model_post**](ManagementApi.md#create_auth_model_auth_model_post) | **POST** /auth-model | Create Auth Model |
|
|
10
|
+
| [**create_permission_permissions_post**](ManagementApi.md#create_permission_permissions_post) | **POST** /permissions | Create Permission |
|
|
11
|
+
| [**create_policy_from_dsl_policies_dsl_post**](ManagementApi.md#create_policy_from_dsl_policies_dsl_post) | **POST** /policies/dsl | Create Policy From Dsl |
|
|
12
|
+
| [**create_policy_policies_post**](ManagementApi.md#create_policy_policies_post) | **POST** /policies | Create Policy |
|
|
13
|
+
| [**create_relationship_relationships_post**](ManagementApi.md#create_relationship_relationships_post) | **POST** /relationships | Create Relationship |
|
|
14
|
+
| [**create_role_roles_post**](ManagementApi.md#create_role_roles_post) | **POST** /roles | Create Role |
|
|
15
|
+
| [**delete_acl_entry_acl_acl_id_delete**](ManagementApi.md#delete_acl_entry_acl_acl_id_delete) | **DELETE** /acl/{acl_id} | Delete Acl Entry |
|
|
16
|
+
| [**delete_permission_permissions_permission_id_delete**](ManagementApi.md#delete_permission_permissions_permission_id_delete) | **DELETE** /permissions/{permission_id} | Delete Permission |
|
|
17
|
+
| [**delete_policy_policies_policy_key_delete**](ManagementApi.md#delete_policy_policies_policy_key_delete) | **DELETE** /policies/{policy_key} | Delete Policy |
|
|
18
|
+
| [**delete_role_roles_role_id_delete**](ManagementApi.md#delete_role_roles_role_id_delete) | **DELETE** /roles/{role_id} | Delete Role |
|
|
19
|
+
| [**get_auth_model_auth_model_get**](ManagementApi.md#get_auth_model_auth_model_get) | **GET** /auth-model | Get Auth Model |
|
|
20
|
+
| [**impact_analysis_impact_analysis_post**](ManagementApi.md#impact_analysis_impact_analysis_post) | **POST** /impact-analysis | Impact Analysis |
|
|
21
|
+
| [**list_acl_entries_acl_resource_type_resource_id_get**](ManagementApi.md#list_acl_entries_acl_resource_type_resource_id_get) | **GET** /acl/{resource_type}/{resource_id} | List Acl Entries |
|
|
22
|
+
| [**list_audit_logs_audit_get**](ManagementApi.md#list_audit_logs_audit_get) | **GET** /audit | List Audit Logs |
|
|
23
|
+
| [**list_permission_roles_permissions_permission_id_roles_get**](ManagementApi.md#list_permission_roles_permissions_permission_id_roles_get) | **GET** /permissions/{permission_id}/roles | List Permission Roles |
|
|
24
|
+
| [**list_permissions_permissions_get**](ManagementApi.md#list_permissions_permissions_get) | **GET** /permissions | List Permissions |
|
|
25
|
+
| [**list_policies_policies_get**](ManagementApi.md#list_policies_policies_get) | **GET** /policies | List Policies |
|
|
26
|
+
| [**list_relationships_relationships_get**](ManagementApi.md#list_relationships_relationships_get) | **GET** /relationships | List Relationships |
|
|
27
|
+
| [**list_role_permissions_roles_role_id_permissions_get**](ManagementApi.md#list_role_permissions_roles_role_id_permissions_get) | **GET** /roles/{role_id}/permissions | List Role Permissions |
|
|
28
|
+
| [**list_roles_roles_get**](ManagementApi.md#list_roles_roles_get) | **GET** /roles | List Roles |
|
|
29
|
+
| [**remove_permission_from_role_roles_role_id_permissions_permission_id_delete**](ManagementApi.md#remove_permission_from_role_roles_role_id_permissions_permission_id_delete) | **DELETE** /roles/{role_id}/permissions/{permission_id} | Remove Permission From Role |
|
|
30
|
+
| [**rollback_policy_policies_policy_key_rollback_version_post**](ManagementApi.md#rollback_policy_policies_policy_key_rollback_version_post) | **POST** /policies/{policy_key}/rollback/{version} | Rollback Policy |
|
|
31
|
+
| [**simulate_policy_simulate_policy_post**](ManagementApi.md#simulate_policy_simulate_policy_post) | **POST** /simulate-policy | Simulate Policy |
|
|
32
|
+
| [**update_permission_permissions_permission_id_put**](ManagementApi.md#update_permission_permissions_permission_id_put) | **PUT** /permissions/{permission_id} | Update Permission |
|
|
33
|
+
| [**update_policy_policies_policy_key_put**](ManagementApi.md#update_policy_policies_policy_key_put) | **PUT** /policies/{policy_key} | Update Policy |
|
|
34
|
+
| [**update_role_roles_role_id_put**](ManagementApi.md#update_role_roles_role_id_put) | **PUT** /roles/{role_id} | Update Role |
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## add_permission_to_role_roles_role_id_permissions_permission_id_post
|
|
38
|
+
|
|
39
|
+
> <SuccessResponsePermissionOut> add_permission_to_role_roles_role_id_permissions_permission_id_post(role_id, permission_id)
|
|
40
|
+
|
|
41
|
+
Add Permission To Role
|
|
42
|
+
|
|
43
|
+
### Examples
|
|
44
|
+
|
|
45
|
+
```ruby
|
|
46
|
+
require 'time'
|
|
47
|
+
require 'keynetra-client'
|
|
48
|
+
# setup authorization
|
|
49
|
+
KeyNetra.configure do |config|
|
|
50
|
+
# Configure API key authorization: APIKeyHeader
|
|
51
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
52
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
53
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
54
|
+
|
|
55
|
+
# Configure Bearer authorization: HTTPBearer
|
|
56
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
60
|
+
role_id = 56 # Integer |
|
|
61
|
+
permission_id = 56 # Integer |
|
|
62
|
+
|
|
63
|
+
begin
|
|
64
|
+
# Add Permission To Role
|
|
65
|
+
result = api_instance.add_permission_to_role_roles_role_id_permissions_permission_id_post(role_id, permission_id)
|
|
66
|
+
p result
|
|
67
|
+
rescue KeyNetra::ApiError => e
|
|
68
|
+
puts "Error when calling ManagementApi->add_permission_to_role_roles_role_id_permissions_permission_id_post: #{e}"
|
|
69
|
+
end
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Using the add_permission_to_role_roles_role_id_permissions_permission_id_post_with_http_info variant
|
|
73
|
+
|
|
74
|
+
This returns an Array which contains the response data, status code and headers.
|
|
75
|
+
|
|
76
|
+
> <Array(<SuccessResponsePermissionOut>, Integer, Hash)> add_permission_to_role_roles_role_id_permissions_permission_id_post_with_http_info(role_id, permission_id)
|
|
77
|
+
|
|
78
|
+
```ruby
|
|
79
|
+
begin
|
|
80
|
+
# Add Permission To Role
|
|
81
|
+
data, status_code, headers = api_instance.add_permission_to_role_roles_role_id_permissions_permission_id_post_with_http_info(role_id, permission_id)
|
|
82
|
+
p status_code # => 2xx
|
|
83
|
+
p headers # => { ... }
|
|
84
|
+
p data # => <SuccessResponsePermissionOut>
|
|
85
|
+
rescue KeyNetra::ApiError => e
|
|
86
|
+
puts "Error when calling ManagementApi->add_permission_to_role_roles_role_id_permissions_permission_id_post_with_http_info: #{e}"
|
|
87
|
+
end
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Parameters
|
|
91
|
+
|
|
92
|
+
| Name | Type | Description | Notes |
|
|
93
|
+
| ---- | ---- | ----------- | ----- |
|
|
94
|
+
| **role_id** | **Integer** | | |
|
|
95
|
+
| **permission_id** | **Integer** | | |
|
|
96
|
+
|
|
97
|
+
### Return type
|
|
98
|
+
|
|
99
|
+
[**SuccessResponsePermissionOut**](SuccessResponsePermissionOut.md)
|
|
100
|
+
|
|
101
|
+
### Authorization
|
|
102
|
+
|
|
103
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
104
|
+
|
|
105
|
+
### HTTP request headers
|
|
106
|
+
|
|
107
|
+
- **Content-Type**: Not defined
|
|
108
|
+
- **Accept**: application/json
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
## create_acl_entry_acl_post
|
|
112
|
+
|
|
113
|
+
> <SuccessResponseACLOut> create_acl_entry_acl_post(acl_create)
|
|
114
|
+
|
|
115
|
+
Create Acl Entry
|
|
116
|
+
|
|
117
|
+
### Examples
|
|
118
|
+
|
|
119
|
+
```ruby
|
|
120
|
+
require 'time'
|
|
121
|
+
require 'keynetra-client'
|
|
122
|
+
# setup authorization
|
|
123
|
+
KeyNetra.configure do |config|
|
|
124
|
+
# Configure API key authorization: APIKeyHeader
|
|
125
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
126
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
127
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
128
|
+
|
|
129
|
+
# Configure Bearer authorization: HTTPBearer
|
|
130
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
134
|
+
acl_create = KeyNetra::ACLCreate.new({subject_type: 'subject_type_example', subject_id: 'subject_id_example', resource_type: 'resource_type_example', resource_id: 'resource_id_example', action: 'action_example', effect: 'effect_example'}) # ACLCreate |
|
|
135
|
+
|
|
136
|
+
begin
|
|
137
|
+
# Create Acl Entry
|
|
138
|
+
result = api_instance.create_acl_entry_acl_post(acl_create)
|
|
139
|
+
p result
|
|
140
|
+
rescue KeyNetra::ApiError => e
|
|
141
|
+
puts "Error when calling ManagementApi->create_acl_entry_acl_post: #{e}"
|
|
142
|
+
end
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
#### Using the create_acl_entry_acl_post_with_http_info variant
|
|
146
|
+
|
|
147
|
+
This returns an Array which contains the response data, status code and headers.
|
|
148
|
+
|
|
149
|
+
> <Array(<SuccessResponseACLOut>, Integer, Hash)> create_acl_entry_acl_post_with_http_info(acl_create)
|
|
150
|
+
|
|
151
|
+
```ruby
|
|
152
|
+
begin
|
|
153
|
+
# Create Acl Entry
|
|
154
|
+
data, status_code, headers = api_instance.create_acl_entry_acl_post_with_http_info(acl_create)
|
|
155
|
+
p status_code # => 2xx
|
|
156
|
+
p headers # => { ... }
|
|
157
|
+
p data # => <SuccessResponseACLOut>
|
|
158
|
+
rescue KeyNetra::ApiError => e
|
|
159
|
+
puts "Error when calling ManagementApi->create_acl_entry_acl_post_with_http_info: #{e}"
|
|
160
|
+
end
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Parameters
|
|
164
|
+
|
|
165
|
+
| Name | Type | Description | Notes |
|
|
166
|
+
| ---- | ---- | ----------- | ----- |
|
|
167
|
+
| **acl_create** | [**ACLCreate**](ACLCreate.md) | | |
|
|
168
|
+
|
|
169
|
+
### Return type
|
|
170
|
+
|
|
171
|
+
[**SuccessResponseACLOut**](SuccessResponseACLOut.md)
|
|
172
|
+
|
|
173
|
+
### Authorization
|
|
174
|
+
|
|
175
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
176
|
+
|
|
177
|
+
### HTTP request headers
|
|
178
|
+
|
|
179
|
+
- **Content-Type**: application/json
|
|
180
|
+
- **Accept**: application/json
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
## create_auth_model_auth_model_post
|
|
184
|
+
|
|
185
|
+
> <SuccessResponseAuthModelOut> create_auth_model_auth_model_post(auth_model_create)
|
|
186
|
+
|
|
187
|
+
Create Auth Model
|
|
188
|
+
|
|
189
|
+
### Examples
|
|
190
|
+
|
|
191
|
+
```ruby
|
|
192
|
+
require 'time'
|
|
193
|
+
require 'keynetra-client'
|
|
194
|
+
# setup authorization
|
|
195
|
+
KeyNetra.configure do |config|
|
|
196
|
+
# Configure API key authorization: APIKeyHeader
|
|
197
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
198
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
199
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
200
|
+
|
|
201
|
+
# Configure Bearer authorization: HTTPBearer
|
|
202
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
206
|
+
auth_model_create = KeyNetra::AuthModelCreate.new({schema: 'schema_example'}) # AuthModelCreate |
|
|
207
|
+
|
|
208
|
+
begin
|
|
209
|
+
# Create Auth Model
|
|
210
|
+
result = api_instance.create_auth_model_auth_model_post(auth_model_create)
|
|
211
|
+
p result
|
|
212
|
+
rescue KeyNetra::ApiError => e
|
|
213
|
+
puts "Error when calling ManagementApi->create_auth_model_auth_model_post: #{e}"
|
|
214
|
+
end
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
#### Using the create_auth_model_auth_model_post_with_http_info variant
|
|
218
|
+
|
|
219
|
+
This returns an Array which contains the response data, status code and headers.
|
|
220
|
+
|
|
221
|
+
> <Array(<SuccessResponseAuthModelOut>, Integer, Hash)> create_auth_model_auth_model_post_with_http_info(auth_model_create)
|
|
222
|
+
|
|
223
|
+
```ruby
|
|
224
|
+
begin
|
|
225
|
+
# Create Auth Model
|
|
226
|
+
data, status_code, headers = api_instance.create_auth_model_auth_model_post_with_http_info(auth_model_create)
|
|
227
|
+
p status_code # => 2xx
|
|
228
|
+
p headers # => { ... }
|
|
229
|
+
p data # => <SuccessResponseAuthModelOut>
|
|
230
|
+
rescue KeyNetra::ApiError => e
|
|
231
|
+
puts "Error when calling ManagementApi->create_auth_model_auth_model_post_with_http_info: #{e}"
|
|
232
|
+
end
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
### Parameters
|
|
236
|
+
|
|
237
|
+
| Name | Type | Description | Notes |
|
|
238
|
+
| ---- | ---- | ----------- | ----- |
|
|
239
|
+
| **auth_model_create** | [**AuthModelCreate**](AuthModelCreate.md) | | |
|
|
240
|
+
|
|
241
|
+
### Return type
|
|
242
|
+
|
|
243
|
+
[**SuccessResponseAuthModelOut**](SuccessResponseAuthModelOut.md)
|
|
244
|
+
|
|
245
|
+
### Authorization
|
|
246
|
+
|
|
247
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
248
|
+
|
|
249
|
+
### HTTP request headers
|
|
250
|
+
|
|
251
|
+
- **Content-Type**: application/json
|
|
252
|
+
- **Accept**: application/json
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
## create_permission_permissions_post
|
|
256
|
+
|
|
257
|
+
> <PermissionOut> create_permission_permissions_post(permission_create)
|
|
258
|
+
|
|
259
|
+
Create Permission
|
|
260
|
+
|
|
261
|
+
### Examples
|
|
262
|
+
|
|
263
|
+
```ruby
|
|
264
|
+
require 'time'
|
|
265
|
+
require 'keynetra-client'
|
|
266
|
+
# setup authorization
|
|
267
|
+
KeyNetra.configure do |config|
|
|
268
|
+
# Configure API key authorization: APIKeyHeader
|
|
269
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
270
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
271
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
272
|
+
|
|
273
|
+
# Configure Bearer authorization: HTTPBearer
|
|
274
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
278
|
+
permission_create = KeyNetra::PermissionCreate.new({action: 'action_example'}) # PermissionCreate |
|
|
279
|
+
|
|
280
|
+
begin
|
|
281
|
+
# Create Permission
|
|
282
|
+
result = api_instance.create_permission_permissions_post(permission_create)
|
|
283
|
+
p result
|
|
284
|
+
rescue KeyNetra::ApiError => e
|
|
285
|
+
puts "Error when calling ManagementApi->create_permission_permissions_post: #{e}"
|
|
286
|
+
end
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
#### Using the create_permission_permissions_post_with_http_info variant
|
|
290
|
+
|
|
291
|
+
This returns an Array which contains the response data, status code and headers.
|
|
292
|
+
|
|
293
|
+
> <Array(<PermissionOut>, Integer, Hash)> create_permission_permissions_post_with_http_info(permission_create)
|
|
294
|
+
|
|
295
|
+
```ruby
|
|
296
|
+
begin
|
|
297
|
+
# Create Permission
|
|
298
|
+
data, status_code, headers = api_instance.create_permission_permissions_post_with_http_info(permission_create)
|
|
299
|
+
p status_code # => 2xx
|
|
300
|
+
p headers # => { ... }
|
|
301
|
+
p data # => <PermissionOut>
|
|
302
|
+
rescue KeyNetra::ApiError => e
|
|
303
|
+
puts "Error when calling ManagementApi->create_permission_permissions_post_with_http_info: #{e}"
|
|
304
|
+
end
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Parameters
|
|
308
|
+
|
|
309
|
+
| Name | Type | Description | Notes |
|
|
310
|
+
| ---- | ---- | ----------- | ----- |
|
|
311
|
+
| **permission_create** | [**PermissionCreate**](PermissionCreate.md) | | |
|
|
312
|
+
|
|
313
|
+
### Return type
|
|
314
|
+
|
|
315
|
+
[**PermissionOut**](PermissionOut.md)
|
|
316
|
+
|
|
317
|
+
### Authorization
|
|
318
|
+
|
|
319
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
320
|
+
|
|
321
|
+
### HTTP request headers
|
|
322
|
+
|
|
323
|
+
- **Content-Type**: application/json
|
|
324
|
+
- **Accept**: application/json
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
## create_policy_from_dsl_policies_dsl_post
|
|
328
|
+
|
|
329
|
+
> <SuccessResponsePolicyOut> create_policy_from_dsl_policies_dsl_post(dsl)
|
|
330
|
+
|
|
331
|
+
Create Policy From Dsl
|
|
332
|
+
|
|
333
|
+
### Examples
|
|
334
|
+
|
|
335
|
+
```ruby
|
|
336
|
+
require 'time'
|
|
337
|
+
require 'keynetra-client'
|
|
338
|
+
# setup authorization
|
|
339
|
+
KeyNetra.configure do |config|
|
|
340
|
+
# Configure API key authorization: APIKeyHeader
|
|
341
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
342
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
343
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
344
|
+
|
|
345
|
+
# Configure Bearer authorization: HTTPBearer
|
|
346
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
347
|
+
end
|
|
348
|
+
|
|
349
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
350
|
+
dsl = 'dsl_example' # String |
|
|
351
|
+
|
|
352
|
+
begin
|
|
353
|
+
# Create Policy From Dsl
|
|
354
|
+
result = api_instance.create_policy_from_dsl_policies_dsl_post(dsl)
|
|
355
|
+
p result
|
|
356
|
+
rescue KeyNetra::ApiError => e
|
|
357
|
+
puts "Error when calling ManagementApi->create_policy_from_dsl_policies_dsl_post: #{e}"
|
|
358
|
+
end
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
#### Using the create_policy_from_dsl_policies_dsl_post_with_http_info variant
|
|
362
|
+
|
|
363
|
+
This returns an Array which contains the response data, status code and headers.
|
|
364
|
+
|
|
365
|
+
> <Array(<SuccessResponsePolicyOut>, Integer, Hash)> create_policy_from_dsl_policies_dsl_post_with_http_info(dsl)
|
|
366
|
+
|
|
367
|
+
```ruby
|
|
368
|
+
begin
|
|
369
|
+
# Create Policy From Dsl
|
|
370
|
+
data, status_code, headers = api_instance.create_policy_from_dsl_policies_dsl_post_with_http_info(dsl)
|
|
371
|
+
p status_code # => 2xx
|
|
372
|
+
p headers # => { ... }
|
|
373
|
+
p data # => <SuccessResponsePolicyOut>
|
|
374
|
+
rescue KeyNetra::ApiError => e
|
|
375
|
+
puts "Error when calling ManagementApi->create_policy_from_dsl_policies_dsl_post_with_http_info: #{e}"
|
|
376
|
+
end
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### Parameters
|
|
380
|
+
|
|
381
|
+
| Name | Type | Description | Notes |
|
|
382
|
+
| ---- | ---- | ----------- | ----- |
|
|
383
|
+
| **dsl** | **String** | | |
|
|
384
|
+
|
|
385
|
+
### Return type
|
|
386
|
+
|
|
387
|
+
[**SuccessResponsePolicyOut**](SuccessResponsePolicyOut.md)
|
|
388
|
+
|
|
389
|
+
### Authorization
|
|
390
|
+
|
|
391
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
392
|
+
|
|
393
|
+
### HTTP request headers
|
|
394
|
+
|
|
395
|
+
- **Content-Type**: Not defined
|
|
396
|
+
- **Accept**: application/json
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
## create_policy_policies_post
|
|
400
|
+
|
|
401
|
+
> <SuccessResponsePolicyOut> create_policy_policies_post(policy_create)
|
|
402
|
+
|
|
403
|
+
Create Policy
|
|
404
|
+
|
|
405
|
+
### Examples
|
|
406
|
+
|
|
407
|
+
```ruby
|
|
408
|
+
require 'time'
|
|
409
|
+
require 'keynetra-client'
|
|
410
|
+
# setup authorization
|
|
411
|
+
KeyNetra.configure do |config|
|
|
412
|
+
# Configure API key authorization: APIKeyHeader
|
|
413
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
414
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
415
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
416
|
+
|
|
417
|
+
# Configure Bearer authorization: HTTPBearer
|
|
418
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
419
|
+
end
|
|
420
|
+
|
|
421
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
422
|
+
policy_create = KeyNetra::PolicyCreate.new({action: 'action_example'}) # PolicyCreate |
|
|
423
|
+
|
|
424
|
+
begin
|
|
425
|
+
# Create Policy
|
|
426
|
+
result = api_instance.create_policy_policies_post(policy_create)
|
|
427
|
+
p result
|
|
428
|
+
rescue KeyNetra::ApiError => e
|
|
429
|
+
puts "Error when calling ManagementApi->create_policy_policies_post: #{e}"
|
|
430
|
+
end
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
#### Using the create_policy_policies_post_with_http_info variant
|
|
434
|
+
|
|
435
|
+
This returns an Array which contains the response data, status code and headers.
|
|
436
|
+
|
|
437
|
+
> <Array(<SuccessResponsePolicyOut>, Integer, Hash)> create_policy_policies_post_with_http_info(policy_create)
|
|
438
|
+
|
|
439
|
+
```ruby
|
|
440
|
+
begin
|
|
441
|
+
# Create Policy
|
|
442
|
+
data, status_code, headers = api_instance.create_policy_policies_post_with_http_info(policy_create)
|
|
443
|
+
p status_code # => 2xx
|
|
444
|
+
p headers # => { ... }
|
|
445
|
+
p data # => <SuccessResponsePolicyOut>
|
|
446
|
+
rescue KeyNetra::ApiError => e
|
|
447
|
+
puts "Error when calling ManagementApi->create_policy_policies_post_with_http_info: #{e}"
|
|
448
|
+
end
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Parameters
|
|
452
|
+
|
|
453
|
+
| Name | Type | Description | Notes |
|
|
454
|
+
| ---- | ---- | ----------- | ----- |
|
|
455
|
+
| **policy_create** | [**PolicyCreate**](PolicyCreate.md) | | |
|
|
456
|
+
|
|
457
|
+
### Return type
|
|
458
|
+
|
|
459
|
+
[**SuccessResponsePolicyOut**](SuccessResponsePolicyOut.md)
|
|
460
|
+
|
|
461
|
+
### Authorization
|
|
462
|
+
|
|
463
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
464
|
+
|
|
465
|
+
### HTTP request headers
|
|
466
|
+
|
|
467
|
+
- **Content-Type**: application/json
|
|
468
|
+
- **Accept**: application/json
|
|
469
|
+
|
|
470
|
+
|
|
471
|
+
## create_relationship_relationships_post
|
|
472
|
+
|
|
473
|
+
> <SuccessResponseRelationshipOut> create_relationship_relationships_post(relationship_create)
|
|
474
|
+
|
|
475
|
+
Create Relationship
|
|
476
|
+
|
|
477
|
+
### Examples
|
|
478
|
+
|
|
479
|
+
```ruby
|
|
480
|
+
require 'time'
|
|
481
|
+
require 'keynetra-client'
|
|
482
|
+
# setup authorization
|
|
483
|
+
KeyNetra.configure do |config|
|
|
484
|
+
# Configure API key authorization: APIKeyHeader
|
|
485
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
486
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
487
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
488
|
+
|
|
489
|
+
# Configure Bearer authorization: HTTPBearer
|
|
490
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
491
|
+
end
|
|
492
|
+
|
|
493
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
494
|
+
relationship_create = KeyNetra::RelationshipCreate.new({subject_type: 'subject_type_example', subject_id: 'subject_id_example', relation: 'relation_example', object_type: 'object_type_example', object_id: 'object_id_example'}) # RelationshipCreate |
|
|
495
|
+
|
|
496
|
+
begin
|
|
497
|
+
# Create Relationship
|
|
498
|
+
result = api_instance.create_relationship_relationships_post(relationship_create)
|
|
499
|
+
p result
|
|
500
|
+
rescue KeyNetra::ApiError => e
|
|
501
|
+
puts "Error when calling ManagementApi->create_relationship_relationships_post: #{e}"
|
|
502
|
+
end
|
|
503
|
+
```
|
|
504
|
+
|
|
505
|
+
#### Using the create_relationship_relationships_post_with_http_info variant
|
|
506
|
+
|
|
507
|
+
This returns an Array which contains the response data, status code and headers.
|
|
508
|
+
|
|
509
|
+
> <Array(<SuccessResponseRelationshipOut>, Integer, Hash)> create_relationship_relationships_post_with_http_info(relationship_create)
|
|
510
|
+
|
|
511
|
+
```ruby
|
|
512
|
+
begin
|
|
513
|
+
# Create Relationship
|
|
514
|
+
data, status_code, headers = api_instance.create_relationship_relationships_post_with_http_info(relationship_create)
|
|
515
|
+
p status_code # => 2xx
|
|
516
|
+
p headers # => { ... }
|
|
517
|
+
p data # => <SuccessResponseRelationshipOut>
|
|
518
|
+
rescue KeyNetra::ApiError => e
|
|
519
|
+
puts "Error when calling ManagementApi->create_relationship_relationships_post_with_http_info: #{e}"
|
|
520
|
+
end
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
### Parameters
|
|
524
|
+
|
|
525
|
+
| Name | Type | Description | Notes |
|
|
526
|
+
| ---- | ---- | ----------- | ----- |
|
|
527
|
+
| **relationship_create** | [**RelationshipCreate**](RelationshipCreate.md) | | |
|
|
528
|
+
|
|
529
|
+
### Return type
|
|
530
|
+
|
|
531
|
+
[**SuccessResponseRelationshipOut**](SuccessResponseRelationshipOut.md)
|
|
532
|
+
|
|
533
|
+
### Authorization
|
|
534
|
+
|
|
535
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
536
|
+
|
|
537
|
+
### HTTP request headers
|
|
538
|
+
|
|
539
|
+
- **Content-Type**: application/json
|
|
540
|
+
- **Accept**: application/json
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
## create_role_roles_post
|
|
544
|
+
|
|
545
|
+
> <RoleOut> create_role_roles_post(role_create)
|
|
546
|
+
|
|
547
|
+
Create Role
|
|
548
|
+
|
|
549
|
+
### Examples
|
|
550
|
+
|
|
551
|
+
```ruby
|
|
552
|
+
require 'time'
|
|
553
|
+
require 'keynetra-client'
|
|
554
|
+
# setup authorization
|
|
555
|
+
KeyNetra.configure do |config|
|
|
556
|
+
# Configure API key authorization: APIKeyHeader
|
|
557
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
558
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
559
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
560
|
+
|
|
561
|
+
# Configure Bearer authorization: HTTPBearer
|
|
562
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
563
|
+
end
|
|
564
|
+
|
|
565
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
566
|
+
role_create = KeyNetra::RoleCreate.new({name: 'name_example'}) # RoleCreate |
|
|
567
|
+
|
|
568
|
+
begin
|
|
569
|
+
# Create Role
|
|
570
|
+
result = api_instance.create_role_roles_post(role_create)
|
|
571
|
+
p result
|
|
572
|
+
rescue KeyNetra::ApiError => e
|
|
573
|
+
puts "Error when calling ManagementApi->create_role_roles_post: #{e}"
|
|
574
|
+
end
|
|
575
|
+
```
|
|
576
|
+
|
|
577
|
+
#### Using the create_role_roles_post_with_http_info variant
|
|
578
|
+
|
|
579
|
+
This returns an Array which contains the response data, status code and headers.
|
|
580
|
+
|
|
581
|
+
> <Array(<RoleOut>, Integer, Hash)> create_role_roles_post_with_http_info(role_create)
|
|
582
|
+
|
|
583
|
+
```ruby
|
|
584
|
+
begin
|
|
585
|
+
# Create Role
|
|
586
|
+
data, status_code, headers = api_instance.create_role_roles_post_with_http_info(role_create)
|
|
587
|
+
p status_code # => 2xx
|
|
588
|
+
p headers # => { ... }
|
|
589
|
+
p data # => <RoleOut>
|
|
590
|
+
rescue KeyNetra::ApiError => e
|
|
591
|
+
puts "Error when calling ManagementApi->create_role_roles_post_with_http_info: #{e}"
|
|
592
|
+
end
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
### Parameters
|
|
596
|
+
|
|
597
|
+
| Name | Type | Description | Notes |
|
|
598
|
+
| ---- | ---- | ----------- | ----- |
|
|
599
|
+
| **role_create** | [**RoleCreate**](RoleCreate.md) | | |
|
|
600
|
+
|
|
601
|
+
### Return type
|
|
602
|
+
|
|
603
|
+
[**RoleOut**](RoleOut.md)
|
|
604
|
+
|
|
605
|
+
### Authorization
|
|
606
|
+
|
|
607
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
608
|
+
|
|
609
|
+
### HTTP request headers
|
|
610
|
+
|
|
611
|
+
- **Content-Type**: application/json
|
|
612
|
+
- **Accept**: application/json
|
|
613
|
+
|
|
614
|
+
|
|
615
|
+
## delete_acl_entry_acl_acl_id_delete
|
|
616
|
+
|
|
617
|
+
> <SuccessResponseDictStrInt> delete_acl_entry_acl_acl_id_delete(acl_id)
|
|
618
|
+
|
|
619
|
+
Delete Acl Entry
|
|
620
|
+
|
|
621
|
+
### Examples
|
|
622
|
+
|
|
623
|
+
```ruby
|
|
624
|
+
require 'time'
|
|
625
|
+
require 'keynetra-client'
|
|
626
|
+
# setup authorization
|
|
627
|
+
KeyNetra.configure do |config|
|
|
628
|
+
# Configure API key authorization: APIKeyHeader
|
|
629
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
630
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
631
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
632
|
+
|
|
633
|
+
# Configure Bearer authorization: HTTPBearer
|
|
634
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
635
|
+
end
|
|
636
|
+
|
|
637
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
638
|
+
acl_id = 56 # Integer |
|
|
639
|
+
|
|
640
|
+
begin
|
|
641
|
+
# Delete Acl Entry
|
|
642
|
+
result = api_instance.delete_acl_entry_acl_acl_id_delete(acl_id)
|
|
643
|
+
p result
|
|
644
|
+
rescue KeyNetra::ApiError => e
|
|
645
|
+
puts "Error when calling ManagementApi->delete_acl_entry_acl_acl_id_delete: #{e}"
|
|
646
|
+
end
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
#### Using the delete_acl_entry_acl_acl_id_delete_with_http_info variant
|
|
650
|
+
|
|
651
|
+
This returns an Array which contains the response data, status code and headers.
|
|
652
|
+
|
|
653
|
+
> <Array(<SuccessResponseDictStrInt>, Integer, Hash)> delete_acl_entry_acl_acl_id_delete_with_http_info(acl_id)
|
|
654
|
+
|
|
655
|
+
```ruby
|
|
656
|
+
begin
|
|
657
|
+
# Delete Acl Entry
|
|
658
|
+
data, status_code, headers = api_instance.delete_acl_entry_acl_acl_id_delete_with_http_info(acl_id)
|
|
659
|
+
p status_code # => 2xx
|
|
660
|
+
p headers # => { ... }
|
|
661
|
+
p data # => <SuccessResponseDictStrInt>
|
|
662
|
+
rescue KeyNetra::ApiError => e
|
|
663
|
+
puts "Error when calling ManagementApi->delete_acl_entry_acl_acl_id_delete_with_http_info: #{e}"
|
|
664
|
+
end
|
|
665
|
+
```
|
|
666
|
+
|
|
667
|
+
### Parameters
|
|
668
|
+
|
|
669
|
+
| Name | Type | Description | Notes |
|
|
670
|
+
| ---- | ---- | ----------- | ----- |
|
|
671
|
+
| **acl_id** | **Integer** | | |
|
|
672
|
+
|
|
673
|
+
### Return type
|
|
674
|
+
|
|
675
|
+
[**SuccessResponseDictStrInt**](SuccessResponseDictStrInt.md)
|
|
676
|
+
|
|
677
|
+
### Authorization
|
|
678
|
+
|
|
679
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
680
|
+
|
|
681
|
+
### HTTP request headers
|
|
682
|
+
|
|
683
|
+
- **Content-Type**: Not defined
|
|
684
|
+
- **Accept**: application/json
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
## delete_permission_permissions_permission_id_delete
|
|
688
|
+
|
|
689
|
+
> <SuccessResponseDictStrInt> delete_permission_permissions_permission_id_delete(permission_id)
|
|
690
|
+
|
|
691
|
+
Delete Permission
|
|
692
|
+
|
|
693
|
+
### Examples
|
|
694
|
+
|
|
695
|
+
```ruby
|
|
696
|
+
require 'time'
|
|
697
|
+
require 'keynetra-client'
|
|
698
|
+
# setup authorization
|
|
699
|
+
KeyNetra.configure do |config|
|
|
700
|
+
# Configure API key authorization: APIKeyHeader
|
|
701
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
702
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
703
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
704
|
+
|
|
705
|
+
# Configure Bearer authorization: HTTPBearer
|
|
706
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
707
|
+
end
|
|
708
|
+
|
|
709
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
710
|
+
permission_id = 56 # Integer |
|
|
711
|
+
|
|
712
|
+
begin
|
|
713
|
+
# Delete Permission
|
|
714
|
+
result = api_instance.delete_permission_permissions_permission_id_delete(permission_id)
|
|
715
|
+
p result
|
|
716
|
+
rescue KeyNetra::ApiError => e
|
|
717
|
+
puts "Error when calling ManagementApi->delete_permission_permissions_permission_id_delete: #{e}"
|
|
718
|
+
end
|
|
719
|
+
```
|
|
720
|
+
|
|
721
|
+
#### Using the delete_permission_permissions_permission_id_delete_with_http_info variant
|
|
722
|
+
|
|
723
|
+
This returns an Array which contains the response data, status code and headers.
|
|
724
|
+
|
|
725
|
+
> <Array(<SuccessResponseDictStrInt>, Integer, Hash)> delete_permission_permissions_permission_id_delete_with_http_info(permission_id)
|
|
726
|
+
|
|
727
|
+
```ruby
|
|
728
|
+
begin
|
|
729
|
+
# Delete Permission
|
|
730
|
+
data, status_code, headers = api_instance.delete_permission_permissions_permission_id_delete_with_http_info(permission_id)
|
|
731
|
+
p status_code # => 2xx
|
|
732
|
+
p headers # => { ... }
|
|
733
|
+
p data # => <SuccessResponseDictStrInt>
|
|
734
|
+
rescue KeyNetra::ApiError => e
|
|
735
|
+
puts "Error when calling ManagementApi->delete_permission_permissions_permission_id_delete_with_http_info: #{e}"
|
|
736
|
+
end
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
### Parameters
|
|
740
|
+
|
|
741
|
+
| Name | Type | Description | Notes |
|
|
742
|
+
| ---- | ---- | ----------- | ----- |
|
|
743
|
+
| **permission_id** | **Integer** | | |
|
|
744
|
+
|
|
745
|
+
### Return type
|
|
746
|
+
|
|
747
|
+
[**SuccessResponseDictStrInt**](SuccessResponseDictStrInt.md)
|
|
748
|
+
|
|
749
|
+
### Authorization
|
|
750
|
+
|
|
751
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
752
|
+
|
|
753
|
+
### HTTP request headers
|
|
754
|
+
|
|
755
|
+
- **Content-Type**: Not defined
|
|
756
|
+
- **Accept**: application/json
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
## delete_policy_policies_policy_key_delete
|
|
760
|
+
|
|
761
|
+
> <SuccessResponseDictStrStr> delete_policy_policies_policy_key_delete(policy_key)
|
|
762
|
+
|
|
763
|
+
Delete Policy
|
|
764
|
+
|
|
765
|
+
### Examples
|
|
766
|
+
|
|
767
|
+
```ruby
|
|
768
|
+
require 'time'
|
|
769
|
+
require 'keynetra-client'
|
|
770
|
+
# setup authorization
|
|
771
|
+
KeyNetra.configure do |config|
|
|
772
|
+
# Configure API key authorization: APIKeyHeader
|
|
773
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
774
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
775
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
776
|
+
|
|
777
|
+
# Configure Bearer authorization: HTTPBearer
|
|
778
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
779
|
+
end
|
|
780
|
+
|
|
781
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
782
|
+
policy_key = 'policy_key_example' # String |
|
|
783
|
+
|
|
784
|
+
begin
|
|
785
|
+
# Delete Policy
|
|
786
|
+
result = api_instance.delete_policy_policies_policy_key_delete(policy_key)
|
|
787
|
+
p result
|
|
788
|
+
rescue KeyNetra::ApiError => e
|
|
789
|
+
puts "Error when calling ManagementApi->delete_policy_policies_policy_key_delete: #{e}"
|
|
790
|
+
end
|
|
791
|
+
```
|
|
792
|
+
|
|
793
|
+
#### Using the delete_policy_policies_policy_key_delete_with_http_info variant
|
|
794
|
+
|
|
795
|
+
This returns an Array which contains the response data, status code and headers.
|
|
796
|
+
|
|
797
|
+
> <Array(<SuccessResponseDictStrStr>, Integer, Hash)> delete_policy_policies_policy_key_delete_with_http_info(policy_key)
|
|
798
|
+
|
|
799
|
+
```ruby
|
|
800
|
+
begin
|
|
801
|
+
# Delete Policy
|
|
802
|
+
data, status_code, headers = api_instance.delete_policy_policies_policy_key_delete_with_http_info(policy_key)
|
|
803
|
+
p status_code # => 2xx
|
|
804
|
+
p headers # => { ... }
|
|
805
|
+
p data # => <SuccessResponseDictStrStr>
|
|
806
|
+
rescue KeyNetra::ApiError => e
|
|
807
|
+
puts "Error when calling ManagementApi->delete_policy_policies_policy_key_delete_with_http_info: #{e}"
|
|
808
|
+
end
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
### Parameters
|
|
812
|
+
|
|
813
|
+
| Name | Type | Description | Notes |
|
|
814
|
+
| ---- | ---- | ----------- | ----- |
|
|
815
|
+
| **policy_key** | **String** | | |
|
|
816
|
+
|
|
817
|
+
### Return type
|
|
818
|
+
|
|
819
|
+
[**SuccessResponseDictStrStr**](SuccessResponseDictStrStr.md)
|
|
820
|
+
|
|
821
|
+
### Authorization
|
|
822
|
+
|
|
823
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
824
|
+
|
|
825
|
+
### HTTP request headers
|
|
826
|
+
|
|
827
|
+
- **Content-Type**: Not defined
|
|
828
|
+
- **Accept**: application/json
|
|
829
|
+
|
|
830
|
+
|
|
831
|
+
## delete_role_roles_role_id_delete
|
|
832
|
+
|
|
833
|
+
> <SuccessResponseDictStrInt> delete_role_roles_role_id_delete(role_id)
|
|
834
|
+
|
|
835
|
+
Delete Role
|
|
836
|
+
|
|
837
|
+
### Examples
|
|
838
|
+
|
|
839
|
+
```ruby
|
|
840
|
+
require 'time'
|
|
841
|
+
require 'keynetra-client'
|
|
842
|
+
# setup authorization
|
|
843
|
+
KeyNetra.configure do |config|
|
|
844
|
+
# Configure API key authorization: APIKeyHeader
|
|
845
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
846
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
847
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
848
|
+
|
|
849
|
+
# Configure Bearer authorization: HTTPBearer
|
|
850
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
851
|
+
end
|
|
852
|
+
|
|
853
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
854
|
+
role_id = 56 # Integer |
|
|
855
|
+
|
|
856
|
+
begin
|
|
857
|
+
# Delete Role
|
|
858
|
+
result = api_instance.delete_role_roles_role_id_delete(role_id)
|
|
859
|
+
p result
|
|
860
|
+
rescue KeyNetra::ApiError => e
|
|
861
|
+
puts "Error when calling ManagementApi->delete_role_roles_role_id_delete: #{e}"
|
|
862
|
+
end
|
|
863
|
+
```
|
|
864
|
+
|
|
865
|
+
#### Using the delete_role_roles_role_id_delete_with_http_info variant
|
|
866
|
+
|
|
867
|
+
This returns an Array which contains the response data, status code and headers.
|
|
868
|
+
|
|
869
|
+
> <Array(<SuccessResponseDictStrInt>, Integer, Hash)> delete_role_roles_role_id_delete_with_http_info(role_id)
|
|
870
|
+
|
|
871
|
+
```ruby
|
|
872
|
+
begin
|
|
873
|
+
# Delete Role
|
|
874
|
+
data, status_code, headers = api_instance.delete_role_roles_role_id_delete_with_http_info(role_id)
|
|
875
|
+
p status_code # => 2xx
|
|
876
|
+
p headers # => { ... }
|
|
877
|
+
p data # => <SuccessResponseDictStrInt>
|
|
878
|
+
rescue KeyNetra::ApiError => e
|
|
879
|
+
puts "Error when calling ManagementApi->delete_role_roles_role_id_delete_with_http_info: #{e}"
|
|
880
|
+
end
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
### Parameters
|
|
884
|
+
|
|
885
|
+
| Name | Type | Description | Notes |
|
|
886
|
+
| ---- | ---- | ----------- | ----- |
|
|
887
|
+
| **role_id** | **Integer** | | |
|
|
888
|
+
|
|
889
|
+
### Return type
|
|
890
|
+
|
|
891
|
+
[**SuccessResponseDictStrInt**](SuccessResponseDictStrInt.md)
|
|
892
|
+
|
|
893
|
+
### Authorization
|
|
894
|
+
|
|
895
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
896
|
+
|
|
897
|
+
### HTTP request headers
|
|
898
|
+
|
|
899
|
+
- **Content-Type**: Not defined
|
|
900
|
+
- **Accept**: application/json
|
|
901
|
+
|
|
902
|
+
|
|
903
|
+
## get_auth_model_auth_model_get
|
|
904
|
+
|
|
905
|
+
> <SuccessResponseAuthModelOut> get_auth_model_auth_model_get
|
|
906
|
+
|
|
907
|
+
Get Auth Model
|
|
908
|
+
|
|
909
|
+
### Examples
|
|
910
|
+
|
|
911
|
+
```ruby
|
|
912
|
+
require 'time'
|
|
913
|
+
require 'keynetra-client'
|
|
914
|
+
# setup authorization
|
|
915
|
+
KeyNetra.configure do |config|
|
|
916
|
+
# Configure API key authorization: APIKeyHeader
|
|
917
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
918
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
919
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
920
|
+
|
|
921
|
+
# Configure Bearer authorization: HTTPBearer
|
|
922
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
923
|
+
end
|
|
924
|
+
|
|
925
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
926
|
+
|
|
927
|
+
begin
|
|
928
|
+
# Get Auth Model
|
|
929
|
+
result = api_instance.get_auth_model_auth_model_get
|
|
930
|
+
p result
|
|
931
|
+
rescue KeyNetra::ApiError => e
|
|
932
|
+
puts "Error when calling ManagementApi->get_auth_model_auth_model_get: #{e}"
|
|
933
|
+
end
|
|
934
|
+
```
|
|
935
|
+
|
|
936
|
+
#### Using the get_auth_model_auth_model_get_with_http_info variant
|
|
937
|
+
|
|
938
|
+
This returns an Array which contains the response data, status code and headers.
|
|
939
|
+
|
|
940
|
+
> <Array(<SuccessResponseAuthModelOut>, Integer, Hash)> get_auth_model_auth_model_get_with_http_info
|
|
941
|
+
|
|
942
|
+
```ruby
|
|
943
|
+
begin
|
|
944
|
+
# Get Auth Model
|
|
945
|
+
data, status_code, headers = api_instance.get_auth_model_auth_model_get_with_http_info
|
|
946
|
+
p status_code # => 2xx
|
|
947
|
+
p headers # => { ... }
|
|
948
|
+
p data # => <SuccessResponseAuthModelOut>
|
|
949
|
+
rescue KeyNetra::ApiError => e
|
|
950
|
+
puts "Error when calling ManagementApi->get_auth_model_auth_model_get_with_http_info: #{e}"
|
|
951
|
+
end
|
|
952
|
+
```
|
|
953
|
+
|
|
954
|
+
### Parameters
|
|
955
|
+
|
|
956
|
+
This endpoint does not need any parameter.
|
|
957
|
+
|
|
958
|
+
### Return type
|
|
959
|
+
|
|
960
|
+
[**SuccessResponseAuthModelOut**](SuccessResponseAuthModelOut.md)
|
|
961
|
+
|
|
962
|
+
### Authorization
|
|
963
|
+
|
|
964
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
965
|
+
|
|
966
|
+
### HTTP request headers
|
|
967
|
+
|
|
968
|
+
- **Content-Type**: Not defined
|
|
969
|
+
- **Accept**: application/json
|
|
970
|
+
|
|
971
|
+
|
|
972
|
+
## impact_analysis_impact_analysis_post
|
|
973
|
+
|
|
974
|
+
> <SuccessResponseImpactAnalysisResponse> impact_analysis_impact_analysis_post(impact_analysis_request)
|
|
975
|
+
|
|
976
|
+
Impact Analysis
|
|
977
|
+
|
|
978
|
+
### Examples
|
|
979
|
+
|
|
980
|
+
```ruby
|
|
981
|
+
require 'time'
|
|
982
|
+
require 'keynetra-client'
|
|
983
|
+
# setup authorization
|
|
984
|
+
KeyNetra.configure do |config|
|
|
985
|
+
# Configure API key authorization: APIKeyHeader
|
|
986
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
987
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
988
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
989
|
+
|
|
990
|
+
# Configure Bearer authorization: HTTPBearer
|
|
991
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
992
|
+
end
|
|
993
|
+
|
|
994
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
995
|
+
impact_analysis_request = KeyNetra::ImpactAnalysisRequest.new({policy_change: 'policy_change_example'}) # ImpactAnalysisRequest |
|
|
996
|
+
|
|
997
|
+
begin
|
|
998
|
+
# Impact Analysis
|
|
999
|
+
result = api_instance.impact_analysis_impact_analysis_post(impact_analysis_request)
|
|
1000
|
+
p result
|
|
1001
|
+
rescue KeyNetra::ApiError => e
|
|
1002
|
+
puts "Error when calling ManagementApi->impact_analysis_impact_analysis_post: #{e}"
|
|
1003
|
+
end
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
#### Using the impact_analysis_impact_analysis_post_with_http_info variant
|
|
1007
|
+
|
|
1008
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1009
|
+
|
|
1010
|
+
> <Array(<SuccessResponseImpactAnalysisResponse>, Integer, Hash)> impact_analysis_impact_analysis_post_with_http_info(impact_analysis_request)
|
|
1011
|
+
|
|
1012
|
+
```ruby
|
|
1013
|
+
begin
|
|
1014
|
+
# Impact Analysis
|
|
1015
|
+
data, status_code, headers = api_instance.impact_analysis_impact_analysis_post_with_http_info(impact_analysis_request)
|
|
1016
|
+
p status_code # => 2xx
|
|
1017
|
+
p headers # => { ... }
|
|
1018
|
+
p data # => <SuccessResponseImpactAnalysisResponse>
|
|
1019
|
+
rescue KeyNetra::ApiError => e
|
|
1020
|
+
puts "Error when calling ManagementApi->impact_analysis_impact_analysis_post_with_http_info: #{e}"
|
|
1021
|
+
end
|
|
1022
|
+
```
|
|
1023
|
+
|
|
1024
|
+
### Parameters
|
|
1025
|
+
|
|
1026
|
+
| Name | Type | Description | Notes |
|
|
1027
|
+
| ---- | ---- | ----------- | ----- |
|
|
1028
|
+
| **impact_analysis_request** | [**ImpactAnalysisRequest**](ImpactAnalysisRequest.md) | | |
|
|
1029
|
+
|
|
1030
|
+
### Return type
|
|
1031
|
+
|
|
1032
|
+
[**SuccessResponseImpactAnalysisResponse**](SuccessResponseImpactAnalysisResponse.md)
|
|
1033
|
+
|
|
1034
|
+
### Authorization
|
|
1035
|
+
|
|
1036
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1037
|
+
|
|
1038
|
+
### HTTP request headers
|
|
1039
|
+
|
|
1040
|
+
- **Content-Type**: application/json
|
|
1041
|
+
- **Accept**: application/json
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
## list_acl_entries_acl_resource_type_resource_id_get
|
|
1045
|
+
|
|
1046
|
+
> <SuccessResponseListACLOut> list_acl_entries_acl_resource_type_resource_id_get(resource_type, resource_id)
|
|
1047
|
+
|
|
1048
|
+
List Acl Entries
|
|
1049
|
+
|
|
1050
|
+
### Examples
|
|
1051
|
+
|
|
1052
|
+
```ruby
|
|
1053
|
+
require 'time'
|
|
1054
|
+
require 'keynetra-client'
|
|
1055
|
+
# setup authorization
|
|
1056
|
+
KeyNetra.configure do |config|
|
|
1057
|
+
# Configure API key authorization: APIKeyHeader
|
|
1058
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1059
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1060
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1061
|
+
|
|
1062
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1063
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1064
|
+
end
|
|
1065
|
+
|
|
1066
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1067
|
+
resource_type = 'resource_type_example' # String |
|
|
1068
|
+
resource_id = 'resource_id_example' # String |
|
|
1069
|
+
|
|
1070
|
+
begin
|
|
1071
|
+
# List Acl Entries
|
|
1072
|
+
result = api_instance.list_acl_entries_acl_resource_type_resource_id_get(resource_type, resource_id)
|
|
1073
|
+
p result
|
|
1074
|
+
rescue KeyNetra::ApiError => e
|
|
1075
|
+
puts "Error when calling ManagementApi->list_acl_entries_acl_resource_type_resource_id_get: #{e}"
|
|
1076
|
+
end
|
|
1077
|
+
```
|
|
1078
|
+
|
|
1079
|
+
#### Using the list_acl_entries_acl_resource_type_resource_id_get_with_http_info variant
|
|
1080
|
+
|
|
1081
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1082
|
+
|
|
1083
|
+
> <Array(<SuccessResponseListACLOut>, Integer, Hash)> list_acl_entries_acl_resource_type_resource_id_get_with_http_info(resource_type, resource_id)
|
|
1084
|
+
|
|
1085
|
+
```ruby
|
|
1086
|
+
begin
|
|
1087
|
+
# List Acl Entries
|
|
1088
|
+
data, status_code, headers = api_instance.list_acl_entries_acl_resource_type_resource_id_get_with_http_info(resource_type, resource_id)
|
|
1089
|
+
p status_code # => 2xx
|
|
1090
|
+
p headers # => { ... }
|
|
1091
|
+
p data # => <SuccessResponseListACLOut>
|
|
1092
|
+
rescue KeyNetra::ApiError => e
|
|
1093
|
+
puts "Error when calling ManagementApi->list_acl_entries_acl_resource_type_resource_id_get_with_http_info: #{e}"
|
|
1094
|
+
end
|
|
1095
|
+
```
|
|
1096
|
+
|
|
1097
|
+
### Parameters
|
|
1098
|
+
|
|
1099
|
+
| Name | Type | Description | Notes |
|
|
1100
|
+
| ---- | ---- | ----------- | ----- |
|
|
1101
|
+
| **resource_type** | **String** | | |
|
|
1102
|
+
| **resource_id** | **String** | | |
|
|
1103
|
+
|
|
1104
|
+
### Return type
|
|
1105
|
+
|
|
1106
|
+
[**SuccessResponseListACLOut**](SuccessResponseListACLOut.md)
|
|
1107
|
+
|
|
1108
|
+
### Authorization
|
|
1109
|
+
|
|
1110
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1111
|
+
|
|
1112
|
+
### HTTP request headers
|
|
1113
|
+
|
|
1114
|
+
- **Content-Type**: Not defined
|
|
1115
|
+
- **Accept**: application/json
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
## list_audit_logs_audit_get
|
|
1119
|
+
|
|
1120
|
+
> <SuccessResponseListAuditRecordOut> list_audit_logs_audit_get(opts)
|
|
1121
|
+
|
|
1122
|
+
List Audit Logs
|
|
1123
|
+
|
|
1124
|
+
### Examples
|
|
1125
|
+
|
|
1126
|
+
```ruby
|
|
1127
|
+
require 'time'
|
|
1128
|
+
require 'keynetra-client'
|
|
1129
|
+
# setup authorization
|
|
1130
|
+
KeyNetra.configure do |config|
|
|
1131
|
+
# Configure API key authorization: APIKeyHeader
|
|
1132
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1133
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1134
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1135
|
+
|
|
1136
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1137
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1138
|
+
end
|
|
1139
|
+
|
|
1140
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1141
|
+
opts = {
|
|
1142
|
+
limit: 56, # Integer |
|
|
1143
|
+
cursor: 'cursor_example', # String |
|
|
1144
|
+
user_id: 'user_id_example', # String |
|
|
1145
|
+
resource_id: 'resource_id_example', # String |
|
|
1146
|
+
decision: 'decision_example', # String |
|
|
1147
|
+
start_time: Time.parse('2013-10-20T19:20:30+01:00'), # Time |
|
|
1148
|
+
end_time: Time.parse('2013-10-20T19:20:30+01:00') # Time |
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
begin
|
|
1152
|
+
# List Audit Logs
|
|
1153
|
+
result = api_instance.list_audit_logs_audit_get(opts)
|
|
1154
|
+
p result
|
|
1155
|
+
rescue KeyNetra::ApiError => e
|
|
1156
|
+
puts "Error when calling ManagementApi->list_audit_logs_audit_get: #{e}"
|
|
1157
|
+
end
|
|
1158
|
+
```
|
|
1159
|
+
|
|
1160
|
+
#### Using the list_audit_logs_audit_get_with_http_info variant
|
|
1161
|
+
|
|
1162
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1163
|
+
|
|
1164
|
+
> <Array(<SuccessResponseListAuditRecordOut>, Integer, Hash)> list_audit_logs_audit_get_with_http_info(opts)
|
|
1165
|
+
|
|
1166
|
+
```ruby
|
|
1167
|
+
begin
|
|
1168
|
+
# List Audit Logs
|
|
1169
|
+
data, status_code, headers = api_instance.list_audit_logs_audit_get_with_http_info(opts)
|
|
1170
|
+
p status_code # => 2xx
|
|
1171
|
+
p headers # => { ... }
|
|
1172
|
+
p data # => <SuccessResponseListAuditRecordOut>
|
|
1173
|
+
rescue KeyNetra::ApiError => e
|
|
1174
|
+
puts "Error when calling ManagementApi->list_audit_logs_audit_get_with_http_info: #{e}"
|
|
1175
|
+
end
|
|
1176
|
+
```
|
|
1177
|
+
|
|
1178
|
+
### Parameters
|
|
1179
|
+
|
|
1180
|
+
| Name | Type | Description | Notes |
|
|
1181
|
+
| ---- | ---- | ----------- | ----- |
|
|
1182
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
1183
|
+
| **cursor** | **String** | | [optional] |
|
|
1184
|
+
| **user_id** | **String** | | [optional] |
|
|
1185
|
+
| **resource_id** | **String** | | [optional] |
|
|
1186
|
+
| **decision** | **String** | | [optional] |
|
|
1187
|
+
| **start_time** | **Time** | | [optional] |
|
|
1188
|
+
| **end_time** | **Time** | | [optional] |
|
|
1189
|
+
|
|
1190
|
+
### Return type
|
|
1191
|
+
|
|
1192
|
+
[**SuccessResponseListAuditRecordOut**](SuccessResponseListAuditRecordOut.md)
|
|
1193
|
+
|
|
1194
|
+
### Authorization
|
|
1195
|
+
|
|
1196
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1197
|
+
|
|
1198
|
+
### HTTP request headers
|
|
1199
|
+
|
|
1200
|
+
- **Content-Type**: Not defined
|
|
1201
|
+
- **Accept**: application/json
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
## list_permission_roles_permissions_permission_id_roles_get
|
|
1205
|
+
|
|
1206
|
+
> <SuccessResponseListRoleOut> list_permission_roles_permissions_permission_id_roles_get(permission_id)
|
|
1207
|
+
|
|
1208
|
+
List Permission Roles
|
|
1209
|
+
|
|
1210
|
+
### Examples
|
|
1211
|
+
|
|
1212
|
+
```ruby
|
|
1213
|
+
require 'time'
|
|
1214
|
+
require 'keynetra-client'
|
|
1215
|
+
# setup authorization
|
|
1216
|
+
KeyNetra.configure do |config|
|
|
1217
|
+
# Configure API key authorization: APIKeyHeader
|
|
1218
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1219
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1220
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1221
|
+
|
|
1222
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1223
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1224
|
+
end
|
|
1225
|
+
|
|
1226
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1227
|
+
permission_id = 56 # Integer |
|
|
1228
|
+
|
|
1229
|
+
begin
|
|
1230
|
+
# List Permission Roles
|
|
1231
|
+
result = api_instance.list_permission_roles_permissions_permission_id_roles_get(permission_id)
|
|
1232
|
+
p result
|
|
1233
|
+
rescue KeyNetra::ApiError => e
|
|
1234
|
+
puts "Error when calling ManagementApi->list_permission_roles_permissions_permission_id_roles_get: #{e}"
|
|
1235
|
+
end
|
|
1236
|
+
```
|
|
1237
|
+
|
|
1238
|
+
#### Using the list_permission_roles_permissions_permission_id_roles_get_with_http_info variant
|
|
1239
|
+
|
|
1240
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1241
|
+
|
|
1242
|
+
> <Array(<SuccessResponseListRoleOut>, Integer, Hash)> list_permission_roles_permissions_permission_id_roles_get_with_http_info(permission_id)
|
|
1243
|
+
|
|
1244
|
+
```ruby
|
|
1245
|
+
begin
|
|
1246
|
+
# List Permission Roles
|
|
1247
|
+
data, status_code, headers = api_instance.list_permission_roles_permissions_permission_id_roles_get_with_http_info(permission_id)
|
|
1248
|
+
p status_code # => 2xx
|
|
1249
|
+
p headers # => { ... }
|
|
1250
|
+
p data # => <SuccessResponseListRoleOut>
|
|
1251
|
+
rescue KeyNetra::ApiError => e
|
|
1252
|
+
puts "Error when calling ManagementApi->list_permission_roles_permissions_permission_id_roles_get_with_http_info: #{e}"
|
|
1253
|
+
end
|
|
1254
|
+
```
|
|
1255
|
+
|
|
1256
|
+
### Parameters
|
|
1257
|
+
|
|
1258
|
+
| Name | Type | Description | Notes |
|
|
1259
|
+
| ---- | ---- | ----------- | ----- |
|
|
1260
|
+
| **permission_id** | **Integer** | | |
|
|
1261
|
+
|
|
1262
|
+
### Return type
|
|
1263
|
+
|
|
1264
|
+
[**SuccessResponseListRoleOut**](SuccessResponseListRoleOut.md)
|
|
1265
|
+
|
|
1266
|
+
### Authorization
|
|
1267
|
+
|
|
1268
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1269
|
+
|
|
1270
|
+
### HTTP request headers
|
|
1271
|
+
|
|
1272
|
+
- **Content-Type**: Not defined
|
|
1273
|
+
- **Accept**: application/json
|
|
1274
|
+
|
|
1275
|
+
|
|
1276
|
+
## list_permissions_permissions_get
|
|
1277
|
+
|
|
1278
|
+
> <SuccessResponseListPermissionOut> list_permissions_permissions_get(opts)
|
|
1279
|
+
|
|
1280
|
+
List Permissions
|
|
1281
|
+
|
|
1282
|
+
### Examples
|
|
1283
|
+
|
|
1284
|
+
```ruby
|
|
1285
|
+
require 'time'
|
|
1286
|
+
require 'keynetra-client'
|
|
1287
|
+
# setup authorization
|
|
1288
|
+
KeyNetra.configure do |config|
|
|
1289
|
+
# Configure API key authorization: APIKeyHeader
|
|
1290
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1291
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1292
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1293
|
+
|
|
1294
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1295
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1296
|
+
end
|
|
1297
|
+
|
|
1298
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1299
|
+
opts = {
|
|
1300
|
+
limit: 56, # Integer |
|
|
1301
|
+
cursor: 'cursor_example' # String |
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
begin
|
|
1305
|
+
# List Permissions
|
|
1306
|
+
result = api_instance.list_permissions_permissions_get(opts)
|
|
1307
|
+
p result
|
|
1308
|
+
rescue KeyNetra::ApiError => e
|
|
1309
|
+
puts "Error when calling ManagementApi->list_permissions_permissions_get: #{e}"
|
|
1310
|
+
end
|
|
1311
|
+
```
|
|
1312
|
+
|
|
1313
|
+
#### Using the list_permissions_permissions_get_with_http_info variant
|
|
1314
|
+
|
|
1315
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1316
|
+
|
|
1317
|
+
> <Array(<SuccessResponseListPermissionOut>, Integer, Hash)> list_permissions_permissions_get_with_http_info(opts)
|
|
1318
|
+
|
|
1319
|
+
```ruby
|
|
1320
|
+
begin
|
|
1321
|
+
# List Permissions
|
|
1322
|
+
data, status_code, headers = api_instance.list_permissions_permissions_get_with_http_info(opts)
|
|
1323
|
+
p status_code # => 2xx
|
|
1324
|
+
p headers # => { ... }
|
|
1325
|
+
p data # => <SuccessResponseListPermissionOut>
|
|
1326
|
+
rescue KeyNetra::ApiError => e
|
|
1327
|
+
puts "Error when calling ManagementApi->list_permissions_permissions_get_with_http_info: #{e}"
|
|
1328
|
+
end
|
|
1329
|
+
```
|
|
1330
|
+
|
|
1331
|
+
### Parameters
|
|
1332
|
+
|
|
1333
|
+
| Name | Type | Description | Notes |
|
|
1334
|
+
| ---- | ---- | ----------- | ----- |
|
|
1335
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
1336
|
+
| **cursor** | **String** | | [optional] |
|
|
1337
|
+
|
|
1338
|
+
### Return type
|
|
1339
|
+
|
|
1340
|
+
[**SuccessResponseListPermissionOut**](SuccessResponseListPermissionOut.md)
|
|
1341
|
+
|
|
1342
|
+
### Authorization
|
|
1343
|
+
|
|
1344
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1345
|
+
|
|
1346
|
+
### HTTP request headers
|
|
1347
|
+
|
|
1348
|
+
- **Content-Type**: Not defined
|
|
1349
|
+
- **Accept**: application/json
|
|
1350
|
+
|
|
1351
|
+
|
|
1352
|
+
## list_policies_policies_get
|
|
1353
|
+
|
|
1354
|
+
> <SuccessResponseListPolicyOut> list_policies_policies_get(opts)
|
|
1355
|
+
|
|
1356
|
+
List Policies
|
|
1357
|
+
|
|
1358
|
+
### Examples
|
|
1359
|
+
|
|
1360
|
+
```ruby
|
|
1361
|
+
require 'time'
|
|
1362
|
+
require 'keynetra-client'
|
|
1363
|
+
# setup authorization
|
|
1364
|
+
KeyNetra.configure do |config|
|
|
1365
|
+
# Configure API key authorization: APIKeyHeader
|
|
1366
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1367
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1368
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1369
|
+
|
|
1370
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1371
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1372
|
+
end
|
|
1373
|
+
|
|
1374
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1375
|
+
opts = {
|
|
1376
|
+
limit: 56, # Integer |
|
|
1377
|
+
cursor: 'cursor_example' # String |
|
|
1378
|
+
}
|
|
1379
|
+
|
|
1380
|
+
begin
|
|
1381
|
+
# List Policies
|
|
1382
|
+
result = api_instance.list_policies_policies_get(opts)
|
|
1383
|
+
p result
|
|
1384
|
+
rescue KeyNetra::ApiError => e
|
|
1385
|
+
puts "Error when calling ManagementApi->list_policies_policies_get: #{e}"
|
|
1386
|
+
end
|
|
1387
|
+
```
|
|
1388
|
+
|
|
1389
|
+
#### Using the list_policies_policies_get_with_http_info variant
|
|
1390
|
+
|
|
1391
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1392
|
+
|
|
1393
|
+
> <Array(<SuccessResponseListPolicyOut>, Integer, Hash)> list_policies_policies_get_with_http_info(opts)
|
|
1394
|
+
|
|
1395
|
+
```ruby
|
|
1396
|
+
begin
|
|
1397
|
+
# List Policies
|
|
1398
|
+
data, status_code, headers = api_instance.list_policies_policies_get_with_http_info(opts)
|
|
1399
|
+
p status_code # => 2xx
|
|
1400
|
+
p headers # => { ... }
|
|
1401
|
+
p data # => <SuccessResponseListPolicyOut>
|
|
1402
|
+
rescue KeyNetra::ApiError => e
|
|
1403
|
+
puts "Error when calling ManagementApi->list_policies_policies_get_with_http_info: #{e}"
|
|
1404
|
+
end
|
|
1405
|
+
```
|
|
1406
|
+
|
|
1407
|
+
### Parameters
|
|
1408
|
+
|
|
1409
|
+
| Name | Type | Description | Notes |
|
|
1410
|
+
| ---- | ---- | ----------- | ----- |
|
|
1411
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
1412
|
+
| **cursor** | **String** | | [optional] |
|
|
1413
|
+
|
|
1414
|
+
### Return type
|
|
1415
|
+
|
|
1416
|
+
[**SuccessResponseListPolicyOut**](SuccessResponseListPolicyOut.md)
|
|
1417
|
+
|
|
1418
|
+
### Authorization
|
|
1419
|
+
|
|
1420
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1421
|
+
|
|
1422
|
+
### HTTP request headers
|
|
1423
|
+
|
|
1424
|
+
- **Content-Type**: Not defined
|
|
1425
|
+
- **Accept**: application/json
|
|
1426
|
+
|
|
1427
|
+
|
|
1428
|
+
## list_relationships_relationships_get
|
|
1429
|
+
|
|
1430
|
+
> <SuccessResponseListDictStrStr> list_relationships_relationships_get(subject_type, subject_id, opts)
|
|
1431
|
+
|
|
1432
|
+
List Relationships
|
|
1433
|
+
|
|
1434
|
+
### Examples
|
|
1435
|
+
|
|
1436
|
+
```ruby
|
|
1437
|
+
require 'time'
|
|
1438
|
+
require 'keynetra-client'
|
|
1439
|
+
# setup authorization
|
|
1440
|
+
KeyNetra.configure do |config|
|
|
1441
|
+
# Configure API key authorization: APIKeyHeader
|
|
1442
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1443
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1444
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1445
|
+
|
|
1446
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1447
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1448
|
+
end
|
|
1449
|
+
|
|
1450
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1451
|
+
subject_type = 'subject_type_example' # String |
|
|
1452
|
+
subject_id = 'subject_id_example' # String |
|
|
1453
|
+
opts = {
|
|
1454
|
+
limit: 56, # Integer |
|
|
1455
|
+
cursor: 'cursor_example' # String |
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
begin
|
|
1459
|
+
# List Relationships
|
|
1460
|
+
result = api_instance.list_relationships_relationships_get(subject_type, subject_id, opts)
|
|
1461
|
+
p result
|
|
1462
|
+
rescue KeyNetra::ApiError => e
|
|
1463
|
+
puts "Error when calling ManagementApi->list_relationships_relationships_get: #{e}"
|
|
1464
|
+
end
|
|
1465
|
+
```
|
|
1466
|
+
|
|
1467
|
+
#### Using the list_relationships_relationships_get_with_http_info variant
|
|
1468
|
+
|
|
1469
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1470
|
+
|
|
1471
|
+
> <Array(<SuccessResponseListDictStrStr>, Integer, Hash)> list_relationships_relationships_get_with_http_info(subject_type, subject_id, opts)
|
|
1472
|
+
|
|
1473
|
+
```ruby
|
|
1474
|
+
begin
|
|
1475
|
+
# List Relationships
|
|
1476
|
+
data, status_code, headers = api_instance.list_relationships_relationships_get_with_http_info(subject_type, subject_id, opts)
|
|
1477
|
+
p status_code # => 2xx
|
|
1478
|
+
p headers # => { ... }
|
|
1479
|
+
p data # => <SuccessResponseListDictStrStr>
|
|
1480
|
+
rescue KeyNetra::ApiError => e
|
|
1481
|
+
puts "Error when calling ManagementApi->list_relationships_relationships_get_with_http_info: #{e}"
|
|
1482
|
+
end
|
|
1483
|
+
```
|
|
1484
|
+
|
|
1485
|
+
### Parameters
|
|
1486
|
+
|
|
1487
|
+
| Name | Type | Description | Notes |
|
|
1488
|
+
| ---- | ---- | ----------- | ----- |
|
|
1489
|
+
| **subject_type** | **String** | | |
|
|
1490
|
+
| **subject_id** | **String** | | |
|
|
1491
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
1492
|
+
| **cursor** | **String** | | [optional] |
|
|
1493
|
+
|
|
1494
|
+
### Return type
|
|
1495
|
+
|
|
1496
|
+
[**SuccessResponseListDictStrStr**](SuccessResponseListDictStrStr.md)
|
|
1497
|
+
|
|
1498
|
+
### Authorization
|
|
1499
|
+
|
|
1500
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1501
|
+
|
|
1502
|
+
### HTTP request headers
|
|
1503
|
+
|
|
1504
|
+
- **Content-Type**: Not defined
|
|
1505
|
+
- **Accept**: application/json
|
|
1506
|
+
|
|
1507
|
+
|
|
1508
|
+
## list_role_permissions_roles_role_id_permissions_get
|
|
1509
|
+
|
|
1510
|
+
> <SuccessResponseListPermissionOut> list_role_permissions_roles_role_id_permissions_get(role_id)
|
|
1511
|
+
|
|
1512
|
+
List Role Permissions
|
|
1513
|
+
|
|
1514
|
+
### Examples
|
|
1515
|
+
|
|
1516
|
+
```ruby
|
|
1517
|
+
require 'time'
|
|
1518
|
+
require 'keynetra-client'
|
|
1519
|
+
# setup authorization
|
|
1520
|
+
KeyNetra.configure do |config|
|
|
1521
|
+
# Configure API key authorization: APIKeyHeader
|
|
1522
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1523
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1524
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1525
|
+
|
|
1526
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1527
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1528
|
+
end
|
|
1529
|
+
|
|
1530
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1531
|
+
role_id = 56 # Integer |
|
|
1532
|
+
|
|
1533
|
+
begin
|
|
1534
|
+
# List Role Permissions
|
|
1535
|
+
result = api_instance.list_role_permissions_roles_role_id_permissions_get(role_id)
|
|
1536
|
+
p result
|
|
1537
|
+
rescue KeyNetra::ApiError => e
|
|
1538
|
+
puts "Error when calling ManagementApi->list_role_permissions_roles_role_id_permissions_get: #{e}"
|
|
1539
|
+
end
|
|
1540
|
+
```
|
|
1541
|
+
|
|
1542
|
+
#### Using the list_role_permissions_roles_role_id_permissions_get_with_http_info variant
|
|
1543
|
+
|
|
1544
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1545
|
+
|
|
1546
|
+
> <Array(<SuccessResponseListPermissionOut>, Integer, Hash)> list_role_permissions_roles_role_id_permissions_get_with_http_info(role_id)
|
|
1547
|
+
|
|
1548
|
+
```ruby
|
|
1549
|
+
begin
|
|
1550
|
+
# List Role Permissions
|
|
1551
|
+
data, status_code, headers = api_instance.list_role_permissions_roles_role_id_permissions_get_with_http_info(role_id)
|
|
1552
|
+
p status_code # => 2xx
|
|
1553
|
+
p headers # => { ... }
|
|
1554
|
+
p data # => <SuccessResponseListPermissionOut>
|
|
1555
|
+
rescue KeyNetra::ApiError => e
|
|
1556
|
+
puts "Error when calling ManagementApi->list_role_permissions_roles_role_id_permissions_get_with_http_info: #{e}"
|
|
1557
|
+
end
|
|
1558
|
+
```
|
|
1559
|
+
|
|
1560
|
+
### Parameters
|
|
1561
|
+
|
|
1562
|
+
| Name | Type | Description | Notes |
|
|
1563
|
+
| ---- | ---- | ----------- | ----- |
|
|
1564
|
+
| **role_id** | **Integer** | | |
|
|
1565
|
+
|
|
1566
|
+
### Return type
|
|
1567
|
+
|
|
1568
|
+
[**SuccessResponseListPermissionOut**](SuccessResponseListPermissionOut.md)
|
|
1569
|
+
|
|
1570
|
+
### Authorization
|
|
1571
|
+
|
|
1572
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1573
|
+
|
|
1574
|
+
### HTTP request headers
|
|
1575
|
+
|
|
1576
|
+
- **Content-Type**: Not defined
|
|
1577
|
+
- **Accept**: application/json
|
|
1578
|
+
|
|
1579
|
+
|
|
1580
|
+
## list_roles_roles_get
|
|
1581
|
+
|
|
1582
|
+
> <SuccessResponseListRoleOut> list_roles_roles_get(opts)
|
|
1583
|
+
|
|
1584
|
+
List Roles
|
|
1585
|
+
|
|
1586
|
+
### Examples
|
|
1587
|
+
|
|
1588
|
+
```ruby
|
|
1589
|
+
require 'time'
|
|
1590
|
+
require 'keynetra-client'
|
|
1591
|
+
# setup authorization
|
|
1592
|
+
KeyNetra.configure do |config|
|
|
1593
|
+
# Configure API key authorization: APIKeyHeader
|
|
1594
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1595
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1596
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1597
|
+
|
|
1598
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1599
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1600
|
+
end
|
|
1601
|
+
|
|
1602
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1603
|
+
opts = {
|
|
1604
|
+
limit: 56, # Integer |
|
|
1605
|
+
cursor: 'cursor_example' # String |
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
begin
|
|
1609
|
+
# List Roles
|
|
1610
|
+
result = api_instance.list_roles_roles_get(opts)
|
|
1611
|
+
p result
|
|
1612
|
+
rescue KeyNetra::ApiError => e
|
|
1613
|
+
puts "Error when calling ManagementApi->list_roles_roles_get: #{e}"
|
|
1614
|
+
end
|
|
1615
|
+
```
|
|
1616
|
+
|
|
1617
|
+
#### Using the list_roles_roles_get_with_http_info variant
|
|
1618
|
+
|
|
1619
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1620
|
+
|
|
1621
|
+
> <Array(<SuccessResponseListRoleOut>, Integer, Hash)> list_roles_roles_get_with_http_info(opts)
|
|
1622
|
+
|
|
1623
|
+
```ruby
|
|
1624
|
+
begin
|
|
1625
|
+
# List Roles
|
|
1626
|
+
data, status_code, headers = api_instance.list_roles_roles_get_with_http_info(opts)
|
|
1627
|
+
p status_code # => 2xx
|
|
1628
|
+
p headers # => { ... }
|
|
1629
|
+
p data # => <SuccessResponseListRoleOut>
|
|
1630
|
+
rescue KeyNetra::ApiError => e
|
|
1631
|
+
puts "Error when calling ManagementApi->list_roles_roles_get_with_http_info: #{e}"
|
|
1632
|
+
end
|
|
1633
|
+
```
|
|
1634
|
+
|
|
1635
|
+
### Parameters
|
|
1636
|
+
|
|
1637
|
+
| Name | Type | Description | Notes |
|
|
1638
|
+
| ---- | ---- | ----------- | ----- |
|
|
1639
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
1640
|
+
| **cursor** | **String** | | [optional] |
|
|
1641
|
+
|
|
1642
|
+
### Return type
|
|
1643
|
+
|
|
1644
|
+
[**SuccessResponseListRoleOut**](SuccessResponseListRoleOut.md)
|
|
1645
|
+
|
|
1646
|
+
### Authorization
|
|
1647
|
+
|
|
1648
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1649
|
+
|
|
1650
|
+
### HTTP request headers
|
|
1651
|
+
|
|
1652
|
+
- **Content-Type**: Not defined
|
|
1653
|
+
- **Accept**: application/json
|
|
1654
|
+
|
|
1655
|
+
|
|
1656
|
+
## remove_permission_from_role_roles_role_id_permissions_permission_id_delete
|
|
1657
|
+
|
|
1658
|
+
> <SuccessResponseDictStrInt> remove_permission_from_role_roles_role_id_permissions_permission_id_delete(role_id, permission_id)
|
|
1659
|
+
|
|
1660
|
+
Remove Permission From Role
|
|
1661
|
+
|
|
1662
|
+
### Examples
|
|
1663
|
+
|
|
1664
|
+
```ruby
|
|
1665
|
+
require 'time'
|
|
1666
|
+
require 'keynetra-client'
|
|
1667
|
+
# setup authorization
|
|
1668
|
+
KeyNetra.configure do |config|
|
|
1669
|
+
# Configure API key authorization: APIKeyHeader
|
|
1670
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1671
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1672
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1673
|
+
|
|
1674
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1675
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1676
|
+
end
|
|
1677
|
+
|
|
1678
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1679
|
+
role_id = 56 # Integer |
|
|
1680
|
+
permission_id = 56 # Integer |
|
|
1681
|
+
|
|
1682
|
+
begin
|
|
1683
|
+
# Remove Permission From Role
|
|
1684
|
+
result = api_instance.remove_permission_from_role_roles_role_id_permissions_permission_id_delete(role_id, permission_id)
|
|
1685
|
+
p result
|
|
1686
|
+
rescue KeyNetra::ApiError => e
|
|
1687
|
+
puts "Error when calling ManagementApi->remove_permission_from_role_roles_role_id_permissions_permission_id_delete: #{e}"
|
|
1688
|
+
end
|
|
1689
|
+
```
|
|
1690
|
+
|
|
1691
|
+
#### Using the remove_permission_from_role_roles_role_id_permissions_permission_id_delete_with_http_info variant
|
|
1692
|
+
|
|
1693
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1694
|
+
|
|
1695
|
+
> <Array(<SuccessResponseDictStrInt>, Integer, Hash)> remove_permission_from_role_roles_role_id_permissions_permission_id_delete_with_http_info(role_id, permission_id)
|
|
1696
|
+
|
|
1697
|
+
```ruby
|
|
1698
|
+
begin
|
|
1699
|
+
# Remove Permission From Role
|
|
1700
|
+
data, status_code, headers = api_instance.remove_permission_from_role_roles_role_id_permissions_permission_id_delete_with_http_info(role_id, permission_id)
|
|
1701
|
+
p status_code # => 2xx
|
|
1702
|
+
p headers # => { ... }
|
|
1703
|
+
p data # => <SuccessResponseDictStrInt>
|
|
1704
|
+
rescue KeyNetra::ApiError => e
|
|
1705
|
+
puts "Error when calling ManagementApi->remove_permission_from_role_roles_role_id_permissions_permission_id_delete_with_http_info: #{e}"
|
|
1706
|
+
end
|
|
1707
|
+
```
|
|
1708
|
+
|
|
1709
|
+
### Parameters
|
|
1710
|
+
|
|
1711
|
+
| Name | Type | Description | Notes |
|
|
1712
|
+
| ---- | ---- | ----------- | ----- |
|
|
1713
|
+
| **role_id** | **Integer** | | |
|
|
1714
|
+
| **permission_id** | **Integer** | | |
|
|
1715
|
+
|
|
1716
|
+
### Return type
|
|
1717
|
+
|
|
1718
|
+
[**SuccessResponseDictStrInt**](SuccessResponseDictStrInt.md)
|
|
1719
|
+
|
|
1720
|
+
### Authorization
|
|
1721
|
+
|
|
1722
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1723
|
+
|
|
1724
|
+
### HTTP request headers
|
|
1725
|
+
|
|
1726
|
+
- **Content-Type**: Not defined
|
|
1727
|
+
- **Accept**: application/json
|
|
1728
|
+
|
|
1729
|
+
|
|
1730
|
+
## rollback_policy_policies_policy_key_rollback_version_post
|
|
1731
|
+
|
|
1732
|
+
> <SuccessResponseDictStrUnionIntStr> rollback_policy_policies_policy_key_rollback_version_post(policy_key, version)
|
|
1733
|
+
|
|
1734
|
+
Rollback Policy
|
|
1735
|
+
|
|
1736
|
+
### Examples
|
|
1737
|
+
|
|
1738
|
+
```ruby
|
|
1739
|
+
require 'time'
|
|
1740
|
+
require 'keynetra-client'
|
|
1741
|
+
# setup authorization
|
|
1742
|
+
KeyNetra.configure do |config|
|
|
1743
|
+
# Configure API key authorization: APIKeyHeader
|
|
1744
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1745
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1746
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1747
|
+
|
|
1748
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1749
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1750
|
+
end
|
|
1751
|
+
|
|
1752
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1753
|
+
policy_key = 'policy_key_example' # String |
|
|
1754
|
+
version = 56 # Integer |
|
|
1755
|
+
|
|
1756
|
+
begin
|
|
1757
|
+
# Rollback Policy
|
|
1758
|
+
result = api_instance.rollback_policy_policies_policy_key_rollback_version_post(policy_key, version)
|
|
1759
|
+
p result
|
|
1760
|
+
rescue KeyNetra::ApiError => e
|
|
1761
|
+
puts "Error when calling ManagementApi->rollback_policy_policies_policy_key_rollback_version_post: #{e}"
|
|
1762
|
+
end
|
|
1763
|
+
```
|
|
1764
|
+
|
|
1765
|
+
#### Using the rollback_policy_policies_policy_key_rollback_version_post_with_http_info variant
|
|
1766
|
+
|
|
1767
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1768
|
+
|
|
1769
|
+
> <Array(<SuccessResponseDictStrUnionIntStr>, Integer, Hash)> rollback_policy_policies_policy_key_rollback_version_post_with_http_info(policy_key, version)
|
|
1770
|
+
|
|
1771
|
+
```ruby
|
|
1772
|
+
begin
|
|
1773
|
+
# Rollback Policy
|
|
1774
|
+
data, status_code, headers = api_instance.rollback_policy_policies_policy_key_rollback_version_post_with_http_info(policy_key, version)
|
|
1775
|
+
p status_code # => 2xx
|
|
1776
|
+
p headers # => { ... }
|
|
1777
|
+
p data # => <SuccessResponseDictStrUnionIntStr>
|
|
1778
|
+
rescue KeyNetra::ApiError => e
|
|
1779
|
+
puts "Error when calling ManagementApi->rollback_policy_policies_policy_key_rollback_version_post_with_http_info: #{e}"
|
|
1780
|
+
end
|
|
1781
|
+
```
|
|
1782
|
+
|
|
1783
|
+
### Parameters
|
|
1784
|
+
|
|
1785
|
+
| Name | Type | Description | Notes |
|
|
1786
|
+
| ---- | ---- | ----------- | ----- |
|
|
1787
|
+
| **policy_key** | **String** | | |
|
|
1788
|
+
| **version** | **Integer** | | |
|
|
1789
|
+
|
|
1790
|
+
### Return type
|
|
1791
|
+
|
|
1792
|
+
[**SuccessResponseDictStrUnionIntStr**](SuccessResponseDictStrUnionIntStr.md)
|
|
1793
|
+
|
|
1794
|
+
### Authorization
|
|
1795
|
+
|
|
1796
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1797
|
+
|
|
1798
|
+
### HTTP request headers
|
|
1799
|
+
|
|
1800
|
+
- **Content-Type**: Not defined
|
|
1801
|
+
- **Accept**: application/json
|
|
1802
|
+
|
|
1803
|
+
|
|
1804
|
+
## simulate_policy_simulate_policy_post
|
|
1805
|
+
|
|
1806
|
+
> <SuccessResponsePolicySimulationResponse> simulate_policy_simulate_policy_post(policy_simulation_request)
|
|
1807
|
+
|
|
1808
|
+
Simulate Policy
|
|
1809
|
+
|
|
1810
|
+
### Examples
|
|
1811
|
+
|
|
1812
|
+
```ruby
|
|
1813
|
+
require 'time'
|
|
1814
|
+
require 'keynetra-client'
|
|
1815
|
+
# setup authorization
|
|
1816
|
+
KeyNetra.configure do |config|
|
|
1817
|
+
# Configure API key authorization: APIKeyHeader
|
|
1818
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1819
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1820
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1821
|
+
|
|
1822
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1823
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1824
|
+
end
|
|
1825
|
+
|
|
1826
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1827
|
+
policy_simulation_request = KeyNetra::PolicySimulationRequest.new # PolicySimulationRequest |
|
|
1828
|
+
|
|
1829
|
+
begin
|
|
1830
|
+
# Simulate Policy
|
|
1831
|
+
result = api_instance.simulate_policy_simulate_policy_post(policy_simulation_request)
|
|
1832
|
+
p result
|
|
1833
|
+
rescue KeyNetra::ApiError => e
|
|
1834
|
+
puts "Error when calling ManagementApi->simulate_policy_simulate_policy_post: #{e}"
|
|
1835
|
+
end
|
|
1836
|
+
```
|
|
1837
|
+
|
|
1838
|
+
#### Using the simulate_policy_simulate_policy_post_with_http_info variant
|
|
1839
|
+
|
|
1840
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1841
|
+
|
|
1842
|
+
> <Array(<SuccessResponsePolicySimulationResponse>, Integer, Hash)> simulate_policy_simulate_policy_post_with_http_info(policy_simulation_request)
|
|
1843
|
+
|
|
1844
|
+
```ruby
|
|
1845
|
+
begin
|
|
1846
|
+
# Simulate Policy
|
|
1847
|
+
data, status_code, headers = api_instance.simulate_policy_simulate_policy_post_with_http_info(policy_simulation_request)
|
|
1848
|
+
p status_code # => 2xx
|
|
1849
|
+
p headers # => { ... }
|
|
1850
|
+
p data # => <SuccessResponsePolicySimulationResponse>
|
|
1851
|
+
rescue KeyNetra::ApiError => e
|
|
1852
|
+
puts "Error when calling ManagementApi->simulate_policy_simulate_policy_post_with_http_info: #{e}"
|
|
1853
|
+
end
|
|
1854
|
+
```
|
|
1855
|
+
|
|
1856
|
+
### Parameters
|
|
1857
|
+
|
|
1858
|
+
| Name | Type | Description | Notes |
|
|
1859
|
+
| ---- | ---- | ----------- | ----- |
|
|
1860
|
+
| **policy_simulation_request** | [**PolicySimulationRequest**](PolicySimulationRequest.md) | | |
|
|
1861
|
+
|
|
1862
|
+
### Return type
|
|
1863
|
+
|
|
1864
|
+
[**SuccessResponsePolicySimulationResponse**](SuccessResponsePolicySimulationResponse.md)
|
|
1865
|
+
|
|
1866
|
+
### Authorization
|
|
1867
|
+
|
|
1868
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1869
|
+
|
|
1870
|
+
### HTTP request headers
|
|
1871
|
+
|
|
1872
|
+
- **Content-Type**: application/json
|
|
1873
|
+
- **Accept**: application/json
|
|
1874
|
+
|
|
1875
|
+
|
|
1876
|
+
## update_permission_permissions_permission_id_put
|
|
1877
|
+
|
|
1878
|
+
> <PermissionOut> update_permission_permissions_permission_id_put(permission_id, permission_update)
|
|
1879
|
+
|
|
1880
|
+
Update Permission
|
|
1881
|
+
|
|
1882
|
+
### Examples
|
|
1883
|
+
|
|
1884
|
+
```ruby
|
|
1885
|
+
require 'time'
|
|
1886
|
+
require 'keynetra-client'
|
|
1887
|
+
# setup authorization
|
|
1888
|
+
KeyNetra.configure do |config|
|
|
1889
|
+
# Configure API key authorization: APIKeyHeader
|
|
1890
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1891
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1892
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1893
|
+
|
|
1894
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1895
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1896
|
+
end
|
|
1897
|
+
|
|
1898
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1899
|
+
permission_id = 56 # Integer |
|
|
1900
|
+
permission_update = KeyNetra::PermissionUpdate.new({action: 'action_example'}) # PermissionUpdate |
|
|
1901
|
+
|
|
1902
|
+
begin
|
|
1903
|
+
# Update Permission
|
|
1904
|
+
result = api_instance.update_permission_permissions_permission_id_put(permission_id, permission_update)
|
|
1905
|
+
p result
|
|
1906
|
+
rescue KeyNetra::ApiError => e
|
|
1907
|
+
puts "Error when calling ManagementApi->update_permission_permissions_permission_id_put: #{e}"
|
|
1908
|
+
end
|
|
1909
|
+
```
|
|
1910
|
+
|
|
1911
|
+
#### Using the update_permission_permissions_permission_id_put_with_http_info variant
|
|
1912
|
+
|
|
1913
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1914
|
+
|
|
1915
|
+
> <Array(<PermissionOut>, Integer, Hash)> update_permission_permissions_permission_id_put_with_http_info(permission_id, permission_update)
|
|
1916
|
+
|
|
1917
|
+
```ruby
|
|
1918
|
+
begin
|
|
1919
|
+
# Update Permission
|
|
1920
|
+
data, status_code, headers = api_instance.update_permission_permissions_permission_id_put_with_http_info(permission_id, permission_update)
|
|
1921
|
+
p status_code # => 2xx
|
|
1922
|
+
p headers # => { ... }
|
|
1923
|
+
p data # => <PermissionOut>
|
|
1924
|
+
rescue KeyNetra::ApiError => e
|
|
1925
|
+
puts "Error when calling ManagementApi->update_permission_permissions_permission_id_put_with_http_info: #{e}"
|
|
1926
|
+
end
|
|
1927
|
+
```
|
|
1928
|
+
|
|
1929
|
+
### Parameters
|
|
1930
|
+
|
|
1931
|
+
| Name | Type | Description | Notes |
|
|
1932
|
+
| ---- | ---- | ----------- | ----- |
|
|
1933
|
+
| **permission_id** | **Integer** | | |
|
|
1934
|
+
| **permission_update** | [**PermissionUpdate**](PermissionUpdate.md) | | |
|
|
1935
|
+
|
|
1936
|
+
### Return type
|
|
1937
|
+
|
|
1938
|
+
[**PermissionOut**](PermissionOut.md)
|
|
1939
|
+
|
|
1940
|
+
### Authorization
|
|
1941
|
+
|
|
1942
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
1943
|
+
|
|
1944
|
+
### HTTP request headers
|
|
1945
|
+
|
|
1946
|
+
- **Content-Type**: application/json
|
|
1947
|
+
- **Accept**: application/json
|
|
1948
|
+
|
|
1949
|
+
|
|
1950
|
+
## update_policy_policies_policy_key_put
|
|
1951
|
+
|
|
1952
|
+
> <SuccessResponsePolicyOut> update_policy_policies_policy_key_put(policy_key, policy_create)
|
|
1953
|
+
|
|
1954
|
+
Update Policy
|
|
1955
|
+
|
|
1956
|
+
### Examples
|
|
1957
|
+
|
|
1958
|
+
```ruby
|
|
1959
|
+
require 'time'
|
|
1960
|
+
require 'keynetra-client'
|
|
1961
|
+
# setup authorization
|
|
1962
|
+
KeyNetra.configure do |config|
|
|
1963
|
+
# Configure API key authorization: APIKeyHeader
|
|
1964
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
1965
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
1966
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
1967
|
+
|
|
1968
|
+
# Configure Bearer authorization: HTTPBearer
|
|
1969
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
1970
|
+
end
|
|
1971
|
+
|
|
1972
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
1973
|
+
policy_key = 'policy_key_example' # String |
|
|
1974
|
+
policy_create = KeyNetra::PolicyCreate.new({action: 'action_example'}) # PolicyCreate |
|
|
1975
|
+
|
|
1976
|
+
begin
|
|
1977
|
+
# Update Policy
|
|
1978
|
+
result = api_instance.update_policy_policies_policy_key_put(policy_key, policy_create)
|
|
1979
|
+
p result
|
|
1980
|
+
rescue KeyNetra::ApiError => e
|
|
1981
|
+
puts "Error when calling ManagementApi->update_policy_policies_policy_key_put: #{e}"
|
|
1982
|
+
end
|
|
1983
|
+
```
|
|
1984
|
+
|
|
1985
|
+
#### Using the update_policy_policies_policy_key_put_with_http_info variant
|
|
1986
|
+
|
|
1987
|
+
This returns an Array which contains the response data, status code and headers.
|
|
1988
|
+
|
|
1989
|
+
> <Array(<SuccessResponsePolicyOut>, Integer, Hash)> update_policy_policies_policy_key_put_with_http_info(policy_key, policy_create)
|
|
1990
|
+
|
|
1991
|
+
```ruby
|
|
1992
|
+
begin
|
|
1993
|
+
# Update Policy
|
|
1994
|
+
data, status_code, headers = api_instance.update_policy_policies_policy_key_put_with_http_info(policy_key, policy_create)
|
|
1995
|
+
p status_code # => 2xx
|
|
1996
|
+
p headers # => { ... }
|
|
1997
|
+
p data # => <SuccessResponsePolicyOut>
|
|
1998
|
+
rescue KeyNetra::ApiError => e
|
|
1999
|
+
puts "Error when calling ManagementApi->update_policy_policies_policy_key_put_with_http_info: #{e}"
|
|
2000
|
+
end
|
|
2001
|
+
```
|
|
2002
|
+
|
|
2003
|
+
### Parameters
|
|
2004
|
+
|
|
2005
|
+
| Name | Type | Description | Notes |
|
|
2006
|
+
| ---- | ---- | ----------- | ----- |
|
|
2007
|
+
| **policy_key** | **String** | | |
|
|
2008
|
+
| **policy_create** | [**PolicyCreate**](PolicyCreate.md) | | |
|
|
2009
|
+
|
|
2010
|
+
### Return type
|
|
2011
|
+
|
|
2012
|
+
[**SuccessResponsePolicyOut**](SuccessResponsePolicyOut.md)
|
|
2013
|
+
|
|
2014
|
+
### Authorization
|
|
2015
|
+
|
|
2016
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
2017
|
+
|
|
2018
|
+
### HTTP request headers
|
|
2019
|
+
|
|
2020
|
+
- **Content-Type**: application/json
|
|
2021
|
+
- **Accept**: application/json
|
|
2022
|
+
|
|
2023
|
+
|
|
2024
|
+
## update_role_roles_role_id_put
|
|
2025
|
+
|
|
2026
|
+
> <RoleOut> update_role_roles_role_id_put(role_id, role_update)
|
|
2027
|
+
|
|
2028
|
+
Update Role
|
|
2029
|
+
|
|
2030
|
+
### Examples
|
|
2031
|
+
|
|
2032
|
+
```ruby
|
|
2033
|
+
require 'time'
|
|
2034
|
+
require 'keynetra-client'
|
|
2035
|
+
# setup authorization
|
|
2036
|
+
KeyNetra.configure do |config|
|
|
2037
|
+
# Configure API key authorization: APIKeyHeader
|
|
2038
|
+
config.api_key['X-API-Key'] = 'YOUR API KEY'
|
|
2039
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
2040
|
+
# config.api_key_prefix['X-API-Key'] = 'Bearer'
|
|
2041
|
+
|
|
2042
|
+
# Configure Bearer authorization: HTTPBearer
|
|
2043
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
2044
|
+
end
|
|
2045
|
+
|
|
2046
|
+
api_instance = KeyNetra::ManagementApi.new
|
|
2047
|
+
role_id = 56 # Integer |
|
|
2048
|
+
role_update = KeyNetra::RoleUpdate.new({name: 'name_example'}) # RoleUpdate |
|
|
2049
|
+
|
|
2050
|
+
begin
|
|
2051
|
+
# Update Role
|
|
2052
|
+
result = api_instance.update_role_roles_role_id_put(role_id, role_update)
|
|
2053
|
+
p result
|
|
2054
|
+
rescue KeyNetra::ApiError => e
|
|
2055
|
+
puts "Error when calling ManagementApi->update_role_roles_role_id_put: #{e}"
|
|
2056
|
+
end
|
|
2057
|
+
```
|
|
2058
|
+
|
|
2059
|
+
#### Using the update_role_roles_role_id_put_with_http_info variant
|
|
2060
|
+
|
|
2061
|
+
This returns an Array which contains the response data, status code and headers.
|
|
2062
|
+
|
|
2063
|
+
> <Array(<RoleOut>, Integer, Hash)> update_role_roles_role_id_put_with_http_info(role_id, role_update)
|
|
2064
|
+
|
|
2065
|
+
```ruby
|
|
2066
|
+
begin
|
|
2067
|
+
# Update Role
|
|
2068
|
+
data, status_code, headers = api_instance.update_role_roles_role_id_put_with_http_info(role_id, role_update)
|
|
2069
|
+
p status_code # => 2xx
|
|
2070
|
+
p headers # => { ... }
|
|
2071
|
+
p data # => <RoleOut>
|
|
2072
|
+
rescue KeyNetra::ApiError => e
|
|
2073
|
+
puts "Error when calling ManagementApi->update_role_roles_role_id_put_with_http_info: #{e}"
|
|
2074
|
+
end
|
|
2075
|
+
```
|
|
2076
|
+
|
|
2077
|
+
### Parameters
|
|
2078
|
+
|
|
2079
|
+
| Name | Type | Description | Notes |
|
|
2080
|
+
| ---- | ---- | ----------- | ----- |
|
|
2081
|
+
| **role_id** | **Integer** | | |
|
|
2082
|
+
| **role_update** | [**RoleUpdate**](RoleUpdate.md) | | |
|
|
2083
|
+
|
|
2084
|
+
### Return type
|
|
2085
|
+
|
|
2086
|
+
[**RoleOut**](RoleOut.md)
|
|
2087
|
+
|
|
2088
|
+
### Authorization
|
|
2089
|
+
|
|
2090
|
+
[APIKeyHeader](../README.md#APIKeyHeader), [HTTPBearer](../README.md#HTTPBearer)
|
|
2091
|
+
|
|
2092
|
+
### HTTP request headers
|
|
2093
|
+
|
|
2094
|
+
- **Content-Type**: application/json
|
|
2095
|
+
- **Accept**: application/json
|
|
2096
|
+
|