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
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: a73ab048b9ca9dc4e2def8388fa821c57d347fdd24bfb0b166939d90c0f5daf9
|
|
4
|
+
data.tar.gz: 7eadb311becdcc4b0c38e3e7ce261a79fb1768ac3550201308583100243002d9
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: de05d823cca88aa3f67c81d7c506843e75caef8d7c5f0cce5cef7afaba27a40d4997f02c1b74bdf9fab0fe59009ef6b121c6b40170777ec2ffac63da2c33f3cd
|
|
7
|
+
data.tar.gz: 5f155f4b375be2df96f855def77fe36d7651162d0856b7ea92f2214a42f8161ade850787502a56c11d19a204d2511923fa72ebfed80539823e9ab26d5cd739cd
|
data/Gemfile
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
# metronome
|
|
2
|
+
|
|
3
|
+
Metronome - the Ruby gem for the Metronome API
|
|
4
|
+
|
|
5
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
6
|
+
|
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
|
+
|
|
9
|
+
- API version: 1.0.0
|
|
10
|
+
- Package version: 1.0.0
|
|
11
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
### From Ruby gems
|
|
16
|
+
|
|
17
|
+
```shell
|
|
18
|
+
gem install ./metronome-1.0.0.gem
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
or add this to your Gemfile:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
gem 'metronome', '~> 1.0.0'
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Build this gem
|
|
28
|
+
|
|
29
|
+
To build the Ruby code into a gem:
|
|
30
|
+
|
|
31
|
+
```shell
|
|
32
|
+
gem build metronome.gemspec
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Then either install the gem locally:
|
|
36
|
+
|
|
37
|
+
(for development, run `gem install --dev ./metronome-1.0.0.gem` to install the development dependencies)
|
|
38
|
+
|
|
39
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
40
|
+
|
|
41
|
+
Finally add this to a Gemfile for a project that depends on this gem:
|
|
42
|
+
|
|
43
|
+
gem 'metronome', '~> 1.0.0'
|
|
44
|
+
|
|
45
|
+
### Install from Git
|
|
46
|
+
|
|
47
|
+
The Ruby gem is hosted at a git repository: https://github.com/Private-Data-Services/metronome-client-libs You can add the following in your Gemfile:
|
|
48
|
+
|
|
49
|
+
gem 'metronome', :git => 'https://github.com/Private-Data-Services/metronome-client-libs/tree/main/ruby'
|
|
50
|
+
|
|
51
|
+
### Include the Ruby code directly
|
|
52
|
+
|
|
53
|
+
Include the Ruby code directly using `-I` as follows:
|
|
54
|
+
|
|
55
|
+
```shell
|
|
56
|
+
ruby -Ilib script.rb
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Getting Started
|
|
60
|
+
|
|
61
|
+
Examples are available in [the ruby client examples folder](https://github.com/Private-Data-Services/metronome-client-libs/tree/main/ruby-examples)
|
|
62
|
+
|
|
63
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
|
64
|
+
|
|
65
|
+
```ruby
|
|
66
|
+
# Load the gem
|
|
67
|
+
require 'metronome'
|
|
68
|
+
|
|
69
|
+
# Setup authorization
|
|
70
|
+
Metronome.configure do |config|
|
|
71
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
72
|
+
config.customer_id = "YOUR-CUSTOMER-ID" # Only characters [a-z0-9\-] allowed. You invent this value to identify your organisation.
|
|
73
|
+
config.region = "eu-north-1" # Select from one of our available regions. Mail info@privatedataservices.com to request a new region.
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
api_instance = Metronome::AccessManagementApi.new
|
|
77
|
+
api_key = 'api_key_example' # String |
|
|
78
|
+
|
|
79
|
+
begin
|
|
80
|
+
result = api_instance.get_api_key(api_key)
|
|
81
|
+
p result
|
|
82
|
+
rescue Metronome::ApiError => e
|
|
83
|
+
puts "Exception when calling AccessManagementApi->get_api_key: #{e}"
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Documentation for API Endpoints
|
|
89
|
+
|
|
90
|
+
All URIs are relative to *https://YOUR-CUSTOMER-ID.api.REGION.privatedataservices.com* You should only need to use or know this value when you use the REST API directly.
|
|
91
|
+
The server name is handled by this client automatically.
|
|
92
|
+
|
|
93
|
+
Class | Method | HTTP request | Description
|
|
94
|
+
------------ | ------------- | ------------- | -------------
|
|
95
|
+
*Metronome::AccessManagementApi* | [**get_api_key**](docs/AccessManagementApi.md#get_api_key) | **GET** /v1/metronome/api-keys/{api-key} |
|
|
96
|
+
*Metronome::AccessManagementApi* | [**get_many_api_keys**](docs/AccessManagementApi.md#get_many_api_keys) | **GET** /v1/metronome/api-keys |
|
|
97
|
+
*Metronome::AccessManagementApi* | [**put_api_key**](docs/AccessManagementApi.md#put_api_key) | **PUT** /v1/metronome/api-keys/{api-key} |
|
|
98
|
+
*Metronome::AccessManagementApi* | [**sign_up**](docs/AccessManagementApi.md#sign_up) | **PUT** /v1/metronome/sign-up |
|
|
99
|
+
*Metronome::DataExpiryApi* | [**get_expiry_notices**](docs/DataExpiryApi.md#get_expiry_notices) | **GET** /v1/metronome/expiry-notices/{date} |
|
|
100
|
+
*Metronome::ItemAccessApi* | [**expire_item**](docs/ItemAccessApi.md#expire_item) | **DELETE** /v1/metronome/items/{item-id} |
|
|
101
|
+
*Metronome::ItemAccessApi* | [**expire_sub_item**](docs/ItemAccessApi.md#expire_sub_item) | **DELETE** /v1/metronome/items/{item-id}/{sub-item-id} |
|
|
102
|
+
*Metronome::ItemAccessApi* | [**get_item_log**](docs/ItemAccessApi.md#get_item_log) | **GET** /v1/metronome/items/{item-id}/log |
|
|
103
|
+
*Metronome::ItemAccessApi* | [**get_item_metadata**](docs/ItemAccessApi.md#get_item_metadata) | **GET** /v1/metronome/items/{item-id} |
|
|
104
|
+
*Metronome::ItemAccessApi* | [**get_item_policies**](docs/ItemAccessApi.md#get_item_policies) | **GET** /v1/metronome/items/{item-id}/policies |
|
|
105
|
+
*Metronome::ItemAccessApi* | [**get_sub_item_log**](docs/ItemAccessApi.md#get_sub_item_log) | **GET** /v1/metronome/items/{item-id}/{sub-item-id}/log |
|
|
106
|
+
*Metronome::ItemAccessApi* | [**get_sub_item_metadata**](docs/ItemAccessApi.md#get_sub_item_metadata) | **GET** /v1/metronome/items/{item-id}/{sub-item-id} |
|
|
107
|
+
*Metronome::ItemAccessApi* | [**get_sub_item_policies**](docs/ItemAccessApi.md#get_sub_item_policies) | **GET** /v1/metronome/items/{item-id}/{sub-item-id}/policies |
|
|
108
|
+
*Metronome::PolicyManagementApi* | [**get_many_policies**](docs/PolicyManagementApi.md#get_many_policies) | **GET** /v1/metronome/policies |
|
|
109
|
+
*Metronome::PolicyManagementApi* | [**get_policy**](docs/PolicyManagementApi.md#get_policy) | **GET** /v1/metronome/policies/{policy-id} |
|
|
110
|
+
*Metronome::PolicyManagementApi* | [**get_policy_log**](docs/PolicyManagementApi.md#get_policy_log) | **GET** /v1/metronome/policies/{policy-id}/log |
|
|
111
|
+
*Metronome::PolicyManagementApi* | [**get_policy_members**](docs/PolicyManagementApi.md#get_policy_members) | **GET** /v1/metronome/policies/{policy-id}/members |
|
|
112
|
+
*Metronome::PolicyManagementApi* | [**put_policy**](docs/PolicyManagementApi.md#put_policy) | **PUT** /v1/metronome/policies/{policy-id} |
|
|
113
|
+
*Metronome::TelemetryApi* | [**post_telemetry**](docs/TelemetryApi.md#post_telemetry) | **POST** /v1/metronome/telemetry |
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
## Documentation for Models
|
|
117
|
+
|
|
118
|
+
- [Metronome::AccessType](docs/AccessType.md)
|
|
119
|
+
- [Metronome::AgingOffsetUnit](docs/AgingOffsetUnit.md)
|
|
120
|
+
- [Metronome::AgingStrategy](docs/AgingStrategy.md)
|
|
121
|
+
- [Metronome::ApiKeyData](docs/ApiKeyData.md)
|
|
122
|
+
- [Metronome::ApiKeyDataListResponse](docs/ApiKeyDataListResponse.md)
|
|
123
|
+
- [Metronome::ApiKeyListResponse](docs/ApiKeyListResponse.md)
|
|
124
|
+
- [Metronome::CreateApiKeyRequest](docs/CreateApiKeyRequest.md)
|
|
125
|
+
- [Metronome::CreateOrModifyApiKeyResponse](docs/CreateOrModifyApiKeyResponse.md)
|
|
126
|
+
- [Metronome::CreateOrModifyPolicyRequest](docs/CreateOrModifyPolicyRequest.md)
|
|
127
|
+
- [Metronome::CreateOrModifyPolicyResponse](docs/CreateOrModifyPolicyResponse.md)
|
|
128
|
+
- [Metronome::ExpireItemResponse](docs/ExpireItemResponse.md)
|
|
129
|
+
- [Metronome::ExpireSubItemResponse](docs/ExpireSubItemResponse.md)
|
|
130
|
+
- [Metronome::ExpiryResponse](docs/ExpiryResponse.md)
|
|
131
|
+
- [Metronome::ExpiryResponsePendingInner](docs/ExpiryResponsePendingInner.md)
|
|
132
|
+
- [Metronome::GetManyApiKeys200Response](docs/GetManyApiKeys200Response.md)
|
|
133
|
+
- [Metronome::GetManyPolicies200Response](docs/GetManyPolicies200Response.md)
|
|
134
|
+
- [Metronome::ItemExpiry](docs/ItemExpiry.md)
|
|
135
|
+
- [Metronome::ItemMetadataResponse](docs/ItemMetadataResponse.md)
|
|
136
|
+
- [Metronome::ItemOrSubItemAccessLog](docs/ItemOrSubItemAccessLog.md)
|
|
137
|
+
- [Metronome::ItemOrSubItemPolicyResponse](docs/ItemOrSubItemPolicyResponse.md)
|
|
138
|
+
- [Metronome::ModifyApiKeyRequest](docs/ModifyApiKeyRequest.md)
|
|
139
|
+
- [Metronome::Permission](docs/Permission.md)
|
|
140
|
+
- [Metronome::PermissionDeniedResponse](docs/PermissionDeniedResponse.md)
|
|
141
|
+
- [Metronome::PolicyData](docs/PolicyData.md)
|
|
142
|
+
- [Metronome::PolicyDataListResponse](docs/PolicyDataListResponse.md)
|
|
143
|
+
- [Metronome::PolicyListResponse](docs/PolicyListResponse.md)
|
|
144
|
+
- [Metronome::PutApiKeyRequest](docs/PutApiKeyRequest.md)
|
|
145
|
+
- [Metronome::SignupRequest](docs/SignupRequest.md)
|
|
146
|
+
- [Metronome::SignupResponse](docs/SignupResponse.md)
|
|
147
|
+
- [Metronome::SubItemMetadataResponse](docs/SubItemMetadataResponse.md)
|
|
148
|
+
- [Metronome::SubItemsExpiry](docs/SubItemsExpiry.md)
|
|
149
|
+
- [Metronome::TelemetryObservation](docs/TelemetryObservation.md)
|
|
150
|
+
- [Metronome::TelemetryRequest](docs/TelemetryRequest.md)
|
|
151
|
+
- [Metronome::ValidationErrorResponseInner](docs/ValidationErrorResponseInner.md)
|
|
152
|
+
- [Metronome::ValidationProblem](docs/ValidationProblem.md)
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
## Documentation for Authorization
|
|
156
|
+
API key must always be set during configuration except for the AccessManagementApi->sign_up call.
|
|
157
|
+
|
|
158
|
+
### ApiKeyAuth
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
- **Type**: API key
|
|
162
|
+
- **API key parameter name**: X-API-Key
|
|
163
|
+
- **Location**: HTTP header
|
|
164
|
+
|
data/Rakefile
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
# Metronome::AccessManagementApi
|
|
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
|
+
| [**get_api_key**](AccessManagementApi.md#get_api_key) | **GET** /v1/metronome/api-keys/{api-key} | |
|
|
8
|
+
| [**get_many_api_keys**](AccessManagementApi.md#get_many_api_keys) | **GET** /v1/metronome/api-keys | |
|
|
9
|
+
| [**put_api_key**](AccessManagementApi.md#put_api_key) | **PUT** /v1/metronome/api-keys/{api-key} | |
|
|
10
|
+
| [**sign_up**](AccessManagementApi.md#sign_up) | **PUT** /v1/metronome/sign-up | |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## get_api_key
|
|
14
|
+
|
|
15
|
+
> <ApiKeyData> get_api_key(api_key)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
Read a specific API key
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require 'time'
|
|
25
|
+
require 'metronome'
|
|
26
|
+
# setup authorization
|
|
27
|
+
Metronome.configure do |config|
|
|
28
|
+
# Configure API key authorization: ApiKeyAuth
|
|
29
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
30
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
31
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
api_instance = Metronome::AccessManagementApi.new
|
|
35
|
+
api_key = 'api_key_example' # String |
|
|
36
|
+
|
|
37
|
+
begin
|
|
38
|
+
|
|
39
|
+
result = api_instance.get_api_key(api_key)
|
|
40
|
+
p result
|
|
41
|
+
rescue Metronome::ApiError => e
|
|
42
|
+
puts "Error when calling AccessManagementApi->get_api_key: #{e}"
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### Using the get_api_key_with_http_info variant
|
|
47
|
+
|
|
48
|
+
This returns an Array which contains the response data, status code and headers.
|
|
49
|
+
|
|
50
|
+
> <Array(<ApiKeyData>, Integer, Hash)> get_api_key_with_http_info(api_key)
|
|
51
|
+
|
|
52
|
+
```ruby
|
|
53
|
+
begin
|
|
54
|
+
|
|
55
|
+
data, status_code, headers = api_instance.get_api_key_with_http_info(api_key)
|
|
56
|
+
p status_code # => 2xx
|
|
57
|
+
p headers # => { ... }
|
|
58
|
+
p data # => <ApiKeyData>
|
|
59
|
+
rescue Metronome::ApiError => e
|
|
60
|
+
puts "Error when calling AccessManagementApi->get_api_key_with_http_info: #{e}"
|
|
61
|
+
end
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
| Name | Type | Description | Notes |
|
|
67
|
+
| ---- | ---- | ----------- | ----- |
|
|
68
|
+
| **api_key** | **String** | | |
|
|
69
|
+
|
|
70
|
+
### Return type
|
|
71
|
+
|
|
72
|
+
[**ApiKeyData**](ApiKeyData.md)
|
|
73
|
+
|
|
74
|
+
### Authorization
|
|
75
|
+
|
|
76
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
77
|
+
|
|
78
|
+
### HTTP request headers
|
|
79
|
+
|
|
80
|
+
- **Content-Type**: Not defined
|
|
81
|
+
- **Accept**: application/json
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
## get_many_api_keys
|
|
85
|
+
|
|
86
|
+
> <GetManyApiKeys200Response> get_many_api_keys(opts)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
Read many API keys alphanumerically sorted
|
|
91
|
+
|
|
92
|
+
### Examples
|
|
93
|
+
|
|
94
|
+
```ruby
|
|
95
|
+
require 'time'
|
|
96
|
+
require 'metronome'
|
|
97
|
+
# setup authorization
|
|
98
|
+
Metronome.configure do |config|
|
|
99
|
+
# Configure API key authorization: ApiKeyAuth
|
|
100
|
+
config.api_key['ApiKeyAuth'] = 'YOUR API KEY'
|
|
101
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
102
|
+
# config.api_key_prefix['ApiKeyAuth'] = 'Bearer'
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
api_instance = Metronome::AccessManagementApi.new
|
|
106
|
+
opts = {
|
|
107
|
+
offset: 56, # Integer | The number of keys to drop from the start
|
|
108
|
+
limit: 56, # Integer | The number of keys to include
|
|
109
|
+
include_data: true # Boolean | Whether to include permissions, status, description etc.
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
begin
|
|
113
|
+
|
|
114
|
+
result = api_instance.get_many_api_keys(opts)
|
|
115
|
+
p result
|
|
116
|
+
rescue Metronome::ApiError => e
|
|
117
|
+
puts "Error when calling AccessManagementApi->get_many_api_keys: #{e}"
|
|
118
|
+
end
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
#### Using the get_many_api_keys_with_http_info variant
|
|
122
|
+
|
|
123
|
+
This returns an Array which contains the response data, status code and headers.
|
|
124
|
+
|
|
125
|
+
> <Array(<GetManyApiKeys200Response>, Integer, Hash)> get_many_api_keys_with_http_info(opts)
|
|
126
|
+
|
|
127
|
+
```ruby
|
|
128
|
+
begin
|
|
129
|
+
|
|
130
|
+
data, status_code, headers = api_instance.get_many_api_keys_with_http_info(opts)
|
|
131
|
+
p status_code # => 2xx
|
|
132
|
+
p headers # => { ... }
|
|
133
|
+
p data # => <GetManyApiKeys200Response>
|
|
134
|
+
rescue Metronome::ApiError => e
|
|
135
|
+
puts "Error when calling AccessManagementApi->get_many_api_keys_with_http_info: #{e}"
|
|
136
|
+
end
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
### Parameters
|
|
140
|
+
|
|
141
|
+
| Name | Type | Description | Notes |
|
|
142
|
+
| ---- | ---- | ----------- | ----- |
|
|
143
|
+
| **offset** | **Integer** | The number of keys to drop from the start | [optional] |
|
|
144
|
+
| **limit** | **Integer** | The number of keys to include | [optional] |
|
|
145
|
+
| **include_data** | **Boolean** | Whether to include permissions, status, description etc. | [optional] |
|
|
146
|
+
|
|
147
|
+
### Return type
|
|
148
|
+
|
|
149
|
+
[**GetManyApiKeys200Response**](GetManyApiKeys200Response.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
|
+
## put_api_key
|
|
162
|
+
|
|
163
|
+
> <CreateOrModifyApiKeyResponse> put_api_key(api_key, opts)
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
Create or modify an API key
|
|
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::AccessManagementApi.new
|
|
183
|
+
api_key = 'api_key_example' # String | The API key to be modified or 'create' for a new key
|
|
184
|
+
opts = {
|
|
185
|
+
put_api_key_request: Metronome::CreateApiKeyRequest.new # PutApiKeyRequest |
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
begin
|
|
189
|
+
|
|
190
|
+
result = api_instance.put_api_key(api_key, opts)
|
|
191
|
+
p result
|
|
192
|
+
rescue Metronome::ApiError => e
|
|
193
|
+
puts "Error when calling AccessManagementApi->put_api_key: #{e}"
|
|
194
|
+
end
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
#### Using the put_api_key_with_http_info variant
|
|
198
|
+
|
|
199
|
+
This returns an Array which contains the response data, status code and headers.
|
|
200
|
+
|
|
201
|
+
> <Array(<CreateOrModifyApiKeyResponse>, Integer, Hash)> put_api_key_with_http_info(api_key, opts)
|
|
202
|
+
|
|
203
|
+
```ruby
|
|
204
|
+
begin
|
|
205
|
+
|
|
206
|
+
data, status_code, headers = api_instance.put_api_key_with_http_info(api_key, opts)
|
|
207
|
+
p status_code # => 2xx
|
|
208
|
+
p headers # => { ... }
|
|
209
|
+
p data # => <CreateOrModifyApiKeyResponse>
|
|
210
|
+
rescue Metronome::ApiError => e
|
|
211
|
+
puts "Error when calling AccessManagementApi->put_api_key_with_http_info: #{e}"
|
|
212
|
+
end
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
### Parameters
|
|
216
|
+
|
|
217
|
+
| Name | Type | Description | Notes |
|
|
218
|
+
| ---- | ---- | ----------- | ----- |
|
|
219
|
+
| **api_key** | **String** | The API key to be modified or 'create' for a new key | |
|
|
220
|
+
| **put_api_key_request** | [**PutApiKeyRequest**](PutApiKeyRequest.md) | | [optional] |
|
|
221
|
+
|
|
222
|
+
### Return type
|
|
223
|
+
|
|
224
|
+
[**CreateOrModifyApiKeyResponse**](CreateOrModifyApiKeyResponse.md)
|
|
225
|
+
|
|
226
|
+
### Authorization
|
|
227
|
+
|
|
228
|
+
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
229
|
+
|
|
230
|
+
### HTTP request headers
|
|
231
|
+
|
|
232
|
+
- **Content-Type**: application/json
|
|
233
|
+
- **Accept**: application/json
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
## sign_up
|
|
237
|
+
|
|
238
|
+
> <SignupResponse> sign_up(opts)
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
Open end point for signing up new customers
|
|
243
|
+
|
|
244
|
+
### Examples
|
|
245
|
+
|
|
246
|
+
```ruby
|
|
247
|
+
require 'time'
|
|
248
|
+
require 'metronome'
|
|
249
|
+
|
|
250
|
+
api_instance = Metronome::AccessManagementApi.new
|
|
251
|
+
opts = {
|
|
252
|
+
signup_request: Metronome::SignupRequest.new({internal_contact: 'data-protection-it-manager@yourdomain.com'}) # SignupRequest |
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
begin
|
|
256
|
+
|
|
257
|
+
result = api_instance.sign_up(opts)
|
|
258
|
+
p result
|
|
259
|
+
rescue Metronome::ApiError => e
|
|
260
|
+
puts "Error when calling AccessManagementApi->sign_up: #{e}"
|
|
261
|
+
end
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
#### Using the sign_up_with_http_info variant
|
|
265
|
+
|
|
266
|
+
This returns an Array which contains the response data, status code and headers.
|
|
267
|
+
|
|
268
|
+
> <Array(<SignupResponse>, Integer, Hash)> sign_up_with_http_info(opts)
|
|
269
|
+
|
|
270
|
+
```ruby
|
|
271
|
+
begin
|
|
272
|
+
|
|
273
|
+
data, status_code, headers = api_instance.sign_up_with_http_info(opts)
|
|
274
|
+
p status_code # => 2xx
|
|
275
|
+
p headers # => { ... }
|
|
276
|
+
p data # => <SignupResponse>
|
|
277
|
+
rescue Metronome::ApiError => e
|
|
278
|
+
puts "Error when calling AccessManagementApi->sign_up_with_http_info: #{e}"
|
|
279
|
+
end
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
### Parameters
|
|
283
|
+
|
|
284
|
+
| Name | Type | Description | Notes |
|
|
285
|
+
| ---- | ---- | ----------- | ----- |
|
|
286
|
+
| **signup_request** | [**SignupRequest**](SignupRequest.md) | | [optional] |
|
|
287
|
+
|
|
288
|
+
### Return type
|
|
289
|
+
|
|
290
|
+
[**SignupResponse**](SignupResponse.md)
|
|
291
|
+
|
|
292
|
+
### Authorization
|
|
293
|
+
|
|
294
|
+
No authorization required
|
|
295
|
+
|
|
296
|
+
### HTTP request headers
|
|
297
|
+
|
|
298
|
+
- **Content-Type**: application/json
|
|
299
|
+
- **Accept**: application/json
|
|
300
|
+
|
data/docs/AccessType.md
ADDED
data/docs/ApiKeyData.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Metronome::ApiKeyData
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **name** | **String** | | |
|
|
9
|
+
| **description** | **String** | | |
|
|
10
|
+
| **value** | **String** | | |
|
|
11
|
+
| **status** | **String** | | |
|
|
12
|
+
| **permissions** | [**Array<Permission>**](Permission.md) | | |
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```ruby
|
|
17
|
+
require 'metronome'
|
|
18
|
+
|
|
19
|
+
instance = Metronome::ApiKeyData.new(
|
|
20
|
+
id: h2h1349,
|
|
21
|
+
name: great-flowers-metronome-production-public-website,
|
|
22
|
+
description: Customer Great Flowers production Public Website,
|
|
23
|
+
value: 9s87v98zxcb987xzcv79xzc7v89x,
|
|
24
|
+
status: null,
|
|
25
|
+
permissions: null
|
|
26
|
+
)
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Metronome::ApiKeyDataListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **response_type** | **String** | Always the value \"ApiKeyDataListResponse\" | |
|
|
8
|
+
| **result** | [**Array<ApiKeyData>**](ApiKeyData.md) | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'metronome'
|
|
14
|
+
|
|
15
|
+
instance = Metronome::ApiKeyDataListResponse.new(
|
|
16
|
+
response_type: null,
|
|
17
|
+
result: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Metronome::ApiKeyListResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **response_type** | **String** | Always the string \"ApiKeyListResponse\" | |
|
|
8
|
+
| **result** | **Array<String>** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'metronome'
|
|
14
|
+
|
|
15
|
+
instance = Metronome::ApiKeyListResponse.new(
|
|
16
|
+
response_type: null,
|
|
17
|
+
result: ["abcdef123445","lasjdf0923r","sldkjf2tg4"]
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Metronome::CreateApiKeyRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | | [optional] |
|
|
8
|
+
| **description** | **String** | | [optional] |
|
|
9
|
+
| **permissions** | [**Array<Permission>**](Permission.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'metronome'
|
|
15
|
+
|
|
16
|
+
instance = Metronome::CreateApiKeyRequest.new(
|
|
17
|
+
name: public-website,
|
|
18
|
+
description: Public Website,
|
|
19
|
+
permissions: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Metronome::CreateOrModifyApiKeyResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | |
|
|
8
|
+
| **value** | **String** | A sequence of alphanumeric characters that contain the value to be used when calling the API | |
|
|
9
|
+
| **fields_modified** | **Array<String>** | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'metronome'
|
|
15
|
+
|
|
16
|
+
instance = Metronome::CreateOrModifyApiKeyResponse.new(
|
|
17
|
+
id: great-flowers-tantalus-production-public-website,
|
|
18
|
+
value: lkj125lkj12l23j41l,
|
|
19
|
+
fields_modified: ["name","description","permissions"]
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Metronome::CreateOrModifyPolicyRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **aging_strategy** | [**AgingStrategy**](AgingStrategy.md) | | |
|
|
8
|
+
| **aging_offset_amount** | **Integer** | | |
|
|
9
|
+
| **aging_offset_unit** | [**AgingOffsetUnit**](AgingOffsetUnit.md) | | |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'metronome'
|
|
15
|
+
|
|
16
|
+
instance = Metronome::CreateOrModifyPolicyRequest.new(
|
|
17
|
+
aging_strategy: null,
|
|
18
|
+
aging_offset_amount: null,
|
|
19
|
+
aging_offset_unit: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|