Skip to main content

Generic Integration

HexDroid Release API is a simple HTTP GET that can be used to check for updates.

This approach is compatible with any device type, including IoT, Linux-based, and Android-based systems and other embedded or custom systems.
It offers maximum flexibility, allowing your code and logic to fully control and manage updates according to your specific requirements.

It is available on https://api.hexdroid.com/edge/ota/v1/release

To call it, you need to provide the following query parameters:

  • target - The target is a unique string that identifies a specific software distribution. For example, in Android/AOSP a target might be: "google/shamu/shamu/user/release-keys"
  • deviceId - Device ID, this is used for determining the Cohort a device is in.
  • currentVersion - The current software version code, this is used to determine the best&safest way for device to get to latest available version.

Include the X-Edge-Token header with your API token to authenticate the request.

Example:

curl --request GET \
--url 'https://api.hexdroid.com/edge/ota/v1/release?target=google%2Fshamu%2Fshamu%2Fuser%2Frelease-keys&deviceId=my_serial_no&currentVersion=1.0.5' \
--header "X-Edge-Token: ${HEXDROID_TOKEN}"
tip

For detailed explanations of terms like target, cohort, and versioning, visit the terminology page.

Responses

Success Responses

  • 200 OK – A new version is available. The response payload will contain details about the update.
  • 202 Accepted – No new version is available. The response payload will explain why there is no update.

Error Responses

  • 400 Bad Request – The request is malformed (e.g., missing required query parameters).
  • 401 Unauthorized – The API token is invalid or missing.
  • 406 Not Acceptable – Server does not support request format in Accept header.

Encoding

By default, the server responds with JSON if no additional headers are provided.

To request a different response format, include the Accept header in your request.

Supported Formats

  • JSON
    • Accept: application/json
  • ProtoBuff
    • Accept: application/protobuf
info

If you need support for additional formats, feel free to contact our support team at: support@hexdroid.com

JSON

Update Available

Schema:

{
"status": "available",
"value": {
"reason": "string",
"info": {
"target": "string",
"versionCode": "int64",
"versionName": "string"
},
"payloads": [
{
"type": "string",
"size": "int64",
"url": "string",
"fileName": "string"
}
]
}
}

Example:

{
"status": "available",
"value": {
"reason": "...",
"info": {
"versionCode": 173560,
"versionName": "1.0.0",
"target": "google/shamu/shamu/user/release-keys"
},
"payloads": [
{
"type": "ota-ab",
"size": 256,
"url": "https://download.hexdroid.com/token=AAAAAAAAAAAAAAAAAAAA",
"fileName": "ota.bin"
}
]
}
}

No Update

Schema:

{
"status": "noUpdate",
"value": {
"reason": "string"
}
}

Example:

{
"status": "noUpdate",
"value": {
"reason": "Unable to determine cohort for this update, aborting"
}
}

ProtoBuff

Schema:

syntax = "proto3";
package com.hexdroid.protocol.edge.releases;

message EdgeReleaseStatusResult {
message Available {
message Info {
string target = 1;
int64 versionCode = 2;
string versionName = 3;
}
message Payload {
string type = 1;
int64 size = 2;
string url = 3;
string fileName = 4;
}
Info info = 1;
repeated Payload payload = 2;
string reason = 3;
}
message NoUpdate {
string reason = 1;
}
oneof Status {
Available available = 1;
NoUpdate noUpdate = 2;
}
}