Page:
OTA Server
Clone
5
OTA Server
CommanderRedYT edited this page 2021-12-07 14:50:53 +01:00
Table of Contents
We have implemented a simple "protocol" called otaDescriptor. This is used to provide information to which builds are available for updating.
The config parameter should only contain the domain (for example example.com or http://example.com).
URL structure
example.com/otaDescriptor?all&username=foo
| |
/ \
/ \
/ \
[ Show all commits ] [ Username (Required) ]
example.com/otaDescriptor?username=foo&count=8&branch=master
| | |
/ | \
/ | \
/ | \
[ Username (Optional) ] | [ Branch (Optional) ]
|
[ Count (How many commits should be in response; Optional) ]
example.com/otaDescriptor
This should return last 10 commits of every user (as no user was specified)
example.com/otaDescriptor?branches
This should return an array of branch names
WARNING: This should return a maximum amount of 20 branch names as the Json Buffer Size is only 1K large.
Responses
Example response (/otaDescriptor?username=foo):
{
"availableVersions":{
"c1d2320.Advanced-Text-renderer":true,
"704109f.master":true,
"aee7a35.master":true,
"dea0280.master":true,
"9a879ec.master":true,
"4411a82.master":true,
"eb7f5a0.master":true,
"9981132.master":true,
"562fc16.master":true,
"d4325f2.master":true
},
"url":"\/builds\/foo\/{}.bin",
"latest":"\/builds\/foo\/latest.bin",
"currentVersion":"c1d2320.Advanced-Text-renderer",
"currentVersionHasOta":true
}
Example response (/otaDescriptor?username=foo&branch=master):
{
"availableVersions":{
"704109f.master":true,
"aee7a35.master":true,
"dea0280.master":true,
"9a879ec.master":true,
"4411a82.master":true,
"eb7f5a0.master":true,
"9981132.master":true,
"562fc16.master":true,
"d4325f2.master":true,
"740ca46.master":true
},
"url":"\/builds\/foo\/{}.bin",
"latest":"\/builds\/foo\/latest.bin",
"currentVersion":"704109f.master",
"currentVersionHasOta":true
}
Example response (/otaDescriptor?branches)
[
"master",
"feature-1"
]