URI Handler | AppStream | AppStream 0.16
Description: 4.2.1 Introduction # In order to allow installation of AppStream components from websites, software-centers implementing AppStream may choose to also support the appstream: URIs. This allows upstream projects to trigger an installation of their application from their homepage on any supporting distr…

Jump to content Jump to page navigation: previous page [access key p]/next page [access key n]
AppStream
AppStream › Miscellaneous › URI Handler
AppStream › Miscellaneous › URI Handler
Top
←→

## 4.2 URI Handler #

### 4.2.1 Introduction #

In order to allow installation of AppStream components from websites, software-centers implementing AppStream may choose to also support the `appstream:` URIs.

This allows upstream projects to trigger an installation of their application from their homepage on any supporting distribution. It also is helpful for web-based software-centers.

### 4.2.2 URI schema #

Software centers handling `appstream:` URIs should provide a handler for the `x-scheme-handler/appstream` mimetype. An AppStream URI follows the schema `appstream:%{component-id}`.

If a component is known by multiple alternative IDs, more component IDs may be defined in a comma-separated list in the query component of the URI using the `alt` key. This may be necessary if an application has switched its ID, but the same URI may be called on systems which still only know the old ID. Software centers must try to find the initial ID first and, failing to find it in their catalog, may try the alternative IDs in order of appearance in the query.

Example HTML code:

    <a href="appstream:org.kde.discover.desktop">Install KDE Discover</a>
    <a href="appstream:org.gnome.Software.desktop">Install GNOME-Software</a>
    <a href="appstream:org.freedesktop.appstream.cli">Install AppStreamCLI</a>
    <a href="appstream:org.example.foo?alt=com.github.darthvader.foo,net.launchpad.vader.foo">Install Foo</a>

### 4.2.3 AppStream Buttons #

If you want to allow users to open your software in their local software center from your website, you might want to use one of the easily recognizable AppStream buttons for your `appstream:` link.

SVG (https://github.com/ximion/appstream/blob/master/docs/images/src/svg/appstream-button1.svg)

SVG (https://github.com/ximion/appstream/blob/master/docs/images/src/svg/appstream-button2.svg)