openapi: 3.0.0

info:
  title: ADAE Data Network Energy Analytics
  version: 1.0.0
  description: |
    ADAE Server provides DN energy efficiency and consumption analytics.  
    © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.

externalDocs:
  description: >
    3GPP TS 29.549 v19.5.0; Service Enabler Architecture Layer for Verticals (SEAL); Application
    Programming Interface (API) specification; Stage 3.
  url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.549/

servers:
  - url: '{apiRoot}/ss-adae-dnea/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 6.5 of 3GPP TS 29.549

security:
  - {}
  - oAuth2ClientCredentials: []


paths:
  /energy-analytics:
    get:
      summary: Obtain ADAE DN Energy Analytics.
      operationId: GetAdeaDnEnergyAnalytics
      tags:
        - Obtain ADAE DN Energy Analytics (Collection)
      parameters:
        - name: filt-criteria
          in: query
          description: >
             Represents ADAE DN Energy Analytics filtering criteria.
          required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DNEnergyAnalytics'
        - name: supported-features
          in: query
          description: >
            Contains supported features information, used to negotiate the applicability
            of optional features.
          schema:
            $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      responses:
        '200':
          description: >
            The response body contains energy efficiently and consumption analytics.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DNEnergyAnalytics'
        '307':
          $ref: 'TS29122_CommonData.yaml#/components/responses/307'
        '308':
          $ref: 'TS29122_CommonData.yaml#/components/responses/308'
        '400':
          $ref: 'TS29122_CommonData.yaml#/components/responses/400'
        '401':
          $ref: 'TS29122_CommonData.yaml#/components/responses/401'
        '403':
          $ref: 'TS29122_CommonData.yaml#/components/responses/403'
        '404':
          $ref: 'TS29122_CommonData.yaml#/components/responses/404'
        '406':
          $ref: 'TS29122_CommonData.yaml#/components/responses/406'
        '429':
          $ref: 'TS29122_CommonData.yaml#/components/responses/429'
        '500':
          $ref: 'TS29122_CommonData.yaml#/components/responses/500'
        '503':
          $ref: 'TS29122_CommonData.yaml#/components/responses/503'
        default:
          $ref: 'TS29122_CommonData.yaml#/components/responses/default'

components:
  securitySchemes:
    oAuth2ClientCredentials:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: '{tokenUrl}'
          scopes: {}

  schemas:
    DNEnergyAnalytics:
      description: Represents the energy analytics for a DN.
      type: object
      properties:
        analyticsId:
            $ref: '#/components/schemas/AnalyticsEventId'
        analyticsType:
          $ref: 'TS29549_SS_ADAE_VALPerformanceAnalytics.yaml#/components/schemas/AnalyticsType'
        dnai:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Dnai'
        dnn:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Dnn'
        energyMetrics:
            $ref: '#/components/schemas/EnergyMetrics'
        profileCriteria:
          type: string
        confLevel:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
        area:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/LocationArea5G'
        timeVal:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/TimeWindow'
        reportReqs:
          $ref: 'TS29549_SS_NetworkResourceMonitoring.yaml#/components/schemas/ReportingRequirements'
      required:
        - analyticsId
        - analyticsType
      anyOf:
        - required: [dnai]
        - required: [dnn]

    EnergyMetrics:
      description: Represents the metrics of the energy for a DN.
      type: object
      properties:
        powUseEffect:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
        specEnergyCons:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'


# Simple data types 
#

# Enumerations
#

    AnalyticsEventId:
      anyOf:
      - type: string
        enum:
          - EDGE_PERFORMANCE_ANALYTICS
          - EDGE_PLATFORM_ANALYTICS
          - DN_ENERGY_ANALYTICS
          - EAS_ANALYTICS
      - type: string
        description: >
          This string provides forward-compatibility with future
          extensions to the enumeration and is not used to encode
          content defined in the present version of this API.
      description: |
        Identifies how the analytics can be related to an Event and be identified that way.
        Possible values are:
        - EDGE_PERFORMANCE_ANALYTICS: Analytics are for Edge performance.
        - DN_ENERGY_ANALYTICS: Analytics are for data network energy.

