From d46f2b377affcb88d4ecf9fcf2e8d9b3274a2cee Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Tue, 19 Sep 2023 19:30:25 +0300 Subject: [PATCH 1/4] API/Resources: Add curl examples about using the fleet slut Change-type: minor --- config/dictionaries/resource.json | 35 +++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index 2f86898ba0..5e94f103f4 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -47,6 +47,14 @@ "endpoint": "/v6/application()", "filters": "" }, + { + "id": "app-by-slug", + "summary": "Get fleet by SLUG", + "description": "", + "method": "GET", + "endpoint": "/v6/application(slug='')", + "filters": "" + }, { "id": "app-by-name", "summary": "Get fleet by name", @@ -89,31 +97,40 @@ "filters": "" }, { - "id": "disable-auto-update", - "summary": "Disable automatic update tracking for a fleet", + "id": "set-commit", + "summary": "Pin entire fleet to a specific release by ID", "description": "", "method": "PATCH", "endpoint": "/v6/application()", "filters": "", - "data": "{\n \"should_track_latest_release\": \"false\"\n}" + "data": "{\n \"should_be_running__release\": \"\"\n \"should_track_latest_release\": false\n}" }, { - "id": "enable-auto-update", - "summary": "Enable automatic update tracking for a fleet", + "id": "set-target-release-by-slug", + "summary": "Pin entire fleet to a specific release by SLUG", + "description": "", + "method": "PATCH", + "endpoint": "/v6/application(slug='')", + "filters": "", + "data": "{\n \"should_be_running__release\": \"\"\n \"should_track_latest_release\": false\n}" + }, + { + "id": "disable-auto-update", + "summary": "Disable automatic update tracking for a fleet", "description": "", "method": "PATCH", "endpoint": "/v6/application()", "filters": "", - "data": "{\n \"should_track_latest_release\": \"true\"\n}" + "data": "{\n \"should_track_latest_release\": \"false\"\n}" }, { - "id": "set-commit", - "summary": "Pin entire fleet to a specific release", + "id": "enable-auto-update", + "summary": "Enable automatic update tracking for a fleet", "description": "", "method": "PATCH", "endpoint": "/v6/application()", "filters": "", - "data": "{\n \"should_be_running__release\": \"\"\n \"should_track_latest_release\": false\n}" + "data": "{\n \"should_track_latest_release\": \"true\"\n}" } ] }, From e7439fc3beb54d89c785f4e7734e9b2b6191b8da Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Tue, 19 Sep 2023 19:23:27 +0300 Subject: [PATCH 2/4] API/Resources: Use the natural key notation for the org by handle example Change-type: patch --- config/dictionaries/resource.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index 5e94f103f4..f924d9cb13 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -774,8 +774,8 @@ "summary": "Get organization by handle", "description": "Uniquely identifies an organization. Handles are currently automatically generated and read-only.", "method": "GET", - "endpoint": "/v6/organization", - "filters": "?\\$filter=handle%20eq%20''" + "endpoint": "/v6/organization(handle='')", + "filters": "" } ] }, From 64ffbcb769548ed25e3739a8bbdc01adcf43cf9f Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Tue, 19 Sep 2023 19:23:56 +0300 Subject: [PATCH 3/4] API/Resources: Use the natural key notation for the device by uuid example Change-type: patch --- config/dictionaries/resource.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index f924d9cb13..a742ec28cf 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -313,8 +313,8 @@ "summary": "Get device by UUID", "description": "", "method": "GET", - "endpoint": "/v6/device", - "filters": "?\\$filter=uuid%20eq%20''" + "endpoint": "/v6/device(uuid='')", + "filters": "" }, { "id": "device-overall-status", From 90470f17902ecdfc93b3e22927d5daffd8dbd06e Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Tue, 19 Sep 2023 19:25:05 +0300 Subject: [PATCH 4/4] API/Resources: Add examples for device pinning by UUID Change-type: minor --- config/dictionaries/resource.json | 45 ++++++++++++++++++------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/config/dictionaries/resource.json b/config/dictionaries/resource.json index a742ec28cf..5d78d000ca 100644 --- a/config/dictionaries/resource.json +++ b/config/dictionaries/resource.json @@ -324,6 +324,33 @@ "endpoint": "/v6/device()", "filters": "?\\$select=overall_status" }, + { + "id": "get-target-release", + "summary": "Get the release device is pinned to", + "description": "Note: should_be_running__release will be unset or null if the device isn't pinned to any release. For an unpinned device, the device.is_running__release field may be used to obtain the device's current state.", + "method": "GET", + "endpoint": "/v6/device()", + "filters": "?\\$select=should_be_running__release", + "data": "" + }, + { + "id": "set-device-to-release-by-id", + "summary": "Pin device to a specific release by ID", + "description": "", + "method": "PATCH", + "endpoint": "/v6/device()", + "filters": "", + "data": "{\n \"should_be_running__release\": \"\"\n}" + }, + { + "id": "set-device-to-release-by-uuid", + "summary": "Pin device to a specific release by UUID", + "description": "", + "method": "PATCH", + "endpoint": "/v6/device(uuid='')", + "filters": "", + "data": "{\n \"should_be_running__release\": \"\"\n}" + }, { "id": "rename-device", "summary": "Rename device", @@ -359,24 +386,6 @@ "filters": "", "data": "{\n \"belongs_to__application\": \"\"\n}" }, - { - "id": "get-target-release", - "summary": "Get the release device is pinned to", - "description": "Note: should_be_running__release will be unset or null if the device isn't pinned to any release. For an unpinned device, the device.is_running__release field may be used to obtain the device's current state.", - "method": "GET", - "endpoint": "/v6/device()", - "filters": "?\\$select=should_be_running__release", - "data": "" - }, - { - "id": "set-device-to-release", - "summary": "Pin device to a specific release", - "description": "", - "method": "PATCH", - "endpoint": "/v6/device()", - "filters": "", - "data": "{\n \"should_be_running__release\": \"\"\n}" - }, { "id": "deactivate-device", "summary": "Deactivate an offline device (CHARGEABLE)",