openapi: 3.0.0

info:
  title: ACR Events Service
  version: 1.0.0
  description: |
    ACR Events Service.  
    © 2025, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.

externalDocs:
  description: >
    3GPP TS 29.558 V19.5.0; Enabling Edge Applications;
    Application Programming Interface (API) specification; Stage 3.
  url: https://www.3gpp.org/ftp/Specs/archive/29_series/29.558/

servers:
  - url: '{apiRoot}/eecs-ae/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 5.2.4 of 3GPP TS 29.122

security:
  - {}
  - oAuth2ClientCredentials: []

paths:
  /subscriptions:
    post:
      summary: Request the creation of an ACR Events Subscription.
      operationId: CreateAcrEventsSubsc
      tags:
        - ACR Events Subscriptions (Collection)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcrEventsSubsc'
      responses:
        '201':
          description: >
            Created. The ACR Events Subscription is successfully created and a
            representation of the created Individual ACR Events Subscription resource
            shall be returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrEventsSubsc'
          headers:
            Location:
              description: >
                Contains the URI of the created Individual ACR Events Subscription
                resource.
              required: true
              schema:
                type: string
        '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'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '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'
      callbacks:
        AcrEventsNotif:
          '{$request.body#/notifUri}':
            post:
              requestBody:
                required: true
                content:
                  application/json:
                    schema:
                      $ref: '#/components/schemas/AcrEventsNotif'
              responses:
                '204':
                  description: >
                    No Content. The ACR Events Notification is successfully received and
                    acknowledged.
                '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'
                '411':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/411'
                '413':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/413'
                '415':
                  $ref: 'TS29122_CommonData.yaml#/components/responses/415'
                '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'

  /subscriptions/{subscriptionId}:
    parameters:
      - name: subscriptionId
        in: path
        description: Subscription Id.
        required: true
        schema:
          type: string

    get:
      summary: Retrieve an existing Individual ACR Events Subscription resource.
      operationId: GetIndAcrEventsSubsc
      tags:
        - Individual ACR Events Subscription (Document)
      responses:
        '200':
          description: >
            OK. The requested Individual ACR Events Subscription resource shall be
            returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrEventsSubsc'
        '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'

    put:
      summary: Request the update of an existing Individual ACR Events Subscription resource.
      operationId: UpdateIndAcrEventsSubsc
      tags:
        - Individual ACR Events Subscription (Document)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AcrEventsSubsc'
      responses:
        '200':
          description: >
            OK. The Individual ACR Events Subscription resource is successfully updated
            and a representation of the updated resource shall be returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrEventsSubsc'
        '204':
          description: >
            No Content. The Individual ACR Events Subscription resource is successfully
            updated and no content is returned in the response body.
        '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'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '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'

    patch:
      summary: Request the modification of an existing Individual ACR Events Subscription resource.
      operationId: ModifyIndAcrEventsSubsc
      tags:
        - Individual ACR Events Subscription (Document)
      requestBody:
        required: true
        content:
          application/merge-patch+json:
            schema:
              $ref: '#/components/schemas/AcrEventsSubscPatch'
      responses:
        '200':
          description: >
            OK. The Individual ACR Events Subscription resource is successfully modified
            and a representation of the updated resource shall be returned in the response body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AcrEventsSubsc'
        '204':
          description: >
            No Content. The Individual ACR Events Subscription resource is successfully
            modified and no content is returned in the response body.
        '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'
        '411':
          $ref: 'TS29122_CommonData.yaml#/components/responses/411'
        '413':
          $ref: 'TS29122_CommonData.yaml#/components/responses/413'
        '415':
          $ref: 'TS29122_CommonData.yaml#/components/responses/415'
        '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'

    delete:
      summary: Request the deletion of an existing Individual ACR Events Subscription resource.
      operationId: DeleteIndAcrEventsSubsc
      tags:
        - Individual ACR Events Subscription (Document)
      responses:
        '204':
          description: >
            No Content. The Individual ACR Events Subscription resource is successfully
            deleted.
        '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'
        '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:

#
# STRUCTURED DATA TYPES
#


    AcrEventsSubsc:
      description: >
        Represents a ACR Events Subscription Request.
      type: object
      properties:
        requestorId:
          type: string
        events:
          type: array
          items:
            $ref: '#/components/schemas/AcrEvent'
          minItems: 1
        ednInfo:
          $ref: 'TS29558_Eecs_EESRegistration.yaml#/components/schemas/EDNInfo'
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        expTime:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/DateTime'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - requestorId
        - events
        - notifUri

    AcrEventsSubscPatch:
      description: >
        Represents the requested modifications to a ACR Events Subscription.
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/AcrEvent'
          minItems: 1
        ednInfo:
          $ref: 'TS29558_Eecs_EESRegistration.yaml#/components/schemas/EDNInfo'
        notifUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        expTime:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/DateTimeRm'

    AcrEventsNotif:
      description: >
        Represents a ACR Events Notification.
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/AcrEvent'
          minItems: 1
        subscriptionId:
          type: string
        relocRatio:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Uinteger'
      required:
        - subscriptionId


# SIMPLE DATA TYPES
#

#
# ENUMERATIONS
#

    AcrEvent:
      anyOf:
      - type: string
        enum:
          - EDN_OVERLOAD
      - 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: |
        Represents the ACR event.  
        Possible values are:
        - EDN_OVERLOAD: Indicates that ACR event is EDN overload.
