api.yaml in vgs_api_client-0.0.1.alpha202205210037 vs api.yaml in vgs_api_client-0.0.1.alpha202205210249

- old
+ new

@@ -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,272 +109,13 @@ - name: Data Management tags: - aliases security: - - BasicAuth: [] + - basicAuth: [] paths: - /functions: - post: - operationId: createFunction - summary: Creates a new function - tags: - - functions - description: | - Creates a new function. - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFunctionRequest' - examples: - A: - 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 - default: - $ref: '#/components/responses/ApiErrorsResponse' - get: - operationId: listFunctions - summary: Lists all functions - 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 - 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 - default: - $ref: '#/components/responses/ApiErrorsResponse' - - put: - operationId: updateFunction - tags: - - functions - summary: Update function - description: | - Update an existing function definition - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/CreateFunctionRequestPayload' - responses: - '200': - description: No Content - default: - $ref: '#/components/responses/ApiErrorsResponse' - - delete: - operationId: deleteFunction - tags: - - functions - summary: Deletes a function - 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: - "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: - A: - 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 @@ -603,64 +343,30 @@ 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 required: true 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: @@ -824,71 +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 - - 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 - required: - - value - - format -