api.yaml in vgs_api_client-0.0.1.alpha202205220158 vs api.yaml in vgs_api_client-0.0.1.alpha202205221656
- old
+ new
@@ -1,11 +1,11 @@
openapi: '3.0.0'
info:
title: Vault HTTP API
description: |
The VGS Vault HTTP API is used for storing, retrieving, and managing sensitive data (aka Tokenization) within a VGS Vault.
-
+
The VGS API is organized around REST. Our API is built with a predictable resource-oriented structure, uses JSON-encoded requests and responses, follows standard HTTP verbs/responses, and uses industry standard authentication.
## What is VGS
Storing sensitive data on your company’s infrastructure often comes with a heavy compliance burden. For instance, storing payments data yourself greatly increases the amount of work needed to become PCI compliant. It also increases your security risk in general. To combat this, companies will minimize the amount of sensitive information they have to handle or store.
@@ -15,17 +15,17 @@
**Tokenization** is a method that focuses on securing the storage of data. This is the quickest way to get started and is free. [Get started with Tokenization](https://www.verygoodsecurity.com/docs/tokenization/getting-started).
**Zero Data** is a unique method invented by VGS in 2016 that securely stores data like Tokenization, however it also removes the customer’s environment from PCI scope completely providing maximum security, and minimum compliance scope. [Get started with Zero Data](https://www.verygoodsecurity.com/docs/getting-started/before-you-start).
Additionally, for scenarios where neither technology is a complete solution, for instance with legacy systems, VGS provides a compliance product which guarantees customers are able to meet their compliance needs no matter what may happen. [Get started with Control](https://www.verygoodsecurity.com/docs/control).
-
+
## Learn about Tokenization
-
+
- [Create an Account for Free Tokenization](https://dashboard.verygoodsecurity.com/tokenization)
- [Try a Tokenization Demo](https://www.verygoodsecurity.com/docs/tokenization/getting-started)
- [Install a Tokenization SDK](https://www.verygoodsecurity.com/docs/tokenization/client-libraries)
-
+
### Authentication
This API uses `Basic` authentication.
Credentials to access the API can be generated on the
@@ -33,13 +33,13 @@
section of the vault of your choosing.
[Docs » Guides » Access credentials](https://www.verygoodsecurity.com/docs/settings/access-credentials)
## Resource Limits
-
+
### Data Limits
-
+
This API allows storing data up to 32MB in size.
### Rate Limiting
The API allows up to 3,000 requests per minute. Requests are associated with
@@ -78,18 +78,17 @@
```
version: '1.0.0'
contact:
email: support@verygoodsecurity.com
x-logo:
- url: https://www.verygoodsecurity.com/img/press-and-assets/vgs-logo-color.png
+ url: images/vgs-logo.png
href: https://www.verygoodsecurity.com
altText: VGS Logo
- termsOfService: https://www.verygoodsecurity.com/terms-and-conditions
externalDocs:
- description: Visit the VGS documentation homepage
- url: https://www.verygoodsecurity.com/docs/
+ description: Find out more about VGS
+ url: https://www.verygoodsecurity.com/
servers:
- url: https://api.sandbox.verygoodvault.com
description: Sandbox
@@ -110,311 +109,13 @@
- name: Data Management
tags:
- aliases
security:
- - BasicAuth: []
+ - basicAuth: []
paths:
- /functions:
- post:
- operationId: createFunction
- summary: Creates a new function
- security:
- - OAuth2: [functions:write]
- tags:
- - functions
- description: |
- Creates a new function.
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/CreateFunctionRequest'
- examples:
- CreateFunctionRequestOne:
- summary: Create a new function
- value:
- data:
- - src: |
- def process(input, ctx):
- return input
- lang: larky
- name: my-function
- responses:
- '201':
- description: Created
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/Function'
- description: A retrieved function.
- minItems: 1
- maxItems: 20
- examples:
- CreateFunctionResponseOne:
- summary: Create a new function
- value:
- data:
- - src: |
- def process(input, ctx):
- return input
- lang: larky
- name: my-function-46Juzcyx
- hash: bc1f0c3322091740cead407000af9acc692e7fefd0d96446e07900dcd0f8e308
-
- default:
- $ref: '#/components/responses/ApiErrorsResponse'
- get:
- operationId: listFunctions
- summary: Lists all functions
- security:
- - OAuth2: [functions:read]
- tags:
- - functions
- description: |
- Lists all functions
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/Function'
- description: A retrieved function.
- minItems: 1
- maxItems: 20
- default:
- $ref: '#/components/responses/ApiErrorsResponse'
-
- /functions/{functionName}:
- parameters:
- - $ref: '#/components/parameters/functionName'
- get:
- operationId: getFunction
- tags:
- - functions
- summary: Retrieve a single function
- security:
- - OAuth2: [functions:read]
- description: |
- Retrieves a function
- parameters:
- - $ref: '#/components/parameters/functionName'
- responses:
- '200':
- description: OK
- content:
- application/json:
- schema:
- type: object
- properties:
- data:
- type: array
- items:
- $ref: '#/components/schemas/Function'
- description: The retrieved function.
- minItems: 1
- maxItems: 1
- examples:
- UpdateFunctionResponseOne:
- summary: Update a new function
- value:
- data:
- - src: |
- def process(input, ctx):
- return input
- lang: larky
- name: my-function-46Juzcyx
- hash: bc1f0c3322091740cead407000af9acc692e7fefd0d96446e07900dcd0f8e308
- default:
- $ref: '#/components/responses/ApiErrorsResponse'
-
- put:
- operationId: updateFunction
- tags:
- - functions
- summary: Update function
- security:
- - OAuth2: [functions:write]
- description: |
- Update an existing function definition
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/UpdateFunctionRequestPayload'
- responses:
- '200':
- description: No Content
- default:
- $ref: '#/components/responses/ApiErrorsResponse'
-
- delete:
- operationId: deleteFunction
- tags:
- - functions
- summary: Deletes a function
- security:
- - OAuth2: [functions:write]
- description: |
- Removes a single alias.
- parameters:
- - $ref: '#/components/parameters/functionName'
- responses:
- '204':
- description: No Content
- default:
- $ref: '#/components/responses/ApiErrorsResponse'
-
- /functions/{functionName}/invocations:
- parameters:
- - $ref: '#/components/parameters/functionName'
- post:
- operationId: invokeFunction
- tags:
- - functions
- summary: Invoke a function
- description: |
- Invokes a function
- parameters:
- - $ref: '#/components/parameters/functionName'
- requestBody:
- content:
- "application/x-www-form-urlencoded":
- schema:
- type: string
- example:
- hello world
- description: Stream of bytes up to XX KB in size
- "text/plain":
- schema:
- type: string
- format: byte
- example:
- aGVsbG8gd29ybGQK
- description: Stream of bytes base64 encoded up to XX KB in size
- application/http:
- schema:
- type: object
- properties:
- method:
- type: string
- enum:
- - POST
- - PATCH
- - DELETE
- - PUT
- - GET
- - HEAD
- uri:
- type: string
- format: uri
- example: https://example.com/software/htp/cics/index.html
- version:
- type: string
- enum:
- - "1.0"
- - "1.1"
- headers:
- type: array
- items:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- body:
- type: string
- format: string
-
- description: https://www.iana.org/assignments/media-types/media-types.xhtml
- examples:
- InvokeFunction1:
- summary: Invoke a function with a HTTP request payload
- value:
- method: GET
- uri: https://example.com/software/htp/cics/index.html
- version: 1.0
-
- "*/*":
- schema:
- type: string
- format: binary?
- description: Stream of bytes up to XX KB in size
- responses:
- '200':
- description: OK
- content:
- application/http:
- schema:
- type: object
- properties:
- method:
- type: string
- enum:
- - POST
- - PATCH
- - DELETE
- - PUT
- - GET
- - HEAD
- uri:
- type: string
- format: uri
- example: https://example.com/software/htp/cics/index.html
- version:
- type: string
- enum:
- - "1.0"
- - "1.1"
- headers:
- type: array
- items:
- type: object
- properties:
- key:
- type: string
- value:
- type: string
- body:
- type: string
- format: string
-
- description: https://www.iana.org/assignments/media-types/media-types.xhtml
- example:
- method: POST
- uri: https://example.com/software/htp/cics/index.html
- version: 1.0
- headers:
- - key: Content-Type
- value: text/plain
- "text/plain":
- schema:
- type: string
- description: Stream of bytes base64 up to XX KB in size
- example:
- aGVsbG8gd29ybGQK
- "*":
- schema:
- type: string
- format: binary
- description: Stream of bytes up to XX KB in size
- default:
- $ref: '#/components/responses/ApiErrorsResponse'
-
/aliases:
post:
operationId: createAliases
tags:
- aliases
@@ -642,45 +343,20 @@
source: |
curl https://api.sandbox.verygoodvault.com/aliases/{{alias}} \
-X DELETE \
-u "$USERNAME:$PASSWORD"
+
components:
# See the following links for details:
# - https://swagger.io/docs/specification/authentication/basic-authentication/
- # https://swagger.io/docs/specification/authentication/
securitySchemes:
- BasicAuth:
+ basicAuth:
type: http
scheme: basic
- description: |
- The default authentication scheme for [Data API](#data-apis) based requests
- is [Basic authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
- OAuth2:
- type: oauth2
- flows:
- authorizationCode:
- authorizationUrl: https://auth.verygoodsecurity.com/auth/realms/vgs/protocol/openid-connect/auth
- tokenUrl: https://auth.verygoodsecurity.io/auth/realms/vgs/protocol/openid-connect/token
- scopes:
- credentials:read: Read vault credentials without reading secrets
- credentials:write: Add, delete and manage credentials of vault
- routes:read: Read your vault routes
- routes:write: Create, read, update, delete your vault routes
- vaults:read: Read details of your vaults
- vaults:write: Read, create, update and delete your vaults
- upstreams:read: Read your upstreams for SFTP routes
- upstreams:write: Create and update upstreams for SFTP routes
- certificates:read: Read certificates setup for your routes
- certificates:write: Upload and delete certificates for routes
- hostnames:read: Read/List Custom Hostnames of your vault routes
- hostnames:write: Create/Delete Custom Hostname of your vault routes
- functions:read: Read/List Functions
- functions:write: Create/Delete Functions
- description: |
- The default authentication schema for [Management API](#management-apis) based requests.
+ description: The default authentication schema.
parameters:
alias:
name: alias
in: path
@@ -688,19 +364,10 @@
description: Alias to operate on.
schema:
type: string
example: tok_sandbox_bhtsCwFUzoJMw9rWUfEV5e
- functionName:
- name: functionName
- in: path
- required: true
- description: Name of function to operate on
- schema:
- type: string
- example: my-function-46Juzcyx
-
responses:
ApiErrorsResponse:
description: Something went wrong
content:
application/json:
@@ -828,11 +495,11 @@
- PERSISTENT
- VOLATILE
default: PERSISTENT
description: |
Storage medium to use.
-
+
VOLATILE results in data being persisted into an in-memory data store for one hour which is required for PCI compliant storage of card security code data.
required:
- value
- format
@@ -863,80 +530,5 @@
description: List of tags to classify the value with.
required:
- classifiers
required:
- data
-
- CreateFunctionRequest:
- type: object
- properties:
- data:
- type: array
- items:
- oneOf:
- - $ref: '#/components/schemas/CreateFunctionRequestPayload'
- minItems: 1
- maxItems: 20
- required:
- - data
-
- CreateFunctionRequestPayload:
- type: object
- properties:
- name:
- type: string
- description: Prefix to name your function
- pattern: "[a-zA-Z]+([A-Za-z0-9\\-_]){5,28}[a-zA-Z0-9]"
- example: my-function
- src:
- type: string
- description: Definition of function body
- example: |
- def process(input, ctx):
- return input
- lang:
- type: string
- enum:
- - larky
- default: larky
- description: |
- Language to write your function in.
- required:
- - name
- - src
-
- UpdateFunctionRequestPayload:
- type: object
- properties:
- src:
- type: string
- description: Definition of function body
- example: |
- def process(input, ctx):
- return input
- required:
- - src
-
- Function:
- type: object
- properties:
- name:
- type: string
- example: my-function-46Juzcyx
- src:
- type: string
- description: Definition of function body
- example: |
- def process(input, ctx):
- return input
- lang:
- type: string
- enum:
- - larky
- default: larky
- description: |
- Language to write your function in.
- hash:
- type: string
- description: SHA256 representation of the function definition
- example: bc1f0c3322091740cead407000af9acc692e7fefd0d96446e07900dcd0f8e308
-