diff --git a/README.md b/README.md index 542c44d7227dd6fd6a4a0a7dbbc147c5624dde9e..20979d84c34015d51d4d7336406e2c467e1e7820 100644 --- a/README.md +++ b/README.md @@ -137,6 +137,40 @@ $this->incrementalVersion = '{incr}'; ``` +## LineageOTA Manual Testing + +With `curl` and `jq` tools you can easily use the REST API to list and get builds. + +### List builds + +> GET /api/v1/{device}/{type} + +To list all builds for a given device by date you can use the following command, +where the `device` is a **FP3** and the build `type` is **stable**. + +``` +curl -s https://ota.ecloud.global/api/v1/FP3/stable | jq '.response |= sort_by(.datetime)' +``` + +You can also list all **version** from a given start point with `User-Agent` header. +Here a example: + +``` +curl -s -A "eOS v1.8" https://ota.ecloud.global/api/v1/FP3/stable | jq '.response |= sort_by(.datetime)' | grep filename +``` + +### List incremental builds + +> GET /api/v1/{device}/{type}/{incr} + +To list all incremental builds for a given device by date you can use the following command, +where the `device` is a **FP3**, the build `type` is **stable** and +the `incremental` build is **eng.root.20230510.011106**. Only builds after the given increment +will be listed. + +``` +curl -s https://ota.ecloud.global/api/v1/FP3/stable/eng.root.20230510.011106 | jq '.response |= sort_by(.datetime)' +``` ## How to integrate within your ROM