openapi: 3.0.0
info:
  title: SS_UserProfileRetrieval
  description: |
    API for SEAL User Profile Retrieval.
    © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC).
    All rights reserved.
  version: "1.0.0"
externalDocs:
  description: 3GPP TS 29.549 V16.0.0 Service Enabler Architecture Layer for Verticals (SEAL); Application Programming Interface (API) specification; Stage 3.
  url: http://www.3gpp.org/ftp/Specs/archive/29_series/29.549/
security:
  - {}
  - oAuth2ClientCredentials: []
servers:
  - url: '{apiRoot}/ss-upr/v1'
    variables:
      apiRoot:
        default: https://example.com
        description: apiRoot as defined in clause 6.5 of 3GPP TS 29.549
paths:
  /val-services:
    get:
      description: Retrieve VAL User or VAL UE profile information.
      parameters: 
        - name: val-service-id
          in: query
          description: String identifying an individual VAL service
          required: false
          schema:
            type: string
        - name: val-tgt-ue
          in: query
          description: Identifying a VAL target UE.
          required: true 
          schema:
            $ref: '#/components/schemas/ValTargetUe'
      responses:
        '200':
          description: The Profile information of the VAL User or VAL UE.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProfileDoc'
                minItems: 0
        '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/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:
    ProfileDoc:
      type: object
      properties:
        profileInformation:
          type: string
          description: Profile information associated with the valUserId or valUeId.
        valTgtUe:
          $ref: '#/components/schemas/ValTargetUe'
      required:
        - profileInformation
        - valTgtUe
    ValTargetUe:
      type: object
      properties:
        valUserId:
          type: string
          description: Unique identifier of a VAL user.
        valUeId:  
          type: string
          description: Unique identifier of a VAL UE.
      oneOf:
        - required: [valUserId]
        - required: [valUeId]