Added ota wiki
71
OTA-Server.md
Normal file
71
OTA-Server.md
Normal file
@@ -0,0 +1,71 @@
|
||||
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)
|
||||
```
|
||||
## Responses
|
||||
|
||||
Example response (/otaDescriptor?username=foo):
|
||||
```json
|
||||
{
|
||||
"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):
|
||||
```json
|
||||
{
|
||||
"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
|
||||
}
|
||||
```
|
Reference in New Issue
Block a user