From 36077789e2625aa29fa316b0ee994ec5577c6ea9 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Thu, 24 Oct 2024 17:09:52 +0300 Subject: [PATCH 1/4] API/resources: Add a GET example for the fleet's target release Change-type: minor --- config/dictionaries/resource.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index cfb839a080..e1d9cf7559 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -103,6 +103,14 @@ "endpoint": "/v7/application()", "filters": "" }, + { + "id": "get-fleet-target-release-by-slug", + "summary": "Get the target release of a fleet", + "description": "", + "method": "GET", + "endpoint": "/v7/application(slug='')", + "filters": "?\\$select=should_be_running__release" + }, { "id": "set-commit", "summary": "Pin entire fleet to a specific release by ID", From 09952a024d8cf7f257c9032f4ef818becc18e0f9 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Thu, 24 Oct 2024 17:12:30 +0300 Subject: [PATCH 2/4] API/resources: Change the fleet set-commit url id to set-target-release-by-id Change-type: patch --- config/dictionaries/resource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index e1d9cf7559..9d1d5e00a0 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -112,7 +112,7 @@ "filters": "?\\$select=should_be_running__release" }, { - "id": "set-commit", + "id": "set-target-release-by-id", "summary": "Pin entire fleet to a specific release by ID", "description": "", "method": "PATCH", From ae9528518831c59e759bce0d7b05b690ac54fb7e Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Thu, 24 Oct 2024 17:13:24 +0300 Subject: [PATCH 3/4] API/resources: Change the device get-target-release url id to get-pinned-release Change-type: patch --- config/dictionaries/resource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index 9d1d5e00a0..1f171a1716 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -387,7 +387,7 @@ "data": "" }, { - "id": "get-target-release", + "id": "get-pinned-release", "summary": "Get the release a device is pinned to", "description": "Note: is_pinned_on__release will be null/not set if the device isn't pinned to any release, in which case the device will be tracking the release of the application it belongs to.", "method": "GET", From f91079fca2b7c84520ff76939a9ab34bb6421c58 Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Thu, 24 Oct 2024 17:11:40 +0300 Subject: [PATCH 4/4] API/resources: Add the device.shoud_be_running__release field & example use Change-type: minor --- config/dictionaries/resource.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index 1f171a1716..3d19e9e3df 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -292,11 +292,12 @@ "belongs_to__application", "belongs_to__user", "actor", - "is_pinned_on__release", "device_name", "is_of__device_type", "uuid", "is_running__release", + "is_pinned_on__release", + "should_be_running__release", "note", "local_id", "status", @@ -413,6 +414,15 @@ "filters": "", "data": "{\n \"is_pinned_on__release\": \n}" }, + { + "id": "get-target-release", + "summary": "Get the target release of a device", + "description": "This will be the release that the device is pinned to, or the target release of the fleet for non-pinned devices.", + "method": "GET", + "endpoint": "/v7/device(uuid='')", + "filters": "?\\$select=should_be_running__release", + "data": "" + }, { "id": "update-device-supervisor-by-uuid", "summary": "Mark a device to be updated to a specific supervisor release",