pds-metronome 0.1.0
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 +164 -0
- data/Rakefile +10 -0
- data/docs/AccessManagementApi.md +300 -0
- data/docs/AccessType.md +15 -0
- data/docs/AgingOffsetUnit.md +15 -0
- data/docs/AgingStrategy.md +15 -0
- data/docs/ApiKeyData.md +28 -0
- data/docs/ApiKeyDataListResponse.md +20 -0
- data/docs/ApiKeyListResponse.md +20 -0
- data/docs/CreateApiKeyRequest.md +22 -0
- data/docs/CreateOrModifyApiKeyResponse.md +22 -0
- data/docs/CreateOrModifyPolicyRequest.md +22 -0
- data/docs/CreateOrModifyPolicyResponse.md +20 -0
- data/docs/DataExpiryApi.md +79 -0
- data/docs/ExpireItemResponse.md +20 -0
- data/docs/ExpireSubItemResponse.md +22 -0
- data/docs/ExpiryResponse.md +22 -0
- data/docs/ExpiryResponsePendingInner.md +79 -0
- data/docs/GetManyApiKeys200Response.md +79 -0
- data/docs/GetManyPolicies200Response.md +79 -0
- data/docs/ItemAccessApi.md +605 -0
- data/docs/ItemExpiry.md +20 -0
- data/docs/ItemMetadataResponse.md +28 -0
- data/docs/ItemOrSubItemAccessLog.md +32 -0
- data/docs/ItemOrSubItemPolicyResponse.md +22 -0
- data/docs/ModifyApiKeyRequest.md +20 -0
- data/docs/Permission.md +15 -0
- data/docs/PermissionDeniedResponse.md +30 -0
- data/docs/PolicyData.md +26 -0
- data/docs/PolicyDataListResponse.md +28 -0
- data/docs/PolicyListResponse.md +28 -0
- data/docs/PolicyManagementApi.md +379 -0
- data/docs/PutApiKeyRequest.md +49 -0
- data/docs/SignupRequest.md +18 -0
- data/docs/SignupResponse.md +24 -0
- data/docs/SubItemMetadataResponse.md +22 -0
- data/docs/SubItemsExpiry.md +22 -0
- data/docs/TelemetryApi.md +80 -0
- data/docs/TelemetryObservation.md +20 -0
- data/docs/TelemetryRequest.md +22 -0
- data/docs/ValidationErrorResponseInner.md +22 -0
- data/docs/ValidationProblem.md +22 -0
- data/lib/metronome/api/access_management_api.rb +285 -0
- data/lib/metronome/api/data_expiry_api.rb +105 -0
- data/lib/metronome/api/item_access_api.rb +549 -0
- data/lib/metronome/api/policy_management_api.rb +348 -0
- data/lib/metronome/api/telemetry_api.rb +84 -0
- data/lib/metronome/api_client.rb +393 -0
- data/lib/metronome/api_error.rb +58 -0
- data/lib/metronome/configuration.rb +312 -0
- data/lib/metronome/models/access_type.rb +41 -0
- data/lib/metronome/models/aging_offset_unit.rb +41 -0
- data/lib/metronome/models/aging_strategy.rb +40 -0
- data/lib/metronome/models/api_key_data.rb +330 -0
- data/lib/metronome/models/api_key_data_list_response.rb +241 -0
- data/lib/metronome/models/api_key_list_response.rb +241 -0
- data/lib/metronome/models/create_api_key_request.rb +239 -0
- data/lib/metronome/models/create_or_modify_api_key_response.rb +255 -0
- data/lib/metronome/models/create_or_modify_policy_request.rb +293 -0
- data/lib/metronome/models/create_or_modify_policy_response.rb +240 -0
- data/lib/metronome/models/expire_item_response.rb +240 -0
- data/lib/metronome/models/expire_sub_item_response.rb +254 -0
- data/lib/metronome/models/expiry_response.rb +299 -0
- data/lib/metronome/models/expiry_response_pending_inner.rb +55 -0
- data/lib/metronome/models/get_many_api_keys200_response.rb +55 -0
- data/lib/metronome/models/get_many_policies200_response.rb +55 -0
- data/lib/metronome/models/item_expiry.rb +239 -0
- data/lib/metronome/models/item_metadata_response.rb +274 -0
- data/lib/metronome/models/item_or_sub_item_access_log.rb +337 -0
- data/lib/metronome/models/item_or_sub_item_policy_response.rb +245 -0
- data/lib/metronome/models/modify_api_key_request.rb +230 -0
- data/lib/metronome/models/permission.rb +45 -0
- data/lib/metronome/models/permission_denied_response.rb +338 -0
- data/lib/metronome/models/policy_data.rb +364 -0
- data/lib/metronome/models/policy_data_list_response.rb +286 -0
- data/lib/metronome/models/policy_list_response.rb +286 -0
- data/lib/metronome/models/put_api_key_request.rb +105 -0
- data/lib/metronome/models/signup_request.rb +225 -0
- data/lib/metronome/models/signup_response.rb +266 -0
- data/lib/metronome/models/sub_item_metadata_response.rb +245 -0
- data/lib/metronome/models/sub_items_expiry.rb +255 -0
- data/lib/metronome/models/telemetry_observation.rb +240 -0
- data/lib/metronome/models/telemetry_request.rb +259 -0
- data/lib/metronome/models/validation_error_response_inner.rb +254 -0
- data/lib/metronome/models/validation_problem.rb +254 -0
- data/lib/metronome/version.rb +15 -0
- data/lib/metronome.rb +80 -0
- data/shell.nix +6 -0
- data/spec/api/access_management_api_spec.rb +82 -0
- data/spec/api/data_expiry_api_spec.rb +46 -0
- data/spec/api/item_access_api_spec.rb +132 -0
- data/spec/api/policy_management_api_spec.rb +94 -0
- data/spec/api/telemetry_api_spec.rb +46 -0
- data/spec/api_client_spec.rb +228 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/access_type_spec.rb +28 -0
- data/spec/models/aging_offset_unit_spec.rb +28 -0
- data/spec/models/aging_strategy_spec.rb +28 -0
- data/spec/models/api_key_data_list_response_spec.rb +40 -0
- data/spec/models/api_key_data_spec.rb +68 -0
- data/spec/models/api_key_list_response_spec.rb +40 -0
- data/spec/models/create_api_key_request_spec.rb +46 -0
- data/spec/models/create_or_modify_api_key_response_spec.rb +46 -0
- data/spec/models/create_or_modify_policy_request_spec.rb +46 -0
- data/spec/models/create_or_modify_policy_response_spec.rb +40 -0
- data/spec/models/expire_item_response_spec.rb +40 -0
- data/spec/models/expire_sub_item_response_spec.rb +46 -0
- data/spec/models/expiry_response_pending_inner_spec.rb +43 -0
- data/spec/models/expiry_response_spec.rb +46 -0
- data/spec/models/get_many_api_keys200_response_spec.rb +43 -0
- data/spec/models/get_many_policies200_response_spec.rb +43 -0
- data/spec/models/item_expiry_spec.rb +40 -0
- data/spec/models/item_metadata_response_spec.rb +64 -0
- data/spec/models/item_or_sub_item_access_log_spec.rb +76 -0
- data/spec/models/item_or_sub_item_policy_response_spec.rb +46 -0
- data/spec/models/modify_api_key_request_spec.rb +40 -0
- data/spec/models/permission_denied_response_spec.rb +82 -0
- data/spec/models/permission_spec.rb +28 -0
- data/spec/models/policy_data_list_response_spec.rb +64 -0
- data/spec/models/policy_data_spec.rb +58 -0
- data/spec/models/policy_list_response_spec.rb +64 -0
- data/spec/models/put_api_key_request_spec.rb +31 -0
- data/spec/models/signup_request_spec.rb +34 -0
- data/spec/models/signup_response_spec.rb +52 -0
- data/spec/models/sub_item_metadata_response_spec.rb +46 -0
- data/spec/models/sub_items_expiry_spec.rb +46 -0
- data/spec/models/telemetry_observation_spec.rb +40 -0
- data/spec/models/telemetry_request_spec.rb +46 -0
- data/spec/models/validation_error_response_inner_spec.rb +46 -0
- data/spec/models/validation_problem_spec.rb +46 -0
- data/spec/spec_helper.rb +111 -0
- metadata +260 -0
|
@@ -0,0 +1,605 @@
|
|
|
1
|
+
# Metronome::ItemAccessApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://YOUR-CUSTOMER-ID.api.eu-north-1.privatedataservices.com*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**expire_item**](ItemAccessApi.md#expire_item) | **DELETE** /v1/metronome/items/{item-id} | |
|
|
8
|
+
| [**expire_sub_item**](ItemAccessApi.md#expire_sub_item) | **DELETE** /v1/metronome/items/{item-id}/{sub-item-id} | |
|
|
9
|
+
| [**get_item_log**](ItemAccessApi.md#get_item_log) | **GET** /v1/metronome/items/{item-id}/log | |
|
|
10
|
+
| [**get_item_metadata**](ItemAccessApi.md#get_item_metadata) | **GET** /v1/metronome/items/{item-id} | |
|
|
11
|
+
| [**get_item_policies**](ItemAccessApi.md#get_item_policies) | **GET** /v1/metronome/items/{item-id}/policies | |
|
|
12
|
+
| [**get_sub_item_log**](ItemAccessApi.md#get_sub_item_log) | **GET** /v1/metronome/items/{item-id}/{sub-item-id}/log | |
|
|
13
|
+
| [**get_sub_item_metadata**](ItemAccessApi.md#get_sub_item_metadata) | **GET** /v1/metronome/items/{item-id}/{sub-item-id} | |
|
|
14
|
+
| [**get_sub_item_policies**](ItemAccessApi.md#get_sub_item_policies) | **GET** /v1/metronome/items/{item-id}/{sub-item-id}/policies | |
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## expire_item
|
|
18
|
+
|
|
19
|
+
> <ExpireItemResponse> expire_item(item_id)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
Expire an item and its sub-items immediately
|
|
24
|
+
|
|
25
|
+
### Examples
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
require 'time'
|
|
29
|
+
require 'metronome'
|
|
30
|
+
# setup authorization
|
|
31
|
+
Metronome.configure do |config|
|
|
32
|
+
# Configure API key authorization: ApiKeyAuth
|
|
33
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
34
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
35
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
api_instance = Metronome::ItemAccessApi.new
|
|
39
|
+
item_id = 'item_id_example' # String | The ID of the item being expired
|
|
40
|
+
|
|
41
|
+
begin
|
|
42
|
+
|
|
43
|
+
result = api_instance.expire_item(item_id)
|
|
44
|
+
p result
|
|
45
|
+
rescue Metronome::ApiError => e
|
|
46
|
+
puts "Error when calling ItemAccessApi->expire_item: #{e}"
|
|
47
|
+
end
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
#### Using the expire_item_with_http_info variant
|
|
51
|
+
|
|
52
|
+
This returns an Array which contains the response data, status code and headers.
|
|
53
|
+
|
|
54
|
+
> <Array(<ExpireItemResponse>, Integer, Hash)> expire_item_with_http_info(item_id)
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
begin
|
|
58
|
+
|
|
59
|
+
data, status_code, headers = api_instance.expire_item_with_http_info(item_id)
|
|
60
|
+
p status_code # => 2xx
|
|
61
|
+
p headers # => { ... }
|
|
62
|
+
p data # => <ExpireItemResponse>
|
|
63
|
+
rescue Metronome::ApiError => e
|
|
64
|
+
puts "Error when calling ItemAccessApi->expire_item_with_http_info: #{e}"
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Parameters
|
|
69
|
+
|
|
70
|
+
| Name | Type | Description | Notes |
|
|
71
|
+
| ---- | ---- | ----------- | ----- |
|
|
72
|
+
| **item_id** | **String** | The ID of the item being expired | |
|
|
73
|
+
|
|
74
|
+
### Return type
|
|
75
|
+
|
|
76
|
+
[**ExpireItemResponse**](ExpireItemResponse.md)
|
|
77
|
+
|
|
78
|
+
### Authorization
|
|
79
|
+
|
|
80
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
81
|
+
|
|
82
|
+
### HTTP request headers
|
|
83
|
+
|
|
84
|
+
- **Content-Type**: Not defined
|
|
85
|
+
- **Accept**: application/json
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## expire_sub_item
|
|
89
|
+
|
|
90
|
+
> <ExpireSubItemResponse> expire_sub_item(item_id, sub_item_id)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
Expire a sub-item immediately
|
|
95
|
+
|
|
96
|
+
### Examples
|
|
97
|
+
|
|
98
|
+
```ruby
|
|
99
|
+
require 'time'
|
|
100
|
+
require 'metronome'
|
|
101
|
+
# setup authorization
|
|
102
|
+
Metronome.configure do |config|
|
|
103
|
+
# Configure API key authorization: ApiKeyAuth
|
|
104
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
105
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
106
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
api_instance = Metronome::ItemAccessApi.new
|
|
110
|
+
item_id = 'item_id_example' # String | The parent item ID of the sub-item being expired
|
|
111
|
+
sub_item_id = 'sub_item_id_example' # String | The sub-item ID being expired
|
|
112
|
+
|
|
113
|
+
begin
|
|
114
|
+
|
|
115
|
+
result = api_instance.expire_sub_item(item_id, sub_item_id)
|
|
116
|
+
p result
|
|
117
|
+
rescue Metronome::ApiError => e
|
|
118
|
+
puts "Error when calling ItemAccessApi->expire_sub_item: #{e}"
|
|
119
|
+
end
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
#### Using the expire_sub_item_with_http_info variant
|
|
123
|
+
|
|
124
|
+
This returns an Array which contains the response data, status code and headers.
|
|
125
|
+
|
|
126
|
+
> <Array(<ExpireSubItemResponse>, Integer, Hash)> expire_sub_item_with_http_info(item_id, sub_item_id)
|
|
127
|
+
|
|
128
|
+
```ruby
|
|
129
|
+
begin
|
|
130
|
+
|
|
131
|
+
data, status_code, headers = api_instance.expire_sub_item_with_http_info(item_id, sub_item_id)
|
|
132
|
+
p status_code # => 2xx
|
|
133
|
+
p headers # => { ... }
|
|
134
|
+
p data # => <ExpireSubItemResponse>
|
|
135
|
+
rescue Metronome::ApiError => e
|
|
136
|
+
puts "Error when calling ItemAccessApi->expire_sub_item_with_http_info: #{e}"
|
|
137
|
+
end
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Parameters
|
|
141
|
+
|
|
142
|
+
| Name | Type | Description | Notes |
|
|
143
|
+
| ---- | ---- | ----------- | ----- |
|
|
144
|
+
| **item_id** | **String** | The parent item ID of the sub-item being expired | |
|
|
145
|
+
| **sub_item_id** | **String** | The sub-item ID being expired | |
|
|
146
|
+
|
|
147
|
+
### Return type
|
|
148
|
+
|
|
149
|
+
[**ExpireSubItemResponse**](ExpireSubItemResponse.md)
|
|
150
|
+
|
|
151
|
+
### Authorization
|
|
152
|
+
|
|
153
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
154
|
+
|
|
155
|
+
### HTTP request headers
|
|
156
|
+
|
|
157
|
+
- **Content-Type**: Not defined
|
|
158
|
+
- **Accept**: application/json
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
## get_item_log
|
|
162
|
+
|
|
163
|
+
> <ItemOrSubItemAccessLog> get_item_log(item_id, opts)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
Read a specific item's access log
|
|
168
|
+
|
|
169
|
+
### Examples
|
|
170
|
+
|
|
171
|
+
```ruby
|
|
172
|
+
require 'time'
|
|
173
|
+
require 'metronome'
|
|
174
|
+
# setup authorization
|
|
175
|
+
Metronome.configure do |config|
|
|
176
|
+
# Configure API key authorization: ApiKeyAuth
|
|
177
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
178
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
179
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
api_instance = Metronome::ItemAccessApi.new
|
|
183
|
+
item_id = 'item_id_example' # String | The ID of the item to be read
|
|
184
|
+
opts = {
|
|
185
|
+
start_date: true, # Boolean | Mutually exclusive with specifying the specific sub-items to read.
|
|
186
|
+
end_date: true # Boolean |
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
begin
|
|
190
|
+
|
|
191
|
+
result = api_instance.get_item_log(item_id, opts)
|
|
192
|
+
p result
|
|
193
|
+
rescue Metronome::ApiError => e
|
|
194
|
+
puts "Error when calling ItemAccessApi->get_item_log: #{e}"
|
|
195
|
+
end
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
#### Using the get_item_log_with_http_info variant
|
|
199
|
+
|
|
200
|
+
This returns an Array which contains the response data, status code and headers.
|
|
201
|
+
|
|
202
|
+
> <Array(<ItemOrSubItemAccessLog>, Integer, Hash)> get_item_log_with_http_info(item_id, opts)
|
|
203
|
+
|
|
204
|
+
```ruby
|
|
205
|
+
begin
|
|
206
|
+
|
|
207
|
+
data, status_code, headers = api_instance.get_item_log_with_http_info(item_id, opts)
|
|
208
|
+
p status_code # => 2xx
|
|
209
|
+
p headers # => { ... }
|
|
210
|
+
p data # => <ItemOrSubItemAccessLog>
|
|
211
|
+
rescue Metronome::ApiError => e
|
|
212
|
+
puts "Error when calling ItemAccessApi->get_item_log_with_http_info: #{e}"
|
|
213
|
+
end
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Parameters
|
|
217
|
+
|
|
218
|
+
| Name | Type | Description | Notes |
|
|
219
|
+
| ---- | ---- | ----------- | ----- |
|
|
220
|
+
| **item_id** | **String** | The ID of the item to be read | |
|
|
221
|
+
| **start_date** | **Boolean** | Mutually exclusive with specifying the specific sub-items to read. | [optional] |
|
|
222
|
+
| **end_date** | **Boolean** | | [optional] |
|
|
223
|
+
|
|
224
|
+
### Return type
|
|
225
|
+
|
|
226
|
+
[**ItemOrSubItemAccessLog**](ItemOrSubItemAccessLog.md)
|
|
227
|
+
|
|
228
|
+
### Authorization
|
|
229
|
+
|
|
230
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
231
|
+
|
|
232
|
+
### HTTP request headers
|
|
233
|
+
|
|
234
|
+
- **Content-Type**: Not defined
|
|
235
|
+
- **Accept**: application/json
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
## get_item_metadata
|
|
239
|
+
|
|
240
|
+
> <ItemMetadataResponse> get_item_metadata(item_id, opts)
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
Read a specific item's metadata with or without any sub-items.
|
|
245
|
+
|
|
246
|
+
### Examples
|
|
247
|
+
|
|
248
|
+
```ruby
|
|
249
|
+
require 'time'
|
|
250
|
+
require 'metronome'
|
|
251
|
+
# setup authorization
|
|
252
|
+
Metronome.configure do |config|
|
|
253
|
+
# Configure API key authorization: ApiKeyAuth
|
|
254
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
255
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
256
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
api_instance = Metronome::ItemAccessApi.new
|
|
260
|
+
item_id = 'item_id_example' # String | The ID of the item to be read
|
|
261
|
+
opts = {
|
|
262
|
+
all_sub_items: true, # Boolean | Mutually exclusive with specifying the specific sub-items to read.
|
|
263
|
+
no_item_content: true, # Boolean |
|
|
264
|
+
sub_item: ['inner_example'] # Array<String> | Mutually exclusive with all-sub-items=true. If you only wish to read a few specific sub-items with this item, include each sub-item name in multiple form parameters eg https://url/v1/metronome/items/customer-123?sub-item=email&sub-item=mobile-phone&sub-item=address
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
begin
|
|
268
|
+
|
|
269
|
+
result = api_instance.get_item_metadata(item_id, opts)
|
|
270
|
+
p result
|
|
271
|
+
rescue Metronome::ApiError => e
|
|
272
|
+
puts "Error when calling ItemAccessApi->get_item_metadata: #{e}"
|
|
273
|
+
end
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
#### Using the get_item_metadata_with_http_info variant
|
|
277
|
+
|
|
278
|
+
This returns an Array which contains the response data, status code and headers.
|
|
279
|
+
|
|
280
|
+
> <Array(<ItemMetadataResponse>, Integer, Hash)> get_item_metadata_with_http_info(item_id, opts)
|
|
281
|
+
|
|
282
|
+
```ruby
|
|
283
|
+
begin
|
|
284
|
+
|
|
285
|
+
data, status_code, headers = api_instance.get_item_metadata_with_http_info(item_id, opts)
|
|
286
|
+
p status_code # => 2xx
|
|
287
|
+
p headers # => { ... }
|
|
288
|
+
p data # => <ItemMetadataResponse>
|
|
289
|
+
rescue Metronome::ApiError => e
|
|
290
|
+
puts "Error when calling ItemAccessApi->get_item_metadata_with_http_info: #{e}"
|
|
291
|
+
end
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
### Parameters
|
|
295
|
+
|
|
296
|
+
| Name | Type | Description | Notes |
|
|
297
|
+
| ---- | ---- | ----------- | ----- |
|
|
298
|
+
| **item_id** | **String** | The ID of the item to be read | |
|
|
299
|
+
| **all_sub_items** | **Boolean** | Mutually exclusive with specifying the specific sub-items to read. | [optional] |
|
|
300
|
+
| **no_item_content** | **Boolean** | | [optional] |
|
|
301
|
+
| **sub_item** | [**Array<String>**](String.md) | Mutually exclusive with all-sub-items=true. If you only wish to read a few specific sub-items with this item, include each sub-item name in multiple form parameters eg https://url/v1/metronome/items/customer-123?sub-item=email&sub-item=mobile-phone&sub-item=address | [optional] |
|
|
302
|
+
|
|
303
|
+
### Return type
|
|
304
|
+
|
|
305
|
+
[**ItemMetadataResponse**](ItemMetadataResponse.md)
|
|
306
|
+
|
|
307
|
+
### Authorization
|
|
308
|
+
|
|
309
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
310
|
+
|
|
311
|
+
### HTTP request headers
|
|
312
|
+
|
|
313
|
+
- **Content-Type**: Not defined
|
|
314
|
+
- **Accept**: application/json
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
## get_item_policies
|
|
318
|
+
|
|
319
|
+
> <ItemOrSubItemPolicyResponse> get_item_policies(item_id)
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
Read which policies have been applied to a specific item
|
|
324
|
+
|
|
325
|
+
### Examples
|
|
326
|
+
|
|
327
|
+
```ruby
|
|
328
|
+
require 'time'
|
|
329
|
+
require 'metronome'
|
|
330
|
+
# setup authorization
|
|
331
|
+
Metronome.configure do |config|
|
|
332
|
+
# Configure API key authorization: ApiKeyAuth
|
|
333
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
334
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
335
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
api_instance = Metronome::ItemAccessApi.new
|
|
339
|
+
item_id = 'item_id_example' # String | The ID of the item to be read
|
|
340
|
+
|
|
341
|
+
begin
|
|
342
|
+
|
|
343
|
+
result = api_instance.get_item_policies(item_id)
|
|
344
|
+
p result
|
|
345
|
+
rescue Metronome::ApiError => e
|
|
346
|
+
puts "Error when calling ItemAccessApi->get_item_policies: #{e}"
|
|
347
|
+
end
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
#### Using the get_item_policies_with_http_info variant
|
|
351
|
+
|
|
352
|
+
This returns an Array which contains the response data, status code and headers.
|
|
353
|
+
|
|
354
|
+
> <Array(<ItemOrSubItemPolicyResponse>, Integer, Hash)> get_item_policies_with_http_info(item_id)
|
|
355
|
+
|
|
356
|
+
```ruby
|
|
357
|
+
begin
|
|
358
|
+
|
|
359
|
+
data, status_code, headers = api_instance.get_item_policies_with_http_info(item_id)
|
|
360
|
+
p status_code # => 2xx
|
|
361
|
+
p headers # => { ... }
|
|
362
|
+
p data # => <ItemOrSubItemPolicyResponse>
|
|
363
|
+
rescue Metronome::ApiError => e
|
|
364
|
+
puts "Error when calling ItemAccessApi->get_item_policies_with_http_info: #{e}"
|
|
365
|
+
end
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### Parameters
|
|
369
|
+
|
|
370
|
+
| Name | Type | Description | Notes |
|
|
371
|
+
| ---- | ---- | ----------- | ----- |
|
|
372
|
+
| **item_id** | **String** | The ID of the item to be read | |
|
|
373
|
+
|
|
374
|
+
### Return type
|
|
375
|
+
|
|
376
|
+
[**ItemOrSubItemPolicyResponse**](ItemOrSubItemPolicyResponse.md)
|
|
377
|
+
|
|
378
|
+
### Authorization
|
|
379
|
+
|
|
380
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
381
|
+
|
|
382
|
+
### HTTP request headers
|
|
383
|
+
|
|
384
|
+
- **Content-Type**: Not defined
|
|
385
|
+
- **Accept**: application/json
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
## get_sub_item_log
|
|
389
|
+
|
|
390
|
+
> <ItemOrSubItemAccessLog> get_sub_item_log(item_id, sub_item_id)
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
Read a specific sub-item's access log
|
|
395
|
+
|
|
396
|
+
### Examples
|
|
397
|
+
|
|
398
|
+
```ruby
|
|
399
|
+
require 'time'
|
|
400
|
+
require 'metronome'
|
|
401
|
+
# setup authorization
|
|
402
|
+
Metronome.configure do |config|
|
|
403
|
+
# Configure API key authorization: ApiKeyAuth
|
|
404
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
405
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
406
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
407
|
+
end
|
|
408
|
+
|
|
409
|
+
api_instance = Metronome::ItemAccessApi.new
|
|
410
|
+
item_id = 'item_id_example' # String | The parent item ID of the sub-item being read
|
|
411
|
+
sub_item_id = 'sub_item_id_example' # String | The sub-item ID to be read
|
|
412
|
+
|
|
413
|
+
begin
|
|
414
|
+
|
|
415
|
+
result = api_instance.get_sub_item_log(item_id, sub_item_id)
|
|
416
|
+
p result
|
|
417
|
+
rescue Metronome::ApiError => e
|
|
418
|
+
puts "Error when calling ItemAccessApi->get_sub_item_log: #{e}"
|
|
419
|
+
end
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
#### Using the get_sub_item_log_with_http_info variant
|
|
423
|
+
|
|
424
|
+
This returns an Array which contains the response data, status code and headers.
|
|
425
|
+
|
|
426
|
+
> <Array(<ItemOrSubItemAccessLog>, Integer, Hash)> get_sub_item_log_with_http_info(item_id, sub_item_id)
|
|
427
|
+
|
|
428
|
+
```ruby
|
|
429
|
+
begin
|
|
430
|
+
|
|
431
|
+
data, status_code, headers = api_instance.get_sub_item_log_with_http_info(item_id, sub_item_id)
|
|
432
|
+
p status_code # => 2xx
|
|
433
|
+
p headers # => { ... }
|
|
434
|
+
p data # => <ItemOrSubItemAccessLog>
|
|
435
|
+
rescue Metronome::ApiError => e
|
|
436
|
+
puts "Error when calling ItemAccessApi->get_sub_item_log_with_http_info: #{e}"
|
|
437
|
+
end
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
### Parameters
|
|
441
|
+
|
|
442
|
+
| Name | Type | Description | Notes |
|
|
443
|
+
| ---- | ---- | ----------- | ----- |
|
|
444
|
+
| **item_id** | **String** | The parent item ID of the sub-item being read | |
|
|
445
|
+
| **sub_item_id** | **String** | The sub-item ID to be read | |
|
|
446
|
+
|
|
447
|
+
### Return type
|
|
448
|
+
|
|
449
|
+
[**ItemOrSubItemAccessLog**](ItemOrSubItemAccessLog.md)
|
|
450
|
+
|
|
451
|
+
### Authorization
|
|
452
|
+
|
|
453
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
454
|
+
|
|
455
|
+
### HTTP request headers
|
|
456
|
+
|
|
457
|
+
- **Content-Type**: Not defined
|
|
458
|
+
- **Accept**: application/json
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
## get_sub_item_metadata
|
|
462
|
+
|
|
463
|
+
> <SubItemMetadataResponse> get_sub_item_metadata(item_id, sub_item_id)
|
|
464
|
+
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
Read a specific sub-item's metadata
|
|
468
|
+
|
|
469
|
+
### Examples
|
|
470
|
+
|
|
471
|
+
```ruby
|
|
472
|
+
require 'time'
|
|
473
|
+
require 'metronome'
|
|
474
|
+
# setup authorization
|
|
475
|
+
Metronome.configure do |config|
|
|
476
|
+
# Configure API key authorization: ApiKeyAuth
|
|
477
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
478
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
479
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
api_instance = Metronome::ItemAccessApi.new
|
|
483
|
+
item_id = 'item_id_example' # String | The parent item ID of the sub-item being read
|
|
484
|
+
sub_item_id = 'sub_item_id_example' # String | The sub-item ID to be read
|
|
485
|
+
|
|
486
|
+
begin
|
|
487
|
+
|
|
488
|
+
result = api_instance.get_sub_item_metadata(item_id, sub_item_id)
|
|
489
|
+
p result
|
|
490
|
+
rescue Metronome::ApiError => e
|
|
491
|
+
puts "Error when calling ItemAccessApi->get_sub_item_metadata: #{e}"
|
|
492
|
+
end
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
#### Using the get_sub_item_metadata_with_http_info variant
|
|
496
|
+
|
|
497
|
+
This returns an Array which contains the response data, status code and headers.
|
|
498
|
+
|
|
499
|
+
> <Array(<SubItemMetadataResponse>, Integer, Hash)> get_sub_item_metadata_with_http_info(item_id, sub_item_id)
|
|
500
|
+
|
|
501
|
+
```ruby
|
|
502
|
+
begin
|
|
503
|
+
|
|
504
|
+
data, status_code, headers = api_instance.get_sub_item_metadata_with_http_info(item_id, sub_item_id)
|
|
505
|
+
p status_code # => 2xx
|
|
506
|
+
p headers # => { ... }
|
|
507
|
+
p data # => <SubItemMetadataResponse>
|
|
508
|
+
rescue Metronome::ApiError => e
|
|
509
|
+
puts "Error when calling ItemAccessApi->get_sub_item_metadata_with_http_info: #{e}"
|
|
510
|
+
end
|
|
511
|
+
```
|
|
512
|
+
|
|
513
|
+
### Parameters
|
|
514
|
+
|
|
515
|
+
| Name | Type | Description | Notes |
|
|
516
|
+
| ---- | ---- | ----------- | ----- |
|
|
517
|
+
| **item_id** | **String** | The parent item ID of the sub-item being read | |
|
|
518
|
+
| **sub_item_id** | **String** | The sub-item ID to be read | |
|
|
519
|
+
|
|
520
|
+
### Return type
|
|
521
|
+
|
|
522
|
+
[**SubItemMetadataResponse**](SubItemMetadataResponse.md)
|
|
523
|
+
|
|
524
|
+
### Authorization
|
|
525
|
+
|
|
526
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
527
|
+
|
|
528
|
+
### HTTP request headers
|
|
529
|
+
|
|
530
|
+
- **Content-Type**: Not defined
|
|
531
|
+
- **Accept**: application/json
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
## get_sub_item_policies
|
|
535
|
+
|
|
536
|
+
> <ItemOrSubItemPolicyResponse> get_sub_item_policies(item_id, sub_item_id)
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
|
|
540
|
+
Read which policies have been applied to a specific sub-item
|
|
541
|
+
|
|
542
|
+
### Examples
|
|
543
|
+
|
|
544
|
+
```ruby
|
|
545
|
+
require 'time'
|
|
546
|
+
require 'metronome'
|
|
547
|
+
# setup authorization
|
|
548
|
+
Metronome.configure do |config|
|
|
549
|
+
# Configure API key authorization: ApiKeyAuth
|
|
550
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
551
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
552
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
api_instance = Metronome::ItemAccessApi.new
|
|
556
|
+
item_id = 'item_id_example' # String | The parent item ID of the sub-item being read
|
|
557
|
+
sub_item_id = 'sub_item_id_example' # String | The sub-item ID to be read
|
|
558
|
+
|
|
559
|
+
begin
|
|
560
|
+
|
|
561
|
+
result = api_instance.get_sub_item_policies(item_id, sub_item_id)
|
|
562
|
+
p result
|
|
563
|
+
rescue Metronome::ApiError => e
|
|
564
|
+
puts "Error when calling ItemAccessApi->get_sub_item_policies: #{e}"
|
|
565
|
+
end
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
#### Using the get_sub_item_policies_with_http_info variant
|
|
569
|
+
|
|
570
|
+
This returns an Array which contains the response data, status code and headers.
|
|
571
|
+
|
|
572
|
+
> <Array(<ItemOrSubItemPolicyResponse>, Integer, Hash)> get_sub_item_policies_with_http_info(item_id, sub_item_id)
|
|
573
|
+
|
|
574
|
+
```ruby
|
|
575
|
+
begin
|
|
576
|
+
|
|
577
|
+
data, status_code, headers = api_instance.get_sub_item_policies_with_http_info(item_id, sub_item_id)
|
|
578
|
+
p status_code # => 2xx
|
|
579
|
+
p headers # => { ... }
|
|
580
|
+
p data # => <ItemOrSubItemPolicyResponse>
|
|
581
|
+
rescue Metronome::ApiError => e
|
|
582
|
+
puts "Error when calling ItemAccessApi->get_sub_item_policies_with_http_info: #{e}"
|
|
583
|
+
end
|
|
584
|
+
```
|
|
585
|
+
|
|
586
|
+
### Parameters
|
|
587
|
+
|
|
588
|
+
| Name | Type | Description | Notes |
|
|
589
|
+
| ---- | ---- | ----------- | ----- |
|
|
590
|
+
| **item_id** | **String** | The parent item ID of the sub-item being read | |
|
|
591
|
+
| **sub_item_id** | **String** | The sub-item ID to be read | |
|
|
592
|
+
|
|
593
|
+
### Return type
|
|
594
|
+
|
|
595
|
+
[**ItemOrSubItemPolicyResponse**](ItemOrSubItemPolicyResponse.md)
|
|
596
|
+
|
|
597
|
+
### Authorization
|
|
598
|
+
|
|
599
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
600
|
+
|
|
601
|
+
### HTTP request headers
|
|
602
|
+
|
|
603
|
+
- **Content-Type**: Not defined
|
|
604
|
+
- **Accept**: application/json
|
|
605
|
+
|
data/docs/ItemExpiry.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Metronome::ItemExpiry
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **expiry_type** | **String** | Always the value \"ItemExpiry\" | |
|
|
8
|
+
| **item_id** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'metronome'
|
|
14
|
+
|
|
15
|
+
instance = Metronome::ItemExpiry.new(
|
|
16
|
+
expiry_type: null,
|
|
17
|
+
item_id: customer-123
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Metronome::ItemMetadataResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **expired** | **Boolean** | Present and true only when the item has expired | [optional] |
|
|
8
|
+
| **sub_items** | **Hash<String, Object>** | Each requested sub-item with it's own value | [optional] |
|
|
9
|
+
| **expired_sub_item_ids** | **Array<String>** | | [optional] |
|
|
10
|
+
| **sub_items_not_present** | **Array<String>** | | [optional] |
|
|
11
|
+
| **policy_id** | **String** | The policy which currently governs how long this item will be retained | [optional] |
|
|
12
|
+
| **expiry_date** | **Date** | The date at which this item will expire if it is not used again | [optional] |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'metronome'
|
|
18
|
+
|
|
19
|
+
instance = Metronome::ItemMetadataResponse.new(
|
|
20
|
+
expired: null,
|
|
21
|
+
sub_items: {"email":"person@domain.com","mobile-phone":"0123456789"},
|
|
22
|
+
expired_sub_item_ids: null,
|
|
23
|
+
sub_items_not_present: null,
|
|
24
|
+
policy_id: null,
|
|
25
|
+
expiry_date: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Metronome::ItemOrSubItemAccessLog
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **timestamp** | **Time** | | |
|
|
8
|
+
| **access_type** | [**AccessType**](AccessType.md) | | |
|
|
9
|
+
| **access_authoriser** | **String** | The ID of the system that accessed the data | |
|
|
10
|
+
| **access_policies** | **Array<String>** | | |
|
|
11
|
+
| **effective_expiry_policy** | **String** | The policy which governed data expiry after this data access | |
|
|
12
|
+
| **effective_expiry_date** | **Date** | The date to which this item or sub-item would be retained after this access | [optional] |
|
|
13
|
+
| **accessed_sub_items** | **Array<String>** | | [optional] |
|
|
14
|
+
| **expired** | **Boolean** | Present and true only when the item expired as a result of this access | [optional] |
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'metronome'
|
|
20
|
+
|
|
21
|
+
instance = Metronome::ItemOrSubItemAccessLog.new(
|
|
22
|
+
timestamp: null,
|
|
23
|
+
access_type: null,
|
|
24
|
+
access_authoriser: null,
|
|
25
|
+
access_policies: null,
|
|
26
|
+
effective_expiry_policy: null,
|
|
27
|
+
effective_expiry_date: null,
|
|
28
|
+
accessed_sub_items: null,
|
|
29
|
+
expired: null
|
|
30
|
+
)
|
|
31
|
+
```
|
|
32
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Metronome::ItemOrSubItemPolicyResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **policy_id** | **String** | A policy that was applied to this item or sub-item | |
|
|
8
|
+
| **expiry_date** | **Date** | The date at which this item or sub-item should expire according to this policy | [optional] |
|
|
9
|
+
| **last_application_date** | **Date** | The date at which this policy was last applied to this item or sub-item | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'metronome'
|
|
15
|
+
|
|
16
|
+
instance = Metronome::ItemOrSubItemPolicyResponse.new(
|
|
17
|
+
policy_id: null,
|
|
18
|
+
expiry_date: null,
|
|
19
|
+
last_application_date: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|