Oneschema Azure Key Vault Secrets API

Manage secret references within Azure Key Vault accounts

OpenAPI Specification

oneschema-azure-key-vault-secrets-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: OneSchema AWS Secrets Manager AWS Secrets Manager Accounts Azure Key Vault Secrets API
  version: '1'
  description: Configure AWS Secrets Manager account connections and managed secret references for use in Multi FileFeeds.
  contact:
    name: OneSchema Support
    email: support@oneschema.co
  termsOfService: https://www.oneschema.co/terms-and-conditions
  license:
    name: proprietary
    url: https://www.oneschema.co/terms-and-conditions
servers:
- url: https://api.oneschema.co
  description: Production server (hosted in the US)
- url: https://api.eu.oneschema.co
  description: Production server (hosted in the EU)
- url: https://api.ca.oneschema.co
  description: Production server (hosted in Canada)
- url: https://api.au.oneschema.co
  description: Production server (hosted in Australia)
security:
- ApiKeyAuth: []
tags:
- name: Azure Key Vault Secrets
  description: Manage secret references within Azure Key Vault accounts
paths:
  /v0/azure-key-vault/accounts/{account-id}/secrets:
    post:
      operationId: create-azure-key-vault-secret
      summary: Create Managed Secret
      description: Create a new managed secret reference within an Azure Key Vault account.
      parameters:
      - name: account-id
        in: path
        required: true
        description: The ID of the Azure Key Vault account
        schema:
          type: integer
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/azure-managed-secret-resource'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '401':
          description: Unauthorized (missing or invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
      tags:
      - Azure Key Vault Secrets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/azure-managed-secret-post-request'
    get:
      operationId: list-azure-key-vault-account-secrets
      summary: List Managed Secrets for Account
      description: Returns all managed secrets belonging to a specific Azure Key Vault account.
      parameters:
      - name: account-id
        in: path
        required: true
        description: The ID of the Azure Key Vault account
        schema:
          type: integer
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/azure-managed-secret-resource'
        '401':
          description: Unauthorized (missing or invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
      tags:
      - Azure Key Vault Secrets
  /v0/azure-key-vault/secrets/{secret-id}:
    delete:
      operationId: delete-azure-key-vault-secret
      summary: Delete Managed Secret
      description: Delete a specific managed secret.
      parameters:
      - name: secret-id
        in: path
        required: true
        description: The ID of the managed secret
        schema:
          type: integer
      responses:
        '200':
          description: Successful response. The primary way to verify the request's success or failure is the response status code. In a future API version this endpoint may not return any response body at all.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/empty-response'
        '401':
          description: Unauthorized (missing or invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
      tags:
      - Azure Key Vault Secrets
    get:
      operationId: get-azure-key-vault-secret
      summary: Get Managed Secret
      description: Get a specific managed secret.
      parameters:
      - name: secret-id
        in: path
        required: true
        description: The ID of the managed secret
        schema:
          type: integer
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/azure-managed-secret-resource'
        '401':
          description: Unauthorized (missing or invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
      tags:
      - Azure Key Vault Secrets
    patch:
      operationId: update-azure-key-vault-secret
      summary: Update Managed Secret
      description: Update a specific managed secret.
      parameters:
      - name: secret-id
        in: path
        required: true
        description: The ID of the managed secret
        schema:
          type: integer
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/azure-managed-secret-resource'
        '400':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '401':
          description: Unauthorized (missing or invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
      tags:
      - Azure Key Vault Secrets
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/azure-managed-secret-patch-request'
  /v0/azure-key-vault/secrets:
    get:
      operationId: list-azure-key-vault-secrets
      summary: List All Managed Secrets
      description: Returns all Azure managed secrets across all accounts in the organization.
      parameters: []
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/azure-managed-secret-resource'
        '401':
          description: Unauthorized (missing or invalid API key)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error-response'
      tags:
      - Azure Key Vault Secrets
components:
  schemas:
    azure-managed-secret-patch-request:
      type: object
      properties:
        name:
          type: string
          description: A descriptive label for this secret reference
        description:
          anyOf:
          - type: string
          - type: 'null'
          description: An optional description
        secret_identifier:
          type: string
          description: The name of the secret in the vault
        vault:
          type: string
          description: The full Azure Key Vault URL
        secret_version:
          anyOf:
          - type: string
          - type: 'null'
          description: A specific version
    error-response:
      type: object
      required:
      - message
      properties:
        code:
          type: string
          description: A machine-readable error code
        param:
          type: string
          description: The parameter that caused the error
        message:
          type: string
          description: A human-readable error message
        data:
          type: object
          description: Additional error context
    azure-managed-secret-resource:
      type: object
      properties:
        id:
          type: integer
          description: The unique identifier of the managed secret
        name:
          type: string
          description: The name of the managed secret
        description:
          anyOf:
          - type: string
          - type: 'null'
          description: An optional description
        account_id:
          type: integer
          description: The account this secret belongs to
        secret_identifier:
          type: string
          description: The identifier used to fetch the secret from the vault
        secret_version:
          anyOf:
          - type: string
          - type: 'null'
        vault:
          type: string
          description: The Azure Key Vault URL
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    azure-managed-secret-post-request:
      type: object
      required:
      - name
      - secret_identifier
      - vault
      properties:
        name:
          type: string
          description: A descriptive label for this secret reference
        secret_identifier:
          type: string
          description: The name of the secret in the vault (e.g. my-gpg-key)
        vault:
          type: string
          description: The full Azure Key Vault URL (e.g. https://myvault.vault.azure.net)
        description:
          anyOf:
          - type: string
          - type: 'null'
          description: An optional description
        secret_version:
          anyOf:
          - type: string
          - type: 'null'
          description: A specific version (omit to always retrieve the latest version)
    empty-response:
      type: object
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY