0.0.33 • Published 3 years ago

@vgs/api-client v0.0.33

Weekly downloads
-
License
BSD
Repository
github
Last release
3 years ago

vgs api client

Storing, retrieving, and managing sensitive data within a VGS organization.

NOTE: The Vault API is intended only for environments that are already PCI-compliant. If you want to use this API, but are not yet PCI-compliant, you can use VGS Collect or VGS Proxy with Inbound Routes to quickly and seamlessly achieve compliance.

Looking for the old version of the API? Find it here.

Introduction

Each encrypted value stored in a VGS vault has one or multiple aliases associated with it. These aliases are fully opaque and retain no information about the underlying data. The user may safely store aliases without compromising data security.

NOTE: The API works with persistent storage only. Unlike volatile storage, this means that the data is stored permanently, without any implicit TTL.

Aliases are not valuable on their own. However, they can be used to decrypt the associated value and pass it to another service via the forward proxy.

Alias Formats

Each alias corresponds to a certain format. There are several alias formats suitable for different kinds of sensitive data.

For example, UUID produces a random Base58-encoded UUID string with an environment-dependent prefix:

tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e

This format is generic and suitable for any kind of data.

The tables below contain descriptions of all alias formats recognized by the API.

Generic Formats

ValueDescription
NUM_LENGTH_PRESERVINGLength-Preserving, Numeric
RAW_UUIDUUID
UUIDUUID (Prefixed, Base58-Encoded)
GENERIC_T_FOURUUID (Prefixed, Base58-Encoded, Last four preserving)

Account Number Formats

ValueDescription
FPE_ACC_NUM_T_FOURLength-Preserving, Numeric (A4)
FPE_ALPHANUMERIC_ACC_NUM_T_FOURLength-Preserving, Alphanumeric (A4)

Payment Card Formats

ValueDescription
FPE_SIX_T_FOURFormat-Preserving, Luhn Valid (6T4)
FPE_T_FOURFormat-Preserving, Luhn Valid (T4)
PFPTPrefixed, Luhn Valid, 19-Digit Fixed Length

SSN Formats

ValueDescription
FPE_SSN_T_FOURFormat-Preserving (A4)

Authentication

This API uses Basic authentication.

Credentials to access the API can be generated on the dashboard by going to the Settings section of the vault of your choosing.

Docs » Guides » Access credentials

Rate Limiting

The API allows up to 3,000 requests per minute. Requests are associated with the vault, regardless of the access credentials used to authenticate the request.

Your current rate limit is included as HTTP headers in every API response:

Header NameDescription
x-ratelimit-remainingThe number of requests remaining in the 1-minute window.

If you exceed the rate limit, the API will reject the request with HTTP 429 Too Many Requests.

Errors

The API uses standard HTTP status codes to indicate whether the request succeeded or not.

In case of failure, the response body will be JSON in a predefined format. For example, trying to create too many aliases at once results in the following response:

{
    \"errors\": [
        {
            \"status\": 400,
            \"title\": \"Bad request\",
            \"detail\": \"Too many values (limit: 20)\",
            \"href\": \"https://api.sandbox.verygoodvault.com/aliases\"
        }
    ]
}
0.0.30

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.33

3 years ago

0.0.29

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.26

3 years ago

0.0.16

3 years ago

0.0.28

3 years ago

0.0.17

3 years ago

0.0.18

3 years ago

0.0.19

3 years ago

0.0.15

3 years ago

0.0.14

3 years ago