Qt Automotive Suite Deployment Server API Reference
API Reference
The following tables describe the requests, their parameters, as well as the corresponding responses.
hello
Checks whether you are using the correct Platform and the right API to communicate with the deployment server.
Parameter | Description |
---|---|
platform | The platform on which the client is running. This parameter sets the architecture of the packages you get. For more information, refer to the settings.APPSTORE_PLATFORM parameter in the appstore/settings.py file. |
version | The Deployment Server's HTTP API version that you are using to communicate with the server. For more information, see settings.APPSTORE_VERSION . |
require_tag (can also be passed as tag ) | An optional parameter used to filter packages by tags. Receives a comma-separated list of tags; these tags must be alphanumeric. Only applications that match any of the specified tags (and not matching those in their conflicts list should be listed). |
architecture | An optional parameter used to filter packages by architecture. Receives the CPU architecture. If the architecture is not speciifed, only packages showing All architecture are listed. |
Returns a JSON object with the following fields and values.
JSON Field | Value | Description |
---|---|---|
status | ok | Successful |
maintenance | The server is in maintenance mode and cannot be used at the moment. | |
incompatible-platform | The platform you are using is not compatible. | |
incompatible-version | The API version you are using is not compatible. | |
incompatible-architecture | The architecture parameter was malformed, or server was unable to parse it. | |
malformed-tag | The tag format is incorrect, may not be alphanumeric, or could not be parsed. |
login
Logs onto the Deployment Server with the given username and password. Either an IMEI or a unique hardware identifier, such as a MAC address, must be provided. This call is necessary to be able to download apps.
Parameter | Description |
---|---|
username | The username. |
password | The password for the specified username. |
Returns a JSON object with the following fields and values.
JSON Field | Value | Description |
---|---|---|
status | ok | Login successful. |
missing-credentials | No username or password was provided. | |
account-disabled | The account has been disabled in the Admin panel. | |
authentication-failed | The user name and/or password may be wrong; or another authentication error occurred. |
logout
Logs out the currently logged-in user from the Deployment Server.
Returns a JSON object with the following fields and values.
JSON Field | Value | Description |
---|---|---|
status | ok | The user has logged out successfully. |
failed | The user was not logged in. |
app/list
Lists all apps. The returned list can be filtered by using the category_id
and the filter
parameters.
Parameter | Description |
---|---|
category_id | Limits the app to those with this category ID only. |
filter | Lists apps with names that match this filter only. |
Returns an array of JSON objects (not an object itself!).
JSON Field | Description |
---|---|
id | A unique app ID, in reverse domain name notation. |
name | The app's name. |
vendor | The vendor name for the app; not the vendor ID. |
category | A category name for the app. |
tags | JSON array of tags required for the app |
conflict_tags | JSON array of tags which will conflict with the app |
version | The app's version, returned as a string. If the there is no version number, the default version, "0.0.0" is returned. |
architecture | The app's architecture, returned as detected in the app's library components. If the application is not native, contains All. Otherwise it is formed like this: mips-little_endian-32-elf Where it is a combination of:
|
briefDescription | A short text that describes the app, limited to 1 line, approximately 80-130 characters. |
category_id | Numeric category ID that matches the app's category. |
purchaseId | Purchase identifier, freeform identifier of specific application on the server. Used as an alternative to ID in app/purchase API call. This is a freeform string, currently a UUID, but no assumptions should be made of the format. |
iconUrl | URL for the icon of this application |
app/icon
Returns an icon for the given application id.
Parameter | Description |
---|---|
id | The app ID. |
architecture | An optional parameter used to filter icons by architecture. Overrides architecture specified in session. Receives the CPU architecture. If architecture was not specified either in session or in this parameter, only icons showing All architecture are listed. |
Returns a PNG image if the app exists; an HTTP 404 error otherwise.
app/description
Returns a description for the given app ID.
Parameter | Description |
---|---|
id | app ID |
Returns a description text for the app, either HTML or plain text.
app/purchase
Returns a URL that you can use to download the requested app for a certain period of time only; configurable in the settings.
Note: This request is a legacy from the AppStore. Changing the name of this API would involve changes in Neptune 3 UI.
Parameter | Description |
---|---|
device_id | A unique device ID for the client hardware; currently not used. |
id | The app ID. |
purchaseId | Alternative app ID, to select specific app with tags and all (see app/list API description). If both ID and purchaseId are specified, ID takes precedence. |
Returns a JSON object:
JSON Field | Value | Description |
---|---|---|
status | ok | Successful |
failed | An error has occurred, check the error field for more information. | |
error | Text. | If the status is equal to failed , contains an error description. |
url | A URL. | The URL from where to download the app. Expires according to the value specified in expiresIn . |
expiresIn | An integer value. | Time in seconds during which the download URL is valid. |
category/list
Lists all of the available categories. Also returns the All metacategory, that is used to hold all available applications.
Returns an array of JSON objects (not an object itself!).
JSON field | Description |
---|---|
id | Unique category id. |
name | Category name. |
category/icon
Returns an icon for the given category ID.
Parameter | Description |
---|---|
id | The category ID. |
Returns an image in PNG format or an empty 1x1 PNG file.
Note: Currently takes the icon of the first app in the category, if it exists.
upload
Accepts remote package upload requests. The user must be in the staff group to use this API. Also requires either basic authentication or a previous call to the login
method. This is a POST request to the server due to the parameters used.
Parameter | Description |
---|---|
description | Package description, long version. Can be text or HTML. |
short-description | One line package description. |
category | Category name for the category where the package will be put. |
vendor | Vendor name for the package. |
package | Package itself. This is uploaded as a file parameter. |
Returns JSON object:
Parameter | Value | Description |
---|---|---|
status | ok | Success |
no description | The description parameter is missing. | |
no short description | The short-description parameter is missing. | |
no category | The category parameter is missing. | |
no vendor | The vendor parameter is missing. | |
Package validation failed | Package did not pass format or sanity validation | |
Non-existing category | The specified category does not match the parameter passed. | |
Non-existing vendor | The specified vendor does not match the parameter passed. | |
no package to upload | There was no package parameter in the request, or it was not a POST request. |
API Usage Examples
The Deployment Server exposes an HTTP API. Arguments to these requests need to be provided using the HTTP GET or POST syntax. The data is returned in JSON, PNG, or text format, depending on the request.
Workflow
- Send a
hello
request to the server to get the current status and to check whether your platform is compatible with this server instance:http://<server>/hello?platform=AM&version=1
Returns:
{ "status": "ok" }
- Login as
user
with password,pass
:http://<server>/login?username=user&password=pass
Returns:
{ "status": "ok" }
- List all applications
http://<server>/app/list
Returns:
[{ "category": "Entertainment", "name": "Nice App", "vendor": "Luxoft", "briefDescription": "Nice App is a really nice app.", "category_id": 4, "id": "com.luxoft.niceapp"}, .... ]
- Request a download for an app:
http://<server>/app/purchase?device_id=12345&id=com.luxoft.niceapp
Returns:
{ "status": "ok", "url": "http://<server>/app/download/com.luxoft.niceapp.2.npkg", "expiresIn": 600 }
- Use the
url
provided in step 4 to download the application withinexpiresIn
seconds.
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.