AppDirect Secrets API

The Secrets API from AppDirect — 2 operation(s) for secrets.

OpenAPI Specification

appdirect-secrets-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  description: The Companies API allows developers to manage marketplace companies and their user memberships.
  title: Companies AI Embed Secrets API
  license:
    name: Apache License, Version 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0
  version: v296.0-SNAPSHOT
servers:
- url: https://marketplace.appdirect.com/api
- url: https://virtserver.swaggerhub.com
tags:
- name: Secrets
paths:
  /api/v1/secrets:
    get:
      tags:
      - Secrets
      summary: List secrets
      description: Lists secrets for the organization or a specific AI.
      operationId: listSecrets
      parameters:
      - name: aiId
        in: query
        required: false
        description: Filter secrets by AI ID.
        schema:
          type: string
      responses:
        '200':
          description: List of secrets.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Secret'
        '403':
          description: Forbidden, the user is not authorized to perform this action.
      security:
      - ApiKeyAuth: []
    post:
      tags:
      - Secrets
      summary: Create a secret
      description: Creates a secret for the organization or a specific AI.
      operationId: createSecret
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSecretRequest'
      responses:
        '201':
          description: Secret created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
        '403':
          description: Forbidden, the user is not authorized to perform this action.
      security:
      - ApiKeyAuth: []
  /api/v1/secrets/{secretId}:
    put:
      tags:
      - Secrets
      summary: Update a secret
      description: Updates an existing secret.
      operationId: updateSecret
      parameters:
      - name: secretId
        in: path
        required: true
        description: The identifier of the secret.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSecretRequest'
      responses:
        '200':
          description: Secret updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
      security:
      - ApiKeyAuth: []
    delete:
      tags:
      - Secrets
      summary: Delete a secret
      description: Deletes the specified secret.
      operationId: deleteSecret
      parameters:
      - name: secretId
        in: path
        required: true
        description: The identifier of the secret.
        schema:
          type: string
      responses:
        '200':
          description: Secret deleted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
      security:
      - ApiKeyAuth: []
components:
  schemas:
    Secret:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        data:
          type: string
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    CreateSecretRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type: string
        data:
          type: string
        aiId:
          type: string
      required:
      - name
      - description
    UpdateSecretRequest:
      type: object
      properties:
        description:
          type: string
        data:
          type: string