<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107825/trying-to-use-the-rest-api-to-modify-available-fields-in-an-nrf-cloud-device-configuration</link><description>We are developing a nrf9160 based device and we are using nrf cloud to monitor the device. 
 The 9160 is using Modem Firmware: mfw_nrf9160_1.3.3 
 
 My problem is that I used the REST API and accidentally added a field to the device config, and now I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 31 Jan 2024 18:57:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107825/trying-to-use-the-rest-api-to-modify-available-fields-in-an-nrf-cloud-device-configuration" /><item><title>RE: Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/thread/467016?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 18:57:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a8a052c-155a-4b63-ae47-120a1fe63f93</guid><dc:creator>JackW</dc:creator><description>&lt;p&gt;OK, that worked.&amp;nbsp; Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/thread/467009?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 18:17:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:97a58387-6032-4d99-bd45-433d467fd9bc</guid><dc:creator>JackW</dc:creator><description>&lt;p&gt;OK, so to change the &amp;#39;reported&amp;#39; config would I use the following in postman:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1706725024364v1.png_2D00_640x480.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/thread/467005?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 17:59:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b89a36ff-6f31-4fbd-9b95-5d92e6a95a27</guid><dc:creator>egood</dc:creator><description>&lt;p&gt;You can update the desired and reported sections through postman and REST APIs, we do this frequently with our devices. What may be happening is you device firmware may be updating the reported section with the value you are trying to remove? It&amp;#39;s possibly you are removing it via the API but then the device is adding it back in. I would try shutting your device off and running the API via postman and see if it sticks.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/thread/467001?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 16:51:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b797908-5fb0-402e-bc2c-50443e9d2f91</guid><dc:creator>JackW</dc:creator><description>&lt;p&gt;Yeah, I&amp;#39;d like to be able to set the reported config item to null but I can&amp;#39;t find a way to do that.&amp;nbsp; I can only set the sesired config item to null.&amp;nbsp; The way I understand it is that the user changes the desired config and that then updates the reported config.&lt;/p&gt;
&lt;p&gt;If I use Postman to send a config change via the REST API, that only goes to the desired config.&lt;/p&gt;
&lt;p&gt;If I use the nrf Cloud to attempt to change config, that too only gives me access to the desired config, not the reported.&lt;/p&gt;
&lt;p&gt;Is there any way to directly change the reported config?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/thread/466857?ContentTypeID=1</link><pubDate>Wed, 31 Jan 2024 01:55:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c63098e0-8411-4de0-81de-c870697feed8</guid><dc:creator>justin</dc:creator><description>&lt;p&gt;the device is responsible for maintaining the reported state.&lt;br /&gt;&lt;br /&gt;i do not believe AWS generates delta events for cleared items.&lt;br /&gt;&lt;br /&gt;you will need to set the config item to null for the reported section too.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/thread/466609?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 18:26:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bd01c3c-6279-45e8-924c-88a8c4b69271</guid><dc:creator>JackW</dc:creator><description>&lt;p&gt;Yes, I&amp;#39;m aware of the difference between desired and reported.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The device has reconnected with the cloud multiple times over the past 24 hours, and the reported state still has the extra field that was removed from the desired state.&lt;/p&gt;
&lt;p&gt;So for some reason, that change isn&amp;#39;t propagating through to change the actual state.&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t know why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/thread/466515?ContentTypeID=1</link><pubDate>Mon, 29 Jan 2024 12:51:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b0e59b32-0871-42f6-a884-0121a3f4dde3</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;As you can read in&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf-cloud-rest-api-and-configuring-the-asset-tracker-v2-application"&gt;nRF Cloud REST API blog&lt;/a&gt;, the “reported” object shows the state of the device when it last published its state to the Cloud. The “desired” object shows updates that have not been pushed to the device yet (probably because it hasn’t connected to the Cloud since the update was requested).&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/thread/466364?ContentTypeID=1</link><pubDate>Sun, 28 Jan 2024 21:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd163eb7-0fd2-46f1-9e06-5f4ea42af16b</guid><dc:creator>JackW</dc:creator><description>&lt;p&gt;Thanks.&amp;nbsp; This fixes half my problem.&amp;nbsp; I was able to delete the field from the &amp;#39;desired&amp;#39; state, but for some reason that isn&amp;#39;t propagating over to the &amp;#39;reported&amp;#39; state.&amp;nbsp; Here&amp;#39;s what the confifuration looks like now:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1706476363295v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Don&amp;#39;t know why.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to use the REST API to modify available fields in an nrf cloud device configuration</title><link>https://devzone.nordicsemi.com/thread/466353?ContentTypeID=1</link><pubDate>Sun, 28 Jan 2024 15:08:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f209fb53-434e-40c7-83d9-081f8c972a4c</guid><dc:creator>egood</dc:creator><description>&lt;p&gt;If you want to remove a field you can do so by calling the key you want to remove with a value of null. In your case you would want to send the following via UpdateDevieState REST API.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="json"&gt;{
    &amp;quot;desired&amp;quot;: {
        &amp;quot;config&amp;quot;: {
            &amp;quot;phonebook&amp;quot;: null
        }
    },
    &amp;quot;reported&amp;quot;: {
        &amp;quot;config&amp;quot;: {
            &amp;quot;phonebook&amp;quot;: null
        }
    }
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note, I don&amp;#39;t know if this field is in &amp;quot;desired&amp;quot; or &amp;quot;reported&amp;quot; so you will need to specify, I assumed you have it in both sections.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sometime it&amp;#39;s also nice to just start from scratch with the whole config object and then re-initialize it. In which case you can call the following:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="json"&gt;{
    &amp;quot;reported&amp;quot;: {
        &amp;quot;config&amp;quot;:null
    },
    &amp;quot;desired&amp;quot;: {
        &amp;quot;config&amp;quot;:null
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>