Julep Secrets API

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

OpenAPI Specification

julep-secrets-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Julep Agents Secrets API
  termsOfService: https://julep.ai/terms
  contact:
    name: Julep AI
    url: https://julep.ai
    email: developers@julep.ai
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: Julep is a backend for creating stateful AI apps with background tasks and long-term memory easily.
  version: 1.0.0
servers:
- url: https://{serverEnv}.julep.ai/api
  description: The julep cloud service endpoint
  variables:
    serverEnv:
      default: api
      description: The environment to use
      enum:
      - api
      - dev
security:
- ApiKeyAuth: []
- ApiKeyAuth_: []
tags:
- name: Secrets
paths:
  /secrets/{id}:
    get:
      operationId: DeveloperSecretsRoute_list
      description: List secrets (paginated)
      parameters:
      - name: id
        in: path
        required: true
        description: ID of parent
        schema:
          $ref: '#/components/schemas/Common.uuid'
      - $ref: '#/components/parameters/Common.PaginationOptions.limit'
      - $ref: '#/components/parameters/Common.PaginationOptions.offset'
      - $ref: '#/components/parameters/Common.PaginationOptions.sort_by'
      - $ref: '#/components/parameters/Common.PaginationOptions.direction'
      - $ref: '#/components/parameters/Common.PaginationOptions.metadata_filter'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/Secrets.Secret'
                required:
                - items
      tags:
      - Secrets
    post:
      operationId: DeveloperSecretsRoute_create
      description: Create a new secret
      parameters:
      - name: id
        in: path
        required: true
        description: ID of parent resource
        schema:
          $ref: '#/components/schemas/Common.uuid'
      responses:
        '201':
          description: The request has succeeded and a new resource has been created as a result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secrets.Secret'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Secrets.CreateSecretRequest'
      tags:
      - Secrets
  /secrets/{id}/{child_id}:
    put:
      operationId: DeveloperSecretsRoute_update
      description: Update an existing secret by id (overwrites existing values)
      parameters:
      - name: id
        in: path
        required: true
        description: ID of parent resource
        schema:
          $ref: '#/components/schemas/Common.uuid'
      - name: child_id
        in: path
        required: true
        description: ID of the resource to be updated
        schema:
          $ref: '#/components/schemas/Common.uuid'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secrets.Secret'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Secrets.UpdateSecretRequest'
      tags:
      - Secrets
    delete:
      operationId: DeveloperSecretsRoute_delete
      description: Delete a secret by id
      parameters:
      - name: id
        in: path
        required: true
        description: ID of parent resource
        schema:
          $ref: '#/components/schemas/Common.uuid'
      - name: child_id
        in: path
        required: true
        description: ID of the resource to be deleted
        schema:
          $ref: '#/components/schemas/Common.uuid'
      responses:
        '202':
          description: The request has been accepted for processing, but processing has not yet completed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common.ResourceDeletedResponse'
      tags:
      - Secrets
components:
  schemas:
    Secrets.Secret:
      type: object
      required:
      - id
      - created_at
      - updated_at
      - name
      - value
      properties:
        id:
          allOf:
          - $ref: '#/components/schemas/Common.uuid'
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: When this resource was created as UTC date-time
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: When this resource was updated as UTC date-time
          readOnly: true
        metadata:
          type: object
          additionalProperties: {}
        name:
          type: string
          description: Name of the secret
        description:
          type: string
          description: Description of what the secret is used for
        value:
          type: string
          description: The decrypted secret value
      description: A secret that can be used in tasks and sessions
    Secrets.UpdateSecretRequest:
      type: object
      required:
      - name
      - value
      properties:
        metadata:
          type: object
          additionalProperties: {}
        name:
          type: string
          description: Name of the secret
        description:
          type: string
          description: Description of what the secret is used for
        value:
          type: string
          description: The decrypted secret value
    Secrets.CreateSecretRequest:
      type: object
      required:
      - name
      - value
      properties:
        metadata:
          type: object
          additionalProperties: {}
        name:
          type: string
          description: Name of the secret
        description:
          type: string
          description: Description of what the secret is used for
        value:
          type: string
          description: The decrypted secret value
    Common.ResourceDeletedResponse:
      type: object
      required:
      - id
      - deleted_at
      - jobs
      properties:
        id:
          allOf:
          - $ref: '#/components/schemas/Common.uuid'
          description: ID of deleted resource
        deleted_at:
          type: string
          format: date-time
          description: When this resource was deleted as UTC date-time
          readOnly: true
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/Common.uuid'
          description: IDs (if any) of jobs created as part of this request
          default: []
          readOnly: true
    Common.uuid:
      type: string
      format: uuid
    Common.limit:
      type: integer
      format: uint16
      minimum: 1
      maximum: 1000
      exclusiveMaximum: true
      description: Limit the number of results
    Common.offset:
      type: integer
      format: uint32
      minimum: 0
      description: Offset to apply to the results
  parameters:
    Common.PaginationOptions.limit:
      name: limit
      in: query
      required: true
      description: Limit the number of items returned
      schema:
        $ref: '#/components/schemas/Common.limit'
        default: 100
      explode: false
    Common.PaginationOptions.sort_by:
      name: sort_by
      in: query
      required: true
      description: Sort by a field
      schema:
        type: string
        enum:
        - created_at
        - updated_at
        default: created_at
      explode: false
    Common.PaginationOptions.direction:
      name: direction
      in: query
      required: true
      description: Sort direction
      schema:
        type: string
        enum:
        - asc
        - desc
        default: asc
      explode: false
    Common.PaginationOptions.metadata_filter:
      name: metadata_filter
      in: query
      required: true
      description: Object to filter results by metadata
      schema:
        type: object
        additionalProperties: {}
        default: {}
      explode: false
    Common.PaginationOptions.offset:
      name: offset
      in: query
      required: true
      description: Offset the items returned
      schema:
        $ref: '#/components/schemas/Common.offset'
        default: 0
      explode: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
    ApiKeyAuth_:
      type: apiKey
      in: header
      name: X-Auth-Key
externalDocs:
  url: https://docs.julep.ai
  description: Julep API documentation