<?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: 500 errors on PUT with API in Controllers</title>
    <link>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521129#M1440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the request parameters, I'd prefer to see a separate column that says what's required vs. optional. Even on the example you pointed me to only the ones that are optional say so. I'm assuming the rest are required? I don't know. If a parameter is required why would you be silent on that fact? Especially for API documentation I think this is a requirement to ensure that someone can pick it up quickly and get it working fast. Thanks again for your response and question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Mar 2016 15:46:29 GMT</pubDate>
    <dc:creator>earl.lewis1</dc:creator>
    <dc:date>2016-03-15T15:46:29Z</dc:date>
    <item>
      <title>500 errors on PUT with API</title>
      <link>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521125#M1436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to run the a PUT operation via the API, updating name and mapLocation, and not having any joy. &lt;SPAN style="font-size: 13.3333px;"&gt;I'm using Postman to submit the requests and followed the instructions noted here Using self-signed SSL certificates with Postman – Postman Blog&amp;nbsp;&amp;nbsp; to ensure that our self-signed certificate is accepted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are the details:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;URL for my request is:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="_jivemacro_uid_14579663160457842 jive_text_macro jive_macro_code" jivemacro_uid="_14579663160457842"&gt;
&lt;P&gt;&lt;A class="jive-link-external-small" href="https://ciscoprime.domain/webacs/api/v1/op/apService/accessPoint.json" rel="nofollow" target="_blank"&gt;https://ciscoprime.domain/webacs/api/v1/op/apService/accessPoint.json&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The request payload is as follows, where accessPointId has been selected from a previous GET operation:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14579663250616468" jivemacro_uid="_14579663250616468"&gt;
&lt;P&gt;{&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; "accessPoint" : {&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "accessPointId" : 12860886,&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "mapLocation" : "New Location Name",&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "name" : "ap-new-name-test"&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&amp;nbsp; &lt;/P&gt;
&lt;P&gt;}&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;The response I'm getting is:&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14579663370424463" jivemacro_uid="_14579663370424463"&gt;
&lt;P&gt;{&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; "errorDocument": {&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "httpResponseCode": 500,&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "httpMethod": "PUT",&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "message": "java.lang.NullPointerException",&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "exception": "javax.ws.rs.WebApplicationException: java.lang.NullPointerException",&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "uriPath": "op/apService/accessPoint",&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "queryParams": "{}"&amp;nbsp; &lt;/P&gt;
&lt;P&gt;&amp;nbsp; }&amp;nbsp; &lt;/P&gt;
&lt;P&gt;}&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;I have basic auth credentials setup in the header of the request, which works fine for GETs. I've been granted NBIWrite permissions by the system admin. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas why I'd be getting a 500 error? BTW, I can do GET requests all day long and they work just fine. Also, when I was running these prior to getting my NBIWrite permission setup I was getting permissions errors, so I'm assuming my permissions are now setup correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 14:42:43 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521125#M1436</guid>
      <dc:creator>earl.lewis1</dc:creator>
      <dc:date>2016-03-14T14:42:43Z</dc:date>
    </item>
    <item>
      <title>Re: 500 errors on PUT with API</title>
      <link>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521126#M1437</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When using the v1/op/apService/accessPoint service, you need to specify all of the parameters in the request payload.&amp;nbsp; The NullPointerException is due to the service trying to find information in the request that hasn't been specified, and is therefore null.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 21:59:33 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521126#M1437</guid>
      <dc:creator>Spencer Zier</dc:creator>
      <dc:date>2016-03-14T21:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: 500 errors on PUT with API</title>
      <link>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521127#M1438</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your answer is helpful, so thank you very much. However, the API documentation leaves a lot to be desired. And to say that "you need to specify all the parameters" is even a little deceiving. What, exactly, constitutes "all the parameters"? Is it all the parameters that are specified in the documentation for that API endpoint? I assumed that's what it meant, and that seemed to do the trick. Anyway, hopefully you understand what I mean about the documentation not being very good. Thanks again.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Mar 2016 22:55:39 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521127#M1438</guid>
      <dc:creator>earl.lewis1</dc:creator>
      <dc:date>2016-03-14T22:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: 500 errors on PUT with API</title>
      <link>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521128#M1439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yeah, I agree, we need to do better here.&amp;nbsp; Does the documentation for some of the &lt;A href="https://developer.cisco.com/media/prime-infrastructure-api-reference-v3-0/192.168.115.187/webacs/api/v1/op/wlanProvisioning/interface-POSTcc3b.html?_docs"&gt;WLAN Provisioning&lt;/A&gt; resources meet your expectations?&amp;nbsp; If not, do you have suggestions for what we could do to make it better?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 15:40:26 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521128#M1439</guid>
      <dc:creator>Spencer Zier</dc:creator>
      <dc:date>2016-03-15T15:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: 500 errors on PUT with API</title>
      <link>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521129#M1440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the request parameters, I'd prefer to see a separate column that says what's required vs. optional. Even on the example you pointed me to only the ones that are optional say so. I'm assuming the rest are required? I don't know. If a parameter is required why would you be silent on that fact? Especially for API documentation I think this is a requirement to ensure that someone can pick it up quickly and get it working fast. Thanks again for your response and question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 15:46:29 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521129#M1440</guid>
      <dc:creator>earl.lewis1</dc:creator>
      <dc:date>2016-03-15T15:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: 500 errors on PUT with API</title>
      <link>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521130#M1441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've had the same thought myself that Earl is articulating here. There are places where it would be helpful for the documentation to call out required versus optional parameters. This is an excellent suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Mar 2016 15:54:49 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521130#M1441</guid>
      <dc:creator>smp</dc:creator>
      <dc:date>2016-03-15T15:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: 500 errors on PUT with API</title>
      <link>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521131#M1442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may find this reply relevant on how to use this particular AP call a little better.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.cisco.com/message/243312"&gt;Re: Experiencing Constraints with apService/accessPoint&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2017 22:52:02 GMT</pubDate>
      <guid>https://community.cisco.com/t5/controllers/500-errors-on-put-with-api/m-p/3521131#M1442</guid>
      <dc:creator>timway001</dc:creator>
      <dc:date>2017-01-17T22:52:02Z</dc:date>
    </item>
  </channel>
</rss>

