Spring Boot 3 Environment API

Application environment properties and configuration

OpenAPI Specification

spring-boot-3-environment-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Spring Boot 3 Actuator Environment API
  description: Production-ready monitoring and management endpoints provided by Spring Boot 3 Actuator. Includes health checks, Micrometer metrics, environment inspection, logger configuration, thread dumps, scheduled tasks, HTTP exchange tracing, and more. Endpoints are served under the /actuator base path and can be secured via Spring Security.
  version: 3.2.0
  contact:
    name: Spring Team
    url: https://spring.io/team
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: http://localhost:8080/actuator
  description: Local Spring Boot 3 application with Actuator enabled
tags:
- name: Environment
  description: Application environment properties and configuration
paths:
  /env:
    get:
      operationId: getEnvironment
      summary: Get Environment Properties
      description: Returns all application environment properties grouped by property source (application.properties, system properties, environment variables, etc.).
      tags:
      - Environment
      responses:
        '200':
          description: Environment properties
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EnvironmentResponse'
  /env/{toMatch}:
    get:
      operationId: getEnvironmentProperty
      summary: Get Environment Property
      description: Returns the value and origin of a specific environment property key.
      tags:
      - Environment
      parameters:
      - name: toMatch
        in: path
        required: true
        description: Property key to look up (e.g., spring.application.name)
        schema:
          type: string
          example: spring.application.name
      responses:
        '200':
          description: Property value and origin
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PropertyDetail'
        '404':
          description: Property not found
components:
  schemas:
    PropertySource:
      type: object
      description: A single property source with its properties
      properties:
        name:
          type: string
          description: Property source name
        properties:
          type: object
          description: Properties from this source
          additionalProperties:
            type: object
            properties:
              value:
                description: Property value (may be masked for sensitive values)
              origin:
                type: string
                description: Where this property was defined
    EnvironmentResponse:
      type: object
      description: Application environment organized by property source
      properties:
        activeProfiles:
          type: array
          description: Currently active Spring profiles
          items:
            type: string
        defaultProfiles:
          type: array
          description: Default Spring profiles
          items:
            type: string
        propertySources:
          type: array
          description: Ordered list of property sources
          items:
            $ref: '#/components/schemas/PropertySource'
    PropertyDetail:
      type: object
      description: Detail for a specific environment property
      properties:
        property:
          type: object
          properties:
            source:
              type: string
              description: Property source name
            value:
              description: Current property value
        activeContexts:
          type: array
          items:
            type: string