From 90470f17902ecdfc93b3e22927d5daffd8dbd06e Mon Sep 17 00:00:00 2001 From: Thodoris Greasidis Date: Tue, 19 Sep 2023 19:25:05 +0300 Subject: [PATCH] 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)",