User Web Interfaces

Auterion apps can expose their own HTTP endpoints on the vehicle. They tie in with other on-board HTTP APIs such that they can be accessed from the outside.

This API requires at least auterion-app-api: 2 to be available

Overview

All Auterion powered vehicles serve a webpage, when accessing them on their IP. For a Skynode connected to the PC via USB, the webpage can be accessed on 10.41.1.1

This webpage, along with AuterionOS specific system APIs are served on the vehicle port 80. AuterionOS apps can integrate with this sytem, and add their own endpoints to this API structure at the following location:

/apps/<app-author>.<app-name>/

For example, the HTTP endpoints of an app with the name example-webservice authored by com.auterion would be reachable on /apps/com.auterion.example-webservice/

API setup

HTTP routes into the apps can be set in the auterion-app.yml file like so

Example

# ...auterion-app.yml...
services:
    <my-service-name>:
        build: <location of Dockerfile>
        
        http:
          /:                              # The URI that should be mapped
            static-root: /data/site       # In case of static content, 
                                          # point to a directory in /data
            function:
              type: ui                    # Assign function UI to the endpoint
              label: example-webservice   # This makes the site reachable from the
                                          # vehicle webpage
          
          /api                   # The URI that should be mapped
            proxy:               # In case of proxying the requests
              port: 5000         # the port in the docker container to proxy to

Endpoints

Each key of the http object defines an endpoint pattern to intercept. In case of just / all requests to /apps/<app-author>.<app-name>/ get intercepted. In case of /<endpoint> all requests to /apps/<app-author>.<app-name>/<endpoint> get intercepted.

Each endpoint is either of type

  • static-root: Just serve static content on that endpoint. The directory must lie within /data of the app container. The app is responsible of placing the content there

  • proxy: Proxy all requests to an HTTP server running within the app container.

Endpoint functions

Each endpoint optionally can have one or multiple functions. These functions are exposed to the rest of the system and allow the system to discover standardized features that apps offer. The only currently supported function is the type ui which exposes a link of the to the endpoint in the vehicle webpage.

Last updated