openapi: 3.0.0

info:
  title: SEAL KM Server Key Management Parameters Provisioning Service
  version: "1.0.0"
  description: |
    SEAL KM Server Key Management Parameters Provisioning Service.  
    © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.

externalDocs:
  description: >
    3GPP TS 29.549 V18.6.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/

security:
  - {}
  - oAuth2ClientCredentials: []

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

paths:
  /request:
    post:
      summary: Enables a service consumer to request key parameters provisioning to the SEAL KM Server..
      operationId: Request
      tags:
        - Key Management Parameters Provisioning Request
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VALKeyPpReq'
      responses:
        '200':
          description: >
            OK. The requested key management parameters are successfully received, processed and
            provisioned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VALKeyPpResp'
        '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'

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

  schemas:
    VALKeyPpReq:
      description: Represents the key management parameters to be provisioned.
      type: object
      properties:
        skmcUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        valServiceId:
          type: string
        valTgtUe:
          $ref: 'TS29549_SS_UserProfileRetrieval.yaml#/components/schemas/ValTargetUe'
        payloadId:
          type: string
        payload:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/Bytes'
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - skmcUri
        - valServiceId
    VALKeyPpResp:
      description: Represents the response to a key management parameters provisioning request.
      type: object
      properties:
        skmcUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        valServiceId:
          type: string
        valTgtUe:
          $ref: 'TS29549_SS_UserProfileRetrieval.yaml#/components/schemas/ValTargetUe'
        payloadId:
          type: string
        skmsId:
          type: string
        suppFeat:
          $ref: 'TS29571_CommonData.yaml#/components/schemas/SupportedFeatures'
      required:
        - skmcUri
        - valServiceId
