openapi: 3.0.0

info:
  title: SS_KeyInfoRetrieval
  description: |
    API for SEAL Key Information Retrieval.  
    © 2024, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).  
    All rights reserved.
  version: "1.3.0-alpha.1"

externalDocs:
  description: >
    3GPP TS 29.549 V19.1.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-kir/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 6.5 of 3GPP TS 29.549

paths:
  /key-records:
    get:
      description: Retrieve key management information specific to VAL service.
      operationId: RetrieveKeyMgmtInfo
      tags:
        - Key Records (Collection)
      parameters: 
        - name: val-service-id
          in: query
          description: String identifying an individual VAL service
          required: true
          schema:
            type: string
        - name: val-tgt-ue
          in: query
          description: Identifying a VAL target.
          required: false
          content:
            application/json:
              schema:
                $ref: 'TS29549_SS_UserProfileRetrieval.yaml#/components/schemas/ValTargetUe'
      responses:
        '200':
          description: The key management information of the VAL service, VAL User or VAL UE.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValKeyInfo'
        '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:
    ValKeyInfo:
      description: >
        Represents key management information associated with VAL server, VAL user or VAL UE.
      type: object
      properties:
        userUri:
          $ref: 'TS29122_CommonData.yaml#/components/schemas/Uri'
        skmsId:
          type: string
          description: String identifying the key management server.
        valService:
          type: string
          description: Unique identifier of a VAL Service.
        valTgtUe:
          $ref: 'TS29549_SS_UserProfileRetrieval.yaml#/components/schemas/ValTargetUe'
        keyInfo:
          type: string
          description: Key management information specific to VAL service, VAL User or VAL UE.
      required:
        - userUri
        - valService
        - keyInfo

