openapi: 3.0.1
info:
  title: RUM Configuration API
  version: "1.0"
servers:
  - url: https://localhost/rum/v1
paths:
  /ProviderConfig:
    get:
      summary: Configuration data for one provider
      operationId: GetProviderConfiguration
      parameters:
        - in: query
          name: apiKey
          schema:
            type: string
          description: API Key assigned to this implementation
        - in: query
          name: instanceId
          schema:
            type: string
          required: true
          description: Unique string for this implementation
                       on this device
      responses:
        '200':
          description: Configuration object
          content:
            application/json:
              schema:
                $ref:
                 '#/components/schemas/ProviderConfigurationData'
  /RueConfig:
    get:
      summary: Configuration data for one RUE
      operationId: GetRueConfiguration
      parameters:
        - in: query
          name: apiKey
          schema:
            type: string
          description: API Key assigned to this implementation
        - in: query
          name: instanceId
          schema:
            type: string
          required: true
          description: Unique string for this implementation
                       on this device
      responses:
        '200':
          description: Configuration object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RueConfigurationData'
  /Versions:
    servers:
      - url: https://localhost/rum
        description: Override base path for Versions query
    get:
      summary: Retrieves all supported versions
      operationId: RetrieveVersions
      responses:
        '200':
          description: Versions supported
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VersionsArray'
components:
  schemas:
    ProviderConfigurationData:
      type: object
      required:
        - dial-around
      properties:
        signup:
          type: array
          items:
            type: object
            required:
              - language
              - uri
            properties:
              language:
                type: string
                description: Entry from IANA "Language Subtag
                  Registry"
              uri:
                type: string
                format: uri
                description: URI to signup website supporting
                  this language
        dial-around:
          type: array
          items:
            type: object
            required:
              - language
              - front-door
              - oneStage
            properties:
              language:
                type: string
                description: Entry from IANA "Language Subtag
                  Registry"
              front-door:
                type: string
                format: uri
                description: SIP URI for two-stage dial-around
              oneStage:
                type: string
                format: uri
                description: SIP URI for one-stage dial-around
        helpDesk:
          type: array
          items:
            type: object
            required:
              - language
              - uri
            properties:
              language:
                type: string
                description: Entry from IANA "Language Subtag
                   Registry"
              uri:
                type: string
                format: uri
                description: SIP URI of help desk supporting language
    RueConfigurationData:
      type: object
      required:
        - phone-number
        - provider-domain
      properties:
        lifetime:
          type: integer
          description: How long (in seconds) the RUE MAY cache the
                       configuration values
        sip-password:
          type: string
        phone-number:
          type: string
          description: Telephone number assigned this subscriber in
            E.164 format
        user-name:
          type: string
          description: A username assigned to this subscriber
        display-name:
          type: string
          description: Display name for the subscriber
        provider-domain:
          type: string
          description: Domain of the provider for this subscriber
        outbound-proxies:
          type: array
          items:
             type: string
             format: uri
             description: SIP URI of a proxy to be used when sending
                       requests to the provider
        mwi:
          type: string
          format: uri
          description: A URI identifying a SIP event server that
              generates "message-summary" events for this subscriber
        videomail:
          type: string
          format: uri
          description: An HTTPS or SIP URI that can be used to
                       retrieve video mail messages
        contacts:
          type: object
          description: Server and credentials for contact
             import/export
          required:
            - contacts-uri
          properties:
            contacts-uri:
              type: string
              format: uri
              description: An HTTPS URI that may be used to export
                (retrieve) the subscriber's complete contact list
                managed by the provider
            contacts-username:
              type: string
              description: Username for authentication with the
                CardDAV server.  Use SIP user-name if not provided
            contacts-password:
              type: string
              description: Password for authentication. Use provider
                sip-password if not provided
        carddav:
          type: object
          description: CardDAV server and user information that can
               be used to synchronize the RUE's contact list with
               the contact list managed by the provider
          required:
            - carddav-domain
          properties:
            carddav-domain:
              type: string
              description: CardDAV server address
            carddav-username:
              type: string
              description: Username for authentication with the
                 CardDAV server.  Use SIP user-name if not provided
            carddav-password:
              type: string
              description: Password for authentication to the CardDAV
                 server. Use provider sip-password if not provided
        sendLocationWithRegistration:
          type: boolean
          description: True if the RUE should send a Geolocation
               header field with REGISTER; false if it should not.
               Defaults to false if not present
        ice-servers:
          type: array
          items:
            type: object
            required:
              - server-type
              - uri
            properties:
              server-type:
                type: string
                description: Server type ("stun" or "turn")
              uri:
                type: string
                format: uri
                description: URIs identifying STUN and TURN servers
                  available for use by the RUE for establishing
                  media streams in calls via the provider
    VersionsArray:
      type: object
      required:
        - versions
      properties:
        versions:
          type: array
          items:
            type: object
            required:
              - major
              - minor
            properties:
              major:
                type: integer
                format: int32
                description: Version major number
              minor:
                type: integer
                format: int32
                description: Version minor number
