swagger: "2.0"
info:
  description: "Documentation of SmartMMI Datacloud Application"
  version: "1.0.0"
  title: "SmartMMI"
host: "hub.smartmmi.de"
basePath: "/platform/v1"
schemes:
- "https"
paths:
  /health/all:
    get:
      tags:
      - "Health Check"
      summary: "Query health status of SmartMMI Datacloud"
      produces:
      - "application/json"
      responses:
        "200":
          description: "successful operation"
        "400":
          description: "Invalid status value"
          
  /poi/{bbox}:
    get:
      tags:
      - "POI Data"
      summary: "Load POI data based on Bounding Box"
      parameters:
      - in: path
        name: bbox
        type: string
        required: true
        description: "Bounding Box of requested POIs"
      produces:
      - "application/json"
      responses:
        "200":
          description: "List of all POIs in Boundingbox"
      security:
      - basicAuth: []
  /poi/{bbox}/{category}:
    get:
      tags:
      - "POI Data"
      summary: "Load POI data based on Bounding Box"
      parameters:
      - in: path
        name: bbox
        type: string
        required: true
        description: "Bounding Box of requested POIs"
      - in: path
        name: category
        type: string
        required: true
        description: "Filter for specific Categories"
      produces:
      - "application/json"
      responses:
        "200":
          description: "List of all POIs in Boundingbox of specific category"
      security:
      - basicAuth: []
  /poi/{bbox}/{category}/{category_value}:
    get:
      tags:
      - "POI Data"
      summary: "Load POI data based on Bounding Box"
      parameters:
      - in: path
        name: bbox
        type: string
        required: true
        description: "Bounding Box of requested POIs"
      - in: path
        name: category
        type: string
        required: true
        description: "Filter for specific Categories"
      - in: path
        name: category_value
        type: string
        required: true
        description: "Filter for specific category value"
      produces:
      - "application/json"
      responses:
        "200":
          description: "List of all POIs in Boundingbox of specific category and category value"
      security:
      - basicAuth: []
          
          
  /efa/trip:
    post:
      tags:
      - "EFA"
      summary: "Submit a TripRequest"
      description: "Submit a standard TripRequest. Request if forwarded to EFA with adapted parameters based on context."
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Standard TripResponse"
      parameters:
      - in: "body"
        name: "body"
        description: "Standard TripRequest"
        required: true
        schema:
          {}
      security:
      - basicAuth: []
      
  /efa/tripstop:
    post:
      tags:
      - "EFA"
      summary: "Submit a TripStopRequest"
      description: "Submit a standard TripStopRequest. Request if forwarded to EFA with adapted parameters based on context."
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Standard TripStopResponse"
      parameters:
      - in: "body"
        name: "body"
        description: "Standard TripStopRequest"
        required: true
        schema:
          {}
      security:
      - basicAuth: []
  
  /efa/stopfinder:
    post:
      tags:
      - "EFA"
      summary: "Submit a StopFinderRequest"
      description: "Submit a standard StopFinderRequest. Request if forwarded to EFA with adapted parameters based on context."
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Standard StopFinderResponse"
      parameters:
      - in: "body"
        name: "body"
        description: "Standard StopFinderRequest"
        required: true
        schema:
          {}
      security:
      - basicAuth: []
      
  /efa/departuremonitor:
    post:
      tags:
      - "EFA"
      summary: "Submit a DepartureMonitorRequest"
      description: "Submit a standard DepartureMonitorRequest. Request if forwarded to EFA with adapted parameters based on context."
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Standard DepartureMonitorRequest"
      parameters:
      - in: "body"
        name: "body"
        description: "Standard DepartureMonitorResponse"
        required: true
        schema:
          {}
      security:
      - basicAuth: []
  
  
  
  /user/profile:
    put:
      tags:
      - "User Profile"
      summary: "Create a new UserProfile"
      description: "Create a UserProfile from scratch"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Created new UserProfile"
        "500":
          description: "UserProfile creation failed"
      parameters:
      - in: "body"
        name: "body"
        description: "UserProfile without user id"
        required: true
        schema:
          {}
      security:
      - basicAuth: []
    post:
      tags:
      - "User Profile"
      summary: "Update an existing UserProfile"
      description: "Update an existing UserProfile"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Updated UserProfile"
        "404":
          description: "Provided user id does not exist"
        "500":
          description: "UserProfile creation failed"
      parameters:
      - in: "body"
        name: "body"
        description: "UserProfile with user id"
        required: true
        schema:
          {}
      security:
      - basicAuth: []
  /user/profile/{userid}:
    get:
      tags:
      - "User Profile"
      summary: "Query an existing UserProfile"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      parameters:
      - in: path
        name: userid
        type: string
        required: true
        description: "User ID"
      responses:
        "200":
          description: "The requested UserProfile"
        "404":
          description: "Provided user id does not exist"
        "500":
          description: "UserProfile query failed"
      security:
      - basicAuth: []
      
      
  /user/state:
    put:
      tags:
      - "User State"
      summary: "Create a new UserState"
      description: "Create a UserState from scratch"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Created new UserState"
        "500":
          description: "UserState creation failed"
      parameters:
      - in: "body"
        name: "body"
        description: "UserState without user id"
        required: true
        schema:
          {}
      security:
      - basicAuth: []
    post:
      tags:
      - "User State"
      summary: "Update an existing UserState"
      description: "Update an existing UserState"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Updated UserState"
        "404":
          description: "Provided user id does not exist"
        "500":
          description: "UserState creation failed"
      parameters:
      - in: "body"
        name: "body"
        description: "UserState with user id"
        required: true
        schema:
          {}
      security:
      - basicAuth: []
  /user/state/{userid}:
    get:
      tags:
      - "User State"
      summary: "Query an existing UserState"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      parameters:
      - in: path
        name: userid
        type: string
        required: true
        description: "User ID"
      responses:
        "200":
          description: "The requested UserState"
        "404":
          description: "Provided user id does not exist"
        "500":
          description: "UserState query failed"
      security:
      - basicAuth: []
  
  
  /window/update:
    post:
      tags:
      - "SmartWindow"
      summary: "Update an the context of a SmartWindow"
      description: "Update an the context of a SmartWindow"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Updated SmartWindow"
        "404":
          description: "SmartWindow does not exist"
        "500":
          description: "SmartWindow update failed"
      parameters:
      - in: "body"
        name: "body"
        description: "SmartWindow context with smartwindow id"
        required: true
        schema:
          {}
      security:
      - basicAuth: []
  /window/{smartwindowid}:
    get:
      tags:
      - "SmartWindow"
      summary: "Query the context of a SmartWindow"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      parameters:
      - in: path
        name: smartwindowid
        type: string
        required: true
        description: "SmartWindow ID"
      responses:
        "200":
          description: "The requested SmartWindow"
        "404":
          description: "Provided smartwindow id does not exist"
        "500":
          description: "SmartWindow query failed"
      security:
      - basicAuth: []
    
    
  /tracking:
    post:
      tags:
      - "Tracking"
      summary: "Store tracking information"
      description: "Store tracking information for potential user studies"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "Event registered"
        "500":
          description: "Failed to register event"
      parameters:
      - in: "body"
        name: "body"
        description: "Tracked event"
        required: true
        schema:
          {}
      security:
      - basicAuth: []


securityDefinitions:
  basicAuth:
    type: basic
  
