From 5e9e2ec1773bd568ba4dbf3b9602e5783aa2917a Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Mon, 19 Feb 2024 10:32:09 +0200 Subject: [PATCH] API/Resources: Add docs listing the balenaOS versions of a device type Change-type: minor See: https://balena.zulipchat.com/#narrow/stream/345889-balena-io.2Fos/topic/Determine.20list.20of.20supported.20OS.28hostapp.29.20for.20a.20device-type/near/421801181 --- config/dictionaries/resource.json | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index df3011f6f0..79e0844c44 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -670,6 +670,29 @@ } ] }, + { + "id": "balenaos_versions", + "name": "List balenaOS versions", + "fields": [], + "examples": [ + { + "id": "list-balenaos-versions-for-device-type", + "summary": "List the supported balenaOS versions for a device type", + "description": "To request a list of the supported balenaOS versions for a particular device type, the `DEVICE TYPE SLUG` parameter is required. Even though this query only selects the `raw_version` field, you can additionally specify any of the fields found in the release resource. The Authorization header is optional.", + "method": "GET", + "endpoint": "/v6/release", + "filters": "?\\$select=raw_version&\\$filter=(is_final%20eq%20true)%20and%20(is_invalidated%20eq%20false)%20and%20(status%20eq%20'success')%20and%20(semver_major%20gt%200)%20and%20(belongs_to__application/any(bta:(bta/is_host%20eq%20true)%20and%20(bta/is_for__device_type/any(dt:dt/slug%20eq%20''))))&\\$orderby=semver_major%20desc,semver_minor%20desc,semver_patch%20desc,revision%20desc" + }, + { + "id": "list-balenaos-versions-for-private-device-type", + "summary": "List the supported balenaOS versions for a private device type", + "description": "Same as above, but in order to access private device types, you must provide an authentication token.", + "method": "GET", + "endpoint": "/v6/release", + "filters": "?\\$select=raw_version&\\$filter=(is_final%20eq%20true)%20and%20(is_invalidated%20eq%20false)%20and%20(status%20eq%20'success')%20and%20(semver_major%20gt%200)%20and%20(belongs_to__application/any(bta:(bta/is_host%20eq%20true)%20and%20(bta/is_for__device_type/any(dt:dt/slug%20eq%20''))))&\\$orderby=semver_major%20desc,semver_minor%20desc,semver_patch%20desc,revision%20desc" + } + ] + }, { "id": "download", "name": "Download balenaOS",