vgs_api_client 0.0.1.dev202204201806 → 0.0.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 +4 -4
- data/Gemfile.lock +70 -0
- data/README.md +237 -0
- data/docs/AliasFormat.md +15 -0
- data/docs/AliasesApi.md +366 -0
- data/docs/ApiError.md +24 -0
- data/docs/CreateAliasesRequest.md +18 -0
- data/docs/CreateAliasesRequestExisting.md +20 -0
- data/docs/CreateAliasesRequestNew.md +22 -0
- data/docs/InlineResponse200.md +18 -0
- data/docs/InlineResponse2001.md +18 -0
- data/docs/InlineResponse201.md +18 -0
- data/docs/InlineResponseDefault.md +18 -0
- data/docs/ModelAlias.md +20 -0
- data/docs/RevealedData.md +24 -0
- data/docs/UpdateAliasRequest.md +18 -0
- data/docs/UpdateAliasRequestData.md +18 -0
- data/git_push.sh +57 -0
- data/lib/vgs_api_client/api/aliases_api.rb +17 -8
- data/lib/vgs_api_client/api_client.rb +5 -5
- data/lib/vgs_api_client/api_error.rb +3 -3
- data/lib/vgs_api_client/configuration.rb +3 -3
- data/lib/vgs_api_client/models/alias_format.rb +3 -3
- data/lib/vgs_api_client/models/api_error.rb +6 -6
- data/lib/vgs_api_client/models/create_aliases_request.rb +7 -35
- data/lib/vgs_api_client/models/{create_aliases_request_reference.rb → create_aliases_request_existing.rb} +7 -7
- data/lib/vgs_api_client/models/create_aliases_request_new.rb +7 -53
- data/lib/vgs_api_client/models/inline_response200.rb +6 -6
- data/lib/vgs_api_client/models/inline_response2001.rb +6 -30
- data/lib/vgs_api_client/models/inline_response201.rb +6 -6
- data/lib/vgs_api_client/models/inline_response_default.rb +6 -21
- data/lib/vgs_api_client/models/model_alias.rb +6 -6
- data/lib/vgs_api_client/models/revealed_data.rb +7 -53
- data/lib/vgs_api_client/models/update_alias_request.rb +6 -6
- data/lib/vgs_api_client/models/update_alias_request_data.rb +6 -6
- data/lib/vgs_api_client/version.rb +4 -4
- data/lib/vgs_api_client.rb +5 -5
- data/spec/api/aliases_api_spec.rb +137 -0
- data/spec/api_client_spec.rb +31 -31
- data/spec/configuration_spec.rb +5 -5
- data/spec/models/alias_format_spec.rb +28 -0
- data/spec/models/api_error_spec.rb +52 -0
- data/spec/models/create_aliases_request_existing_spec.rb +40 -0
- data/spec/models/create_aliases_request_new_spec.rb +46 -0
- data/spec/models/create_aliases_request_spec.rb +34 -0
- data/spec/models/inline_response2001_spec.rb +34 -0
- data/spec/models/inline_response200_spec.rb +34 -0
- data/spec/models/inline_response201_spec.rb +34 -0
- data/spec/models/inline_response_default_spec.rb +34 -0
- data/spec/models/model_alias_spec.rb +40 -0
- data/spec/models/revealed_data_spec.rb +52 -0
- data/spec/models/update_alias_request_data_spec.rb +34 -0
- data/spec/models/update_alias_request_spec.rb +34 -0
- data/spec/spec_helper.rb +2 -2
- data/vgs_api_client.gemspec +3 -3
- metadata +51 -22
- data/DEVELOPMENT.md +0 -11
- data/LICENSE +0 -11
- data/RELEASE.md +0 -15
- data/docker-compose.yaml +0 -32
- data/lib/vgs.rb +0 -82
- data/scripts/assemble/Dockerfile +0 -8
- data/scripts/assemble/run.sh +0 -9
- data/scripts/publish/Dockerfile +0 -8
- data/scripts/publish/run.sh +0 -14
- data/scripts/publish.sh +0 -12
- data/scripts/run-tests-e2e.sh +0 -10
- data/scripts/run-tests.sh +0 -6
- data/scripts/test/Dockerfile +0 -12
- data/scripts/test/run.sh +0 -37
- data/spec/test_aliases_api_spec.rb +0 -97
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa58a9dafab3d45d960f49d470d79509bba961f316afbc3781db258fed4210d8
|
4
|
+
data.tar.gz: ca3de31ef5e4aa3c54c1f1affb04eafac0f27e522610a43f3b2fdf84729a3df4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b607efeb9383e71d6cd91c77f33516af8e15de6e8fffb7afe6bf48da2c2f78d04f3c1cf73fe3344d723f6074bab6f92ffbae51be9e389c4b077e4cc70672752
|
7
|
+
data.tar.gz: 844366566921e3055a23339c3869edd7ed88ed5e11c10793fbb75bb50a01ae29205e7c4f67317b14403a7d0b7a01a135b865d5937f8e9449deb3e5dcfb579199
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
vgs_api_client (0.0.1)
|
5
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
ast (2.4.2)
|
11
|
+
byebug (11.1.3)
|
12
|
+
coderay (1.1.3)
|
13
|
+
diff-lcs (1.5.0)
|
14
|
+
ethon (0.15.0)
|
15
|
+
ffi (>= 1.15.0)
|
16
|
+
ffi (1.15.5)
|
17
|
+
jaro_winkler (1.5.4)
|
18
|
+
method_source (1.0.0)
|
19
|
+
parallel (1.21.0)
|
20
|
+
parser (3.1.1.0)
|
21
|
+
ast (~> 2.4.1)
|
22
|
+
pry (0.13.1)
|
23
|
+
coderay (~> 1.1)
|
24
|
+
method_source (~> 1.0)
|
25
|
+
pry-byebug (3.9.0)
|
26
|
+
byebug (~> 11.0)
|
27
|
+
pry (~> 0.13.0)
|
28
|
+
psych (4.0.3)
|
29
|
+
stringio
|
30
|
+
rainbow (3.1.1)
|
31
|
+
rake (13.0.6)
|
32
|
+
rspec (3.11.0)
|
33
|
+
rspec-core (~> 3.11.0)
|
34
|
+
rspec-expectations (~> 3.11.0)
|
35
|
+
rspec-mocks (~> 3.11.0)
|
36
|
+
rspec-core (3.11.0)
|
37
|
+
rspec-support (~> 3.11.0)
|
38
|
+
rspec-expectations (3.11.0)
|
39
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
40
|
+
rspec-support (~> 3.11.0)
|
41
|
+
rspec-mocks (3.11.0)
|
42
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
+
rspec-support (~> 3.11.0)
|
44
|
+
rspec-support (3.11.0)
|
45
|
+
rubocop (0.66.0)
|
46
|
+
jaro_winkler (~> 1.5.1)
|
47
|
+
parallel (~> 1.10)
|
48
|
+
parser (>= 2.5, != 2.5.1.1)
|
49
|
+
psych (>= 3.1.0)
|
50
|
+
rainbow (>= 2.2.2, < 4.0)
|
51
|
+
ruby-progressbar (~> 1.7)
|
52
|
+
unicode-display_width (>= 1.4.0, < 1.6)
|
53
|
+
ruby-progressbar (1.11.0)
|
54
|
+
stringio (3.0.1)
|
55
|
+
typhoeus (1.4.0)
|
56
|
+
ethon (>= 0.9.0)
|
57
|
+
unicode-display_width (1.5.0)
|
58
|
+
|
59
|
+
PLATFORMS
|
60
|
+
x86_64-darwin-20
|
61
|
+
|
62
|
+
DEPENDENCIES
|
63
|
+
pry-byebug
|
64
|
+
rake (~> 13.0.1)
|
65
|
+
rspec (~> 3.6, >= 3.6.0)
|
66
|
+
rubocop (~> 0.66.0)
|
67
|
+
vgs_api_client!
|
68
|
+
|
69
|
+
BUNDLED WITH
|
70
|
+
2.2.22
|
data/README.md
ADDED
@@ -0,0 +1,237 @@
|
|
1
|
+
# vgs_api_client
|
2
|
+
|
3
|
+
VgsapiClient - the Ruby gem for the Vault HTTP API
|
4
|
+
|
5
|
+
Storing, retrieving, and managing sensitive data within a VGS organization.
|
6
|
+
|
7
|
+
**NOTE:** _The Vault API is intended only for environments that are already PCI-compliant.
|
8
|
+
If you want to use this API, but are not yet PCI-compliant, you can
|
9
|
+
use [VGS Collect](https://www.verygoodsecurity.com/docs/vgs-collect/what-is-it) or
|
10
|
+
VGS Proxy with [Inbound Routes](https://www.verygoodsecurity.com/docs/getting-started/quick-integration#securing-inbound-connection)
|
11
|
+
to quickly and seamlessly achieve compliance._
|
12
|
+
|
13
|
+
Looking for the old version of the API? Find it
|
14
|
+
[here](https://www.verygoodsecurity.com/docs/api/1/vault).
|
15
|
+
|
16
|
+
# Introduction
|
17
|
+
|
18
|
+
Each encrypted value stored in a VGS vault has one or multiple _aliases_
|
19
|
+
associated with it. These aliases are fully opaque and retain no information
|
20
|
+
about the underlying data. The user may safely store aliases without
|
21
|
+
compromising data security.
|
22
|
+
|
23
|
+
**NOTE:** The API works with persistent storage only. Unlike volatile
|
24
|
+
storage, this means that the data is stored permanently, without any
|
25
|
+
implicit TTL.
|
26
|
+
|
27
|
+
Aliases are not valuable on their own. However, they can be used to decrypt
|
28
|
+
the associated value and pass it to another service via the
|
29
|
+
[forward proxy](https://www.verygoodsecurity.com/docs/guides/outbound-connection).
|
30
|
+
|
31
|
+
## Alias Formats
|
32
|
+
|
33
|
+
Each alias corresponds to a certain format. There are several alias formats
|
34
|
+
suitable for different kinds of sensitive data.
|
35
|
+
|
36
|
+
For example, `UUID` produces a random Base58-encoded UUID string with an
|
37
|
+
environment-dependent prefix:
|
38
|
+
|
39
|
+
```
|
40
|
+
tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e
|
41
|
+
```
|
42
|
+
|
43
|
+
This format is generic and suitable for any kind of data.
|
44
|
+
|
45
|
+
The tables below contain descriptions of all alias formats recognized by the
|
46
|
+
API.
|
47
|
+
|
48
|
+
### Generic Formats
|
49
|
+
|
50
|
+
| Value | Description |
|
51
|
+
|-------------------------|-------------------------------------------------------|
|
52
|
+
| `NUM_LENGTH_PRESERVING` | Length-Preserving, Numeric |
|
53
|
+
| `RAW_UUID` | UUID |
|
54
|
+
| `UUID` | UUID (Prefixed, Base58-Encoded) |
|
55
|
+
| `GENERIC_T_FOUR` | UUID (Prefixed, Base58-Encoded, Last four preserving) |
|
56
|
+
|
57
|
+
### Account Number Formats
|
58
|
+
|
59
|
+
| Value | Description |
|
60
|
+
|-----------------------------------|--------------------------------------|
|
61
|
+
| `FPE_ACC_NUM_T_FOUR` | Length-Preserving, Numeric (A4) |
|
62
|
+
| `FPE_ALPHANUMERIC_ACC_NUM_T_FOUR` | Length-Preserving, Alphanumeric (A4) |
|
63
|
+
|
64
|
+
|
65
|
+
### Payment Card Formats
|
66
|
+
|
67
|
+
| Value | Description |
|
68
|
+
|------------------|---------------------------------------------|
|
69
|
+
| `FPE_SIX_T_FOUR` | Format-Preserving, Luhn Valid (6T4) |
|
70
|
+
| `FPE_T_FOUR` | Format-Preserving, Luhn Valid (T4) |
|
71
|
+
| `PFPT` | Prefixed, Luhn Valid, 19-Digit Fixed Length |
|
72
|
+
|
73
|
+
### SSN Formats
|
74
|
+
|
75
|
+
| Value | Description |
|
76
|
+
|------------------|------------------------|
|
77
|
+
| `FPE_SSN_T_FOUR` | Format-Preserving (A4) |
|
78
|
+
|
79
|
+
# Authentication
|
80
|
+
|
81
|
+
This API uses `Basic` authentication.
|
82
|
+
|
83
|
+
Credentials to access the API can be generated on the
|
84
|
+
[dashboard](https://dashboard.verygoodsecurity.com) by going to the Settings
|
85
|
+
section of the vault of your choosing.
|
86
|
+
|
87
|
+
[Docs » Guides » Access credentials](https://www.verygoodsecurity.com/docs/settings/access-credentials)
|
88
|
+
|
89
|
+
# Rate Limiting
|
90
|
+
|
91
|
+
The API allows up to 3,000 requests per minute. Requests are associated with
|
92
|
+
the vault, regardless of the access credentials used to authenticate the
|
93
|
+
request.
|
94
|
+
|
95
|
+
Your current rate limit is included as HTTP headers in every API response:
|
96
|
+
|
97
|
+
| Header Name | Description |
|
98
|
+
|-------------------------|----------------------------------------------------------|
|
99
|
+
| `x-ratelimit-remaining` | The number of requests remaining in the 1-minute window. |
|
100
|
+
|
101
|
+
If you exceed the rate limit, the API will reject the request with HTTP
|
102
|
+
[429 Too Many Requests](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429).
|
103
|
+
|
104
|
+
# Errors
|
105
|
+
|
106
|
+
The API uses standard HTTP status codes to indicate whether the request
|
107
|
+
succeeded or not.
|
108
|
+
|
109
|
+
In case of failure, the response body will be JSON in a predefined format.
|
110
|
+
For example, trying to create too many aliases at once results in the
|
111
|
+
following response:
|
112
|
+
|
113
|
+
```json
|
114
|
+
{
|
115
|
+
\"errors\": [
|
116
|
+
{
|
117
|
+
\"status\": 400,
|
118
|
+
\"title\": \"Bad request\",
|
119
|
+
\"detail\": \"Too many values (limit: 20)\",
|
120
|
+
\"href\": \"https://api.sandbox.verygoodvault.com/aliases\"
|
121
|
+
}
|
122
|
+
]
|
123
|
+
}
|
124
|
+
```
|
125
|
+
|
126
|
+
|
127
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
128
|
+
|
129
|
+
- API version: 1.0.0
|
130
|
+
- Package version: 0.0.1
|
131
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
132
|
+
|
133
|
+
## Installation
|
134
|
+
|
135
|
+
### Build a gem
|
136
|
+
|
137
|
+
To build the Ruby code into a gem:
|
138
|
+
|
139
|
+
```shell
|
140
|
+
gem build vgs_api_client.gemspec
|
141
|
+
```
|
142
|
+
|
143
|
+
Then either install the gem locally:
|
144
|
+
|
145
|
+
```shell
|
146
|
+
gem install ./vgs_api_client-0.0.1.gem
|
147
|
+
```
|
148
|
+
|
149
|
+
(for development, run `gem install --dev ./vgs_api_client-0.0.1.gem` to install the development dependencies)
|
150
|
+
|
151
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
152
|
+
|
153
|
+
Finally add this to the Gemfile:
|
154
|
+
|
155
|
+
gem 'vgs_api_client', '~> 0.0.1'
|
156
|
+
|
157
|
+
### Install from Git
|
158
|
+
|
159
|
+
If the Ruby gem is hosted at a git repository: https://github.com/verygoodsecurity/vgs-api-client-ruby, then add the following in the Gemfile:
|
160
|
+
|
161
|
+
gem 'vgs_api_client', :git => 'https://github.com/verygoodsecurity/vgs-api-client-ruby.git'
|
162
|
+
|
163
|
+
### Include the Ruby code directly
|
164
|
+
|
165
|
+
Include the Ruby code directly using `-I` as follows:
|
166
|
+
|
167
|
+
```shell
|
168
|
+
ruby -Ilib script.rb
|
169
|
+
```
|
170
|
+
|
171
|
+
## Getting Started
|
172
|
+
|
173
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
174
|
+
|
175
|
+
```ruby
|
176
|
+
# Load the gem
|
177
|
+
require 'vgs_api_client'
|
178
|
+
|
179
|
+
# Setup authorization
|
180
|
+
VgsapiClient.configure do |config|
|
181
|
+
# Configure HTTP basic authorization: basicAuth
|
182
|
+
config.username = 'YOUR_USERNAME'
|
183
|
+
config.password = 'YOUR_PASSWORD'
|
184
|
+
end
|
185
|
+
|
186
|
+
api_instance = VgsapiClient::AliasesApi.new
|
187
|
+
opts = {
|
188
|
+
create_aliases_request: VgsapiClient::CreateAliasesRequest.new({data: [TODO]}) # CreateAliasesRequest |
|
189
|
+
}
|
190
|
+
|
191
|
+
begin
|
192
|
+
#Create aliases
|
193
|
+
result = api_instance.create_aliases(opts)
|
194
|
+
p result
|
195
|
+
rescue VgsapiClient::ApiError => e
|
196
|
+
puts "Exception when calling AliasesApi->create_aliases: #{e}"
|
197
|
+
end
|
198
|
+
|
199
|
+
```
|
200
|
+
|
201
|
+
## Documentation for API Endpoints
|
202
|
+
|
203
|
+
All URIs are relative to *https://api.sandbox.verygoodvault.com*
|
204
|
+
|
205
|
+
Class | Method | HTTP request | Description
|
206
|
+
------------ | ------------- | ------------- | -------------
|
207
|
+
*VgsapiClient::AliasesApi* | [**create_aliases**](docs/AliasesApi.md#create_aliases) | **POST** /aliases | Create aliases
|
208
|
+
*VgsapiClient::AliasesApi* | [**delete_alias**](docs/AliasesApi.md#delete_alias) | **DELETE** /aliases/{alias} | Delete alias
|
209
|
+
*VgsapiClient::AliasesApi* | [**reveal_alias**](docs/AliasesApi.md#reveal_alias) | **GET** /aliases/{alias} | Reveal single alias
|
210
|
+
*VgsapiClient::AliasesApi* | [**reveal_multiple_aliases**](docs/AliasesApi.md#reveal_multiple_aliases) | **GET** /aliases | Reveal multiple aliases
|
211
|
+
*VgsapiClient::AliasesApi* | [**update_alias**](docs/AliasesApi.md#update_alias) | **PUT** /aliases/{alias} | Update data classifiers
|
212
|
+
|
213
|
+
|
214
|
+
## Documentation for Models
|
215
|
+
|
216
|
+
- [VgsapiClient::AliasFormat](docs/AliasFormat.md)
|
217
|
+
- [VgsapiClient::ApiError](docs/ApiError.md)
|
218
|
+
- [VgsapiClient::CreateAliasesRequest](docs/CreateAliasesRequest.md)
|
219
|
+
- [VgsapiClient::CreateAliasesRequestExisting](docs/CreateAliasesRequestExisting.md)
|
220
|
+
- [VgsapiClient::CreateAliasesRequestNew](docs/CreateAliasesRequestNew.md)
|
221
|
+
- [VgsapiClient::InlineResponse200](docs/InlineResponse200.md)
|
222
|
+
- [VgsapiClient::InlineResponse2001](docs/InlineResponse2001.md)
|
223
|
+
- [VgsapiClient::InlineResponse201](docs/InlineResponse201.md)
|
224
|
+
- [VgsapiClient::InlineResponseDefault](docs/InlineResponseDefault.md)
|
225
|
+
- [VgsapiClient::ModelAlias](docs/ModelAlias.md)
|
226
|
+
- [VgsapiClient::RevealedData](docs/RevealedData.md)
|
227
|
+
- [VgsapiClient::UpdateAliasRequest](docs/UpdateAliasRequest.md)
|
228
|
+
- [VgsapiClient::UpdateAliasRequestData](docs/UpdateAliasRequestData.md)
|
229
|
+
|
230
|
+
|
231
|
+
## Documentation for Authorization
|
232
|
+
|
233
|
+
|
234
|
+
### basicAuth
|
235
|
+
|
236
|
+
- **Type**: HTTP basic authentication
|
237
|
+
|
data/docs/AliasFormat.md
ADDED
data/docs/AliasesApi.md
ADDED
@@ -0,0 +1,366 @@
|
|
1
|
+
# VgsapiClient::AliasesApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.sandbox.verygoodvault.com*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**create_aliases**](AliasesApi.md#create_aliases) | **POST** /aliases | Create aliases |
|
8
|
+
| [**delete_alias**](AliasesApi.md#delete_alias) | **DELETE** /aliases/{alias} | Delete alias |
|
9
|
+
| [**reveal_alias**](AliasesApi.md#reveal_alias) | **GET** /aliases/{alias} | Reveal single alias |
|
10
|
+
| [**reveal_multiple_aliases**](AliasesApi.md#reveal_multiple_aliases) | **GET** /aliases | Reveal multiple aliases |
|
11
|
+
| [**update_alias**](AliasesApi.md#update_alias) | **PUT** /aliases/{alias} | Update data classifiers |
|
12
|
+
|
13
|
+
|
14
|
+
## create_aliases
|
15
|
+
|
16
|
+
> <InlineResponse201> create_aliases(opts)
|
17
|
+
|
18
|
+
Create aliases
|
19
|
+
|
20
|
+
Stores multiple values at once & returns their aliases. Alternatively, this endpoint may be used to associate additional (i.e. secondary) aliases with the same underlying data as the reference alias specified in the request body. **NOTE:** You cannot reference the same alias more than once in a single request.
|
21
|
+
|
22
|
+
### Examples
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
require 'time'
|
26
|
+
require 'vgs_api_client'
|
27
|
+
# setup authorization
|
28
|
+
VgsapiClient.configure do |config|
|
29
|
+
# Configure HTTP basic authorization: basicAuth
|
30
|
+
config.username = 'YOUR USERNAME'
|
31
|
+
config.password = 'YOUR PASSWORD'
|
32
|
+
end
|
33
|
+
|
34
|
+
api_instance = VgsapiClient::AliasesApi.new
|
35
|
+
opts = {
|
36
|
+
create_aliases_request: VgsapiClient::CreateAliasesRequest.new({data: [TODO]}) # CreateAliasesRequest |
|
37
|
+
}
|
38
|
+
|
39
|
+
begin
|
40
|
+
# Create aliases
|
41
|
+
result = api_instance.create_aliases(opts)
|
42
|
+
p result
|
43
|
+
rescue VgsapiClient::ApiError => e
|
44
|
+
puts "Error when calling AliasesApi->create_aliases: #{e}"
|
45
|
+
end
|
46
|
+
```
|
47
|
+
|
48
|
+
#### Using the create_aliases_with_http_info variant
|
49
|
+
|
50
|
+
This returns an Array which contains the response data, status code and headers.
|
51
|
+
|
52
|
+
> <Array(<InlineResponse201>, Integer, Hash)> create_aliases_with_http_info(opts)
|
53
|
+
|
54
|
+
```ruby
|
55
|
+
begin
|
56
|
+
# Create aliases
|
57
|
+
data, status_code, headers = api_instance.create_aliases_with_http_info(opts)
|
58
|
+
p status_code # => 2xx
|
59
|
+
p headers # => { ... }
|
60
|
+
p data # => <InlineResponse201>
|
61
|
+
rescue VgsapiClient::ApiError => e
|
62
|
+
puts "Error when calling AliasesApi->create_aliases_with_http_info: #{e}"
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
### Parameters
|
67
|
+
|
68
|
+
| Name | Type | Description | Notes |
|
69
|
+
| ---- | ---- | ----------- | ----- |
|
70
|
+
| **create_aliases_request** | [**CreateAliasesRequest**](CreateAliasesRequest.md) | | [optional] |
|
71
|
+
|
72
|
+
### Return type
|
73
|
+
|
74
|
+
[**InlineResponse201**](InlineResponse201.md)
|
75
|
+
|
76
|
+
### Authorization
|
77
|
+
|
78
|
+
[basicAuth](../README.md#basicAuth)
|
79
|
+
|
80
|
+
### HTTP request headers
|
81
|
+
|
82
|
+
- **Content-Type**: application/json
|
83
|
+
- **Accept**: application/json
|
84
|
+
|
85
|
+
|
86
|
+
## delete_alias
|
87
|
+
|
88
|
+
> delete_alias(_alias)
|
89
|
+
|
90
|
+
Delete alias
|
91
|
+
|
92
|
+
Removes a single alias.
|
93
|
+
|
94
|
+
### Examples
|
95
|
+
|
96
|
+
```ruby
|
97
|
+
require 'time'
|
98
|
+
require 'vgs_api_client'
|
99
|
+
# setup authorization
|
100
|
+
VgsapiClient.configure do |config|
|
101
|
+
# Configure HTTP basic authorization: basicAuth
|
102
|
+
config.username = 'YOUR USERNAME'
|
103
|
+
config.password = 'YOUR PASSWORD'
|
104
|
+
end
|
105
|
+
|
106
|
+
api_instance = VgsapiClient::AliasesApi.new
|
107
|
+
_alias = 'tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e' # String | Alias to operate on.
|
108
|
+
|
109
|
+
begin
|
110
|
+
# Delete alias
|
111
|
+
api_instance.delete_alias(_alias)
|
112
|
+
rescue VgsapiClient::ApiError => e
|
113
|
+
puts "Error when calling AliasesApi->delete_alias: #{e}"
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
#### Using the delete_alias_with_http_info variant
|
118
|
+
|
119
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
120
|
+
|
121
|
+
> <Array(nil, Integer, Hash)> delete_alias_with_http_info(_alias)
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
begin
|
125
|
+
# Delete alias
|
126
|
+
data, status_code, headers = api_instance.delete_alias_with_http_info(_alias)
|
127
|
+
p status_code # => 2xx
|
128
|
+
p headers # => { ... }
|
129
|
+
p data # => nil
|
130
|
+
rescue VgsapiClient::ApiError => e
|
131
|
+
puts "Error when calling AliasesApi->delete_alias_with_http_info: #{e}"
|
132
|
+
end
|
133
|
+
```
|
134
|
+
|
135
|
+
### Parameters
|
136
|
+
|
137
|
+
| Name | Type | Description | Notes |
|
138
|
+
| ---- | ---- | ----------- | ----- |
|
139
|
+
| **_alias** | **String** | Alias to operate on. | |
|
140
|
+
|
141
|
+
### Return type
|
142
|
+
|
143
|
+
nil (empty response body)
|
144
|
+
|
145
|
+
### Authorization
|
146
|
+
|
147
|
+
[basicAuth](../README.md#basicAuth)
|
148
|
+
|
149
|
+
### HTTP request headers
|
150
|
+
|
151
|
+
- **Content-Type**: Not defined
|
152
|
+
- **Accept**: application/json
|
153
|
+
|
154
|
+
|
155
|
+
## reveal_alias
|
156
|
+
|
157
|
+
> <InlineResponse2001> reveal_alias(_alias)
|
158
|
+
|
159
|
+
Reveal single alias
|
160
|
+
|
161
|
+
Retrieves a stored value along with its aliases. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
|
162
|
+
|
163
|
+
### Examples
|
164
|
+
|
165
|
+
```ruby
|
166
|
+
require 'time'
|
167
|
+
require 'vgs_api_client'
|
168
|
+
# setup authorization
|
169
|
+
VgsapiClient.configure do |config|
|
170
|
+
# Configure HTTP basic authorization: basicAuth
|
171
|
+
config.username = 'YOUR USERNAME'
|
172
|
+
config.password = 'YOUR PASSWORD'
|
173
|
+
end
|
174
|
+
|
175
|
+
api_instance = VgsapiClient::AliasesApi.new
|
176
|
+
_alias = 'tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e' # String | Alias to operate on.
|
177
|
+
|
178
|
+
begin
|
179
|
+
# Reveal single alias
|
180
|
+
result = api_instance.reveal_alias(_alias)
|
181
|
+
p result
|
182
|
+
rescue VgsapiClient::ApiError => e
|
183
|
+
puts "Error when calling AliasesApi->reveal_alias: #{e}"
|
184
|
+
end
|
185
|
+
```
|
186
|
+
|
187
|
+
#### Using the reveal_alias_with_http_info variant
|
188
|
+
|
189
|
+
This returns an Array which contains the response data, status code and headers.
|
190
|
+
|
191
|
+
> <Array(<InlineResponse2001>, Integer, Hash)> reveal_alias_with_http_info(_alias)
|
192
|
+
|
193
|
+
```ruby
|
194
|
+
begin
|
195
|
+
# Reveal single alias
|
196
|
+
data, status_code, headers = api_instance.reveal_alias_with_http_info(_alias)
|
197
|
+
p status_code # => 2xx
|
198
|
+
p headers # => { ... }
|
199
|
+
p data # => <InlineResponse2001>
|
200
|
+
rescue VgsapiClient::ApiError => e
|
201
|
+
puts "Error when calling AliasesApi->reveal_alias_with_http_info: #{e}"
|
202
|
+
end
|
203
|
+
```
|
204
|
+
|
205
|
+
### Parameters
|
206
|
+
|
207
|
+
| Name | Type | Description | Notes |
|
208
|
+
| ---- | ---- | ----------- | ----- |
|
209
|
+
| **_alias** | **String** | Alias to operate on. | |
|
210
|
+
|
211
|
+
### Return type
|
212
|
+
|
213
|
+
[**InlineResponse2001**](InlineResponse2001.md)
|
214
|
+
|
215
|
+
### Authorization
|
216
|
+
|
217
|
+
[basicAuth](../README.md#basicAuth)
|
218
|
+
|
219
|
+
### HTTP request headers
|
220
|
+
|
221
|
+
- **Content-Type**: Not defined
|
222
|
+
- **Accept**: application/json
|
223
|
+
|
224
|
+
|
225
|
+
## reveal_multiple_aliases
|
226
|
+
|
227
|
+
> <InlineResponse200> reveal_multiple_aliases(q)
|
228
|
+
|
229
|
+
Reveal multiple aliases
|
230
|
+
|
231
|
+
Given a list of aliases, retrieves all associated values stored in the vault. **NOTE:** This endpoint may expose sensitive data. Therefore, it is disabled by default. To enable it, please contact your VGS account manager or drop us a line at [support@verygoodsecurity.com](mailto:support@verygoodsecurity.com).
|
232
|
+
|
233
|
+
### Examples
|
234
|
+
|
235
|
+
```ruby
|
236
|
+
require 'time'
|
237
|
+
require 'vgs_api_client'
|
238
|
+
# setup authorization
|
239
|
+
VgsapiClient.configure do |config|
|
240
|
+
# Configure HTTP basic authorization: basicAuth
|
241
|
+
config.username = 'YOUR USERNAME'
|
242
|
+
config.password = 'YOUR PASSWORD'
|
243
|
+
end
|
244
|
+
|
245
|
+
api_instance = VgsapiClient::AliasesApi.new
|
246
|
+
q = ['inner_example'] # Array<String> | Comma-separated list of aliases to reveal.
|
247
|
+
|
248
|
+
begin
|
249
|
+
# Reveal multiple aliases
|
250
|
+
result = api_instance.reveal_multiple_aliases(q)
|
251
|
+
p result
|
252
|
+
rescue VgsapiClient::ApiError => e
|
253
|
+
puts "Error when calling AliasesApi->reveal_multiple_aliases: #{e}"
|
254
|
+
end
|
255
|
+
```
|
256
|
+
|
257
|
+
#### Using the reveal_multiple_aliases_with_http_info variant
|
258
|
+
|
259
|
+
This returns an Array which contains the response data, status code and headers.
|
260
|
+
|
261
|
+
> <Array(<InlineResponse200>, Integer, Hash)> reveal_multiple_aliases_with_http_info(q)
|
262
|
+
|
263
|
+
```ruby
|
264
|
+
begin
|
265
|
+
# Reveal multiple aliases
|
266
|
+
data, status_code, headers = api_instance.reveal_multiple_aliases_with_http_info(q)
|
267
|
+
p status_code # => 2xx
|
268
|
+
p headers # => { ... }
|
269
|
+
p data # => <InlineResponse200>
|
270
|
+
rescue VgsapiClient::ApiError => e
|
271
|
+
puts "Error when calling AliasesApi->reveal_multiple_aliases_with_http_info: #{e}"
|
272
|
+
end
|
273
|
+
```
|
274
|
+
|
275
|
+
### Parameters
|
276
|
+
|
277
|
+
| Name | Type | Description | Notes |
|
278
|
+
| ---- | ---- | ----------- | ----- |
|
279
|
+
| **q** | [**Array<String>**](String.md) | Comma-separated list of aliases to reveal. | |
|
280
|
+
|
281
|
+
### Return type
|
282
|
+
|
283
|
+
[**InlineResponse200**](InlineResponse200.md)
|
284
|
+
|
285
|
+
### Authorization
|
286
|
+
|
287
|
+
[basicAuth](../README.md#basicAuth)
|
288
|
+
|
289
|
+
### HTTP request headers
|
290
|
+
|
291
|
+
- **Content-Type**: Not defined
|
292
|
+
- **Accept**: application/json
|
293
|
+
|
294
|
+
|
295
|
+
## update_alias
|
296
|
+
|
297
|
+
> update_alias(_alias, opts)
|
298
|
+
|
299
|
+
Update data classifiers
|
300
|
+
|
301
|
+
Apply new classifiers to the value that the specified alias is associated with.
|
302
|
+
|
303
|
+
### Examples
|
304
|
+
|
305
|
+
```ruby
|
306
|
+
require 'time'
|
307
|
+
require 'vgs_api_client'
|
308
|
+
# setup authorization
|
309
|
+
VgsapiClient.configure do |config|
|
310
|
+
# Configure HTTP basic authorization: basicAuth
|
311
|
+
config.username = 'YOUR USERNAME'
|
312
|
+
config.password = 'YOUR PASSWORD'
|
313
|
+
end
|
314
|
+
|
315
|
+
api_instance = VgsapiClient::AliasesApi.new
|
316
|
+
_alias = 'tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e' # String | Alias to operate on.
|
317
|
+
opts = {
|
318
|
+
update_alias_request: VgsapiClient::UpdateAliasRequest.new({data: VgsapiClient::UpdateAliasRequestData.new({classifiers: ['bank-account']})}) # UpdateAliasRequest |
|
319
|
+
}
|
320
|
+
|
321
|
+
begin
|
322
|
+
# Update data classifiers
|
323
|
+
api_instance.update_alias(_alias, opts)
|
324
|
+
rescue VgsapiClient::ApiError => e
|
325
|
+
puts "Error when calling AliasesApi->update_alias: #{e}"
|
326
|
+
end
|
327
|
+
```
|
328
|
+
|
329
|
+
#### Using the update_alias_with_http_info variant
|
330
|
+
|
331
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
332
|
+
|
333
|
+
> <Array(nil, Integer, Hash)> update_alias_with_http_info(_alias, opts)
|
334
|
+
|
335
|
+
```ruby
|
336
|
+
begin
|
337
|
+
# Update data classifiers
|
338
|
+
data, status_code, headers = api_instance.update_alias_with_http_info(_alias, opts)
|
339
|
+
p status_code # => 2xx
|
340
|
+
p headers # => { ... }
|
341
|
+
p data # => nil
|
342
|
+
rescue VgsapiClient::ApiError => e
|
343
|
+
puts "Error when calling AliasesApi->update_alias_with_http_info: #{e}"
|
344
|
+
end
|
345
|
+
```
|
346
|
+
|
347
|
+
### Parameters
|
348
|
+
|
349
|
+
| Name | Type | Description | Notes |
|
350
|
+
| ---- | ---- | ----------- | ----- |
|
351
|
+
| **_alias** | **String** | Alias to operate on. | |
|
352
|
+
| **update_alias_request** | [**UpdateAliasRequest**](UpdateAliasRequest.md) | | [optional] |
|
353
|
+
|
354
|
+
### Return type
|
355
|
+
|
356
|
+
nil (empty response body)
|
357
|
+
|
358
|
+
### Authorization
|
359
|
+
|
360
|
+
[basicAuth](../README.md#basicAuth)
|
361
|
+
|
362
|
+
### HTTP request headers
|
363
|
+
|
364
|
+
- **Content-Type**: application/json
|
365
|
+
- **Accept**: application/json
|
366
|
+
|