<?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: Device delete REST API returns 202 in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/device-delete-rest-api-returns-202/m-p/3470120#M1482</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for following up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that the main point here is that the Swagger API pages are perhaps not a good guide to how the APIs should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some suggested improvements are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Change "Error Status Codes" to "Response Status Codes"&lt;/P&gt;&lt;P&gt;- Document the 202 response in the table of response codes with words to the effect of: "202 - Request is being processed. Use&amp;nbsp; /task/{taskId} to get task status."&lt;/P&gt;&lt;P&gt;- Provide general guidance as to the async task based nature of the API from a link that is clearly visible from the Swagger API pages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Jul 2016 10:46:35 GMT</pubDate>
    <dc:creator>Nathan Sowatskey</dc:creator>
    <dc:date>2016-07-19T10:46:35Z</dc:date>
    <item>
      <title>Device delete REST API returns 202</title>
      <link>https://community.cisco.com/t5/controllers/device-delete-rest-api-returns-202/m-p/3470118#M1480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The attached image shows the response when using a the Delete API for a device given its ID.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that the response is 202, which is generally defined as "accepted". See: &lt;A href="https://httpstatuses.com/202" title="https://httpstatuses.com/202" target="_blank"&gt;https://httpstatuses.com/202&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 202 is NOT one of the Error Status Codes defined in the API documentation. Further note that 200 is one of those codes, bit is not an "error" code per se.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not clear what 202 actually means here, as it is not explicitly documented.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="device_delete_202.tiff" class="image-1 jive-image" src="https://community.cisco.com/legacyfs/online/fusion/97745_device_delete_202.tiff" style="height: 731px; width: 620px;" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2019 12:29:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/device-delete-rest-api-returns-202/m-p/3470118#M1480</guid>
      <dc:creator>Nathan Sowatskey</dc:creator>
      <dc:date>2019-03-01T12:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: Device delete REST API returns 202</title>
      <link>https://community.cisco.com/t5/controllers/device-delete-rest-api-returns-202/m-p/3470119#M1481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just about all (/file is exception) API on APIC-EM are async.&amp;nbsp; This is a common pattern.&amp;nbsp; You get a 202 and a taskId.&amp;nbsp; This blog post shows an example of how this works..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.cisco.com/community/developer/dna/blog/2016/07/13/cisco-live-springboard-event-rocks-the-house"&gt;Cisco Live Springboard Event Rocks The House!&lt;/A&gt;&lt;A _jive_internal="true" href="https://community.cisco.com/community/developer/dna/blog/2016/07/13/cisco-live-springboard-event-rocks-the-house"&gt;https://communities.cisco.com/community/developer/dna/blog/2016/07/13/cisco-live-springboard-event-rocks-the-house&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You need to do a GET on /api/task/&amp;lt;taskId&amp;gt; to find out the status of the DELETE/POST/PUT&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a fundamental concept of the controller API.&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.cisco.com/community/developer/dna/blog/2016/07/13/cisco-live-springboard-event-rocks-the-house"&gt;Cisco Live Springboard Event Rocks The House!&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jul 2016 23:35:21 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/device-delete-rest-api-returns-202/m-p/3470119#M1481</guid>
      <dc:creator>aradford</dc:creator>
      <dc:date>2016-07-18T23:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Device delete REST API returns 202</title>
      <link>https://community.cisco.com/t5/controllers/device-delete-rest-api-returns-202/m-p/3470120#M1482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Adam&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for following up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that the main point here is that the Swagger API pages are perhaps not a good guide to how the APIs should be used.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some suggested improvements are:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Change "Error Status Codes" to "Response Status Codes"&lt;/P&gt;&lt;P&gt;- Document the 202 response in the table of response codes with words to the effect of: "202 - Request is being processed. Use&amp;nbsp; /task/{taskId} to get task status."&lt;/P&gt;&lt;P&gt;- Provide general guidance as to the async task based nature of the API from a link that is clearly visible from the Swagger API pages&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jul 2016 10:46:35 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/device-delete-rest-api-returns-202/m-p/3470120#M1482</guid>
      <dc:creator>Nathan Sowatskey</dc:creator>
      <dc:date>2016-07-19T10:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Device delete REST API returns 202</title>
      <link>https://community.cisco.com/t5/controllers/device-delete-rest-api-returns-202/m-p/3470121#M1483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Interestingly, the POST /network-device/location Swagger page does seem to document how tasks are used with APIs properly. So some of the API pages are correct, but not all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Nathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Jul 2016 15:27:19 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/device-delete-rest-api-returns-202/m-p/3470121#M1483</guid>
      <dc:creator>Nathan Sowatskey</dc:creator>
      <dc:date>2016-07-28T15:27:19Z</dc:date>
    </item>
  </channel>
</rss>

