<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: REST API: Error when PATCHing volume comment in ONTAP Rest API Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-Error-when-PATCHing-volume-comment/m-p/169880#M239</link>
    <description>&lt;P&gt;Actually a better place to ask REST API questions is on Slack in the Netapp API channel.&amp;nbsp; Go to netapp.io and click on the Slack icon at top-right.&amp;nbsp; Post your question in the #api channel and you should get a response fairly quick.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Sep 2021 15:08:43 GMT</pubDate>
    <dc:creator>JohnChampion</dc:creator>
    <dc:date>2021-09-10T15:08:43Z</dc:date>
    <item>
      <title>REST API: Error when PATCHing volume comment</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-Error-when-PATCHing-volume-comment/m-p/169747#M238</link>
      <description>&lt;P&gt;We are testing some functionality in the new REST API, and I have been having issues with updating volume comments on a couple filers. Filers I have tested on are running:&lt;BR /&gt;NetApp Release 9.7P11D1: Wed Jan 27 17:40:19 UTC 2021&lt;BR /&gt;NetApp Release 9.7P8: Thu Oct 15 04:11:57 UTC 2020&lt;BR /&gt;NetApp Release 9.8P4: Mon May 03 09:22:00 UTC 2021&lt;/P&gt;&lt;P&gt;I suspect there is some issue with the job control in some way, but I have not been able to verify. Have poked around in logs in systemshell as well as checked 'job history show' for any clues. I submitted a case to Support and they suggested I ask here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The program I am using to do the updates:&lt;BR /&gt;import netapp_ontap&lt;BR /&gt;from netapp_ontap import config, HostConnection, NetAppRestError, utils&lt;BR /&gt;from netapp_ontap.resources import Svm, Volume, Aggregate, VolumeMetrics, Cluster, Node, CLI&lt;BR /&gt;from pprint import pprint as pp&lt;BR /&gt;import logging&lt;BR /&gt;logger = logging.getLogger()&lt;BR /&gt;logger.setLevel(logging.DEBUG)&lt;BR /&gt;ch = logging.StreamHandler()&lt;BR /&gt;ch.setLevel(logging.DEBUG)&lt;BR /&gt;logger.addHandler(ch)&lt;/P&gt;&lt;P&gt;utils.DEBUG = 1&lt;BR /&gt;utils.LOG_ALL_API_CALLS = 1&lt;/P&gt;&lt;P&gt;naauth = {'username': &amp;lt;USER&amp;gt; , 'password': &amp;lt;PASS&amp;gt;}&lt;/P&gt;&lt;P&gt;admin = &amp;lt;FILER&amp;gt;&lt;BR /&gt;with HostConnection(admin, verify=False, **naauth):&lt;BR /&gt;netapp_ontap.host_connection._HOST_CONTEXT.port=&amp;lt;PORT&amp;gt;&lt;BR /&gt;resource = Volume(uuid='dbdccb94-c936-11eb-b0cb-00a098ce3ae6')&lt;BR /&gt;resource.comment = "testingacomment"&lt;BR /&gt;result = resource.patch()&lt;BR /&gt;if result.is_err:&lt;BR /&gt;logger.error(f"Volume Comment Update Failed - {result.http_response.status_code} - {result.http_response.reason}")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The Responses from the API:&lt;BR /&gt;-----------REQUEST-----------&lt;BR /&gt;PATCH https://[filer]:[port]/api/storage/volumes/dbdccb94-c936-11eb-b0cb-00a098ce3ae6&lt;BR /&gt;User-Agent: python-requests/2.26.0&lt;BR /&gt;Accept-Encoding: gzip, deflate&lt;BR /&gt;Accept: */*&lt;BR /&gt;Connection: keep-alive&lt;BR /&gt;X-Dot-Client-App: netapp-ontap-python-9.9.1.0&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Content-Length: 30&lt;BR /&gt;b'{"comment": "testingacomment"}'&lt;BR /&gt;-----------------------------&lt;/P&gt;&lt;P&gt;-----------RESPONSE-----------&lt;BR /&gt;202 Accepted&lt;BR /&gt;Date: Tue, 07 Sep 2021 16:22:57 GMT&lt;BR /&gt;Server: libzapid-httpd&lt;BR /&gt;X-Content-Type-Options: nosniff&lt;BR /&gt;Cache-Control: no-cache,no-store,must-revalidate&lt;BR /&gt;Content-Length: 189&lt;BR /&gt;Content-Type: application/hal+json&lt;BR /&gt;Keep-Alive: timeout=5, max=100&lt;BR /&gt;Connection: Keep-Alive&lt;BR /&gt;{&lt;BR /&gt;"job": {&lt;BR /&gt;"uuid": "dccd0527-0ff7-11ec-bbe3-00a098ef3e3a",&lt;BR /&gt;"_links": {&lt;BR /&gt;"self": {&lt;BR /&gt;"href": "/api/cluster/jobs/dccd0527-0ff7-11ec-bbe3-00a098ef3e3a"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;------------------------------&lt;BR /&gt;https://[filer]:[port] "GET /api/cluster/jobs/dccd0527-0ff7-11ec-bbe3-00a098ef3e3a?fields=message%2Cstate HTTP/1.1" 200 220&lt;/P&gt;&lt;P&gt;-----------REQUEST-----------&lt;BR /&gt;GET https://[filer]:[port]/api/cluster/jobs/dccd0527-0ff7-11ec-bbe3-00a098ef3e3a?fields=message%2Cstate&lt;BR /&gt;User-Agent: python-requests/2.26.0&lt;BR /&gt;Accept-Encoding: gzip, deflate&lt;BR /&gt;Accept: */*&lt;BR /&gt;Connection: keep-alive&lt;BR /&gt;X-Dot-Client-App: netapp-ontap-python-9.9.1.0&lt;BR /&gt;None&lt;BR /&gt;-----------------------------&lt;/P&gt;&lt;P&gt;-----------RESPONSE-----------&lt;BR /&gt;200 OK&lt;BR /&gt;Date: Tue, 07 Sep 2021 16:22:58 GMT&lt;BR /&gt;Server: libzapid-httpd&lt;BR /&gt;X-Content-Type-Options: nosniff&lt;BR /&gt;Cache-Control: no-cache,no-store,must-revalidate&lt;BR /&gt;Content-Length: 220&lt;BR /&gt;Content-Type: application/hal+json&lt;BR /&gt;Keep-Alive: timeout=5, max=99&lt;BR /&gt;Connection: Keep-Alive&lt;BR /&gt;{&lt;BR /&gt;"uuid": "dccd0527-0ff7-11ec-bbe3-00a098ef3e3a",&lt;BR /&gt;"state": "failure",&lt;BR /&gt;"message": "entry doesn't exist",&lt;BR /&gt;"_links": {&lt;BR /&gt;"self": {&lt;BR /&gt;"href": "/api/cluster/jobs/dccd0527-0ff7-11ec-bbe3-00a098ef3e3a"&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;------------------------------&lt;BR /&gt;Job (failure): entry doesn't exist. Timeout remaining: 30.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jun 2025 10:14:36 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-Error-when-PATCHing-volume-comment/m-p/169747#M238</guid>
      <dc:creator>pbolin</dc:creator>
      <dc:date>2025-06-04T10:14:36Z</dc:date>
    </item>
    <item>
      <title>Re: REST API: Error when PATCHing volume comment</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-Error-when-PATCHing-volume-comment/m-p/169880#M239</link>
      <description>&lt;P&gt;Actually a better place to ask REST API questions is on Slack in the Netapp API channel.&amp;nbsp; Go to netapp.io and click on the Slack icon at top-right.&amp;nbsp; Post your question in the #api channel and you should get a response fairly quick.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 15:08:43 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-Error-when-PATCHing-volume-comment/m-p/169880#M239</guid>
      <dc:creator>JohnChampion</dc:creator>
      <dc:date>2021-09-10T15:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: REST API: Error when PATCHing volume comment</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-Error-when-PATCHing-volume-comment/m-p/171405#M251</link>
      <description>&lt;P&gt;The issue is that a volume has 2 UUIDs: uuid and instance_uuid.&amp;nbsp; &amp;nbsp;The uuid was initially accepted, but the job reported a failure as described above.&amp;nbsp; When switching to the instance_uuid, the call succeeded.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Nov 2021 19:21:13 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-Error-when-PATCHing-volume-comment/m-p/171405#M251</guid>
      <dc:creator>LaurentN</dc:creator>
      <dc:date>2021-11-03T19:21:13Z</dc:date>
    </item>
    <item>
      <title>Re: REST API: Error when PATCHing volume comment</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-Error-when-PATCHing-volume-comment/m-p/441120#M417</link>
      <description>&lt;P&gt;^^^This^^^ is a hot tip!&lt;BR /&gt;Basically, anywhere the REST API asks for a volume UUID, it wants the instance_uuid.&amp;nbsp; In my case it was the&amp;nbsp;storage/file/clone API.&amp;nbsp; Spent a solid 2 hours beating on this, getting&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; "error": {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "message": "entry doesn't exist",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "code": "4",&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; "target": "destination_path"&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;Man, that error is misleading.&amp;nbsp; dest path isn't the issue - it's the wrong vol UUID.&lt;/P&gt;&lt;P&gt;I searched docs and community pages, and finally stumbled on this thread.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;(ex-NetApp)&lt;/P&gt;</description>
      <pubDate>Tue, 24 Jan 2023 00:47:44 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/REST-API-Error-when-PATCHing-volume-comment/m-p/441120#M417</guid>
      <dc:creator>peterjumper</dc:creator>
      <dc:date>2023-01-24T00:47:44Z</dc:date>
    </item>
  </channel>
</rss>

