<?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: New API, post method not working in ExtremeCloud IQ Developer Community</title>
    <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71760#M18</link>
    <description>Hey Kurt,&lt;BR /&gt;&lt;BR /&gt;Thanks for the response. I've just done some more playing around and think I have isolated the issue.&lt;BR /&gt;&lt;BR /&gt;It seems to be working fine if I try with a login local to that instance. I'm currently trying with guest admin account(Administrator with API enabled) with access token being generated with the /account/:switch method which is causing the issue. So seems guest admins with API access enabled has no write/post access?&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
    <pubDate>Wed, 08 Dec 2021 17:15:45 GMT</pubDate>
    <dc:creator>grech659</dc:creator>
    <dc:date>2021-12-08T17:15:45Z</dc:date>
    <item>
      <title>New API, post method not working</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71758#M16</link>
      <description>Hey guys,&lt;BR /&gt;&lt;BR /&gt;I've been playing around with the new API and absolutely loving it. Big improvement over the old one!&lt;BR /&gt;&lt;BR /&gt;Everything seem to be working great except post methods. For example, I'm trying to grant and external user access following the below documentation.&lt;BR /&gt;&lt;A data-url="https://api.extremecloudiq.com/swagger-ui/index.html?configUrl=/openapi/swagger-config#/User/grantExternalUser" class="embedly-content" href="https://api.extremecloudiq.com/swagger-ui/index.html?configUrl=/openapi/swagger-config" target="_blank" rel="noopener"&gt;Swagger UI&lt;/A&gt;
&lt;TABLE contenteditable="false" width="500" height="400" cellpadding="10" style="border: 1px solid #ebebeb; border-left: 8px solid #ebebeb"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD colspan="2" style="border: none"&gt;Extremecloudiq&lt;/TD&gt;
&lt;TD style="border: none; text-align: right" align="right"&gt;&lt;SPAN class="remove-embedded-content" style="cursor: pointer"&gt;remove preview&lt;/SPAN&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="border: none" colspan="3"&gt;
&lt;TABLE style="border: none"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="border: none"&gt;&lt;/TD&gt;
&lt;TD style="border: none"&gt;
&lt;TABLE style="border: none"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD style="border: none"&gt;Swagger UI&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="border: none"&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD style="border: none"&gt;&lt;A style="text-decoration: none; color: cadetblue" target="_blank" href="https://api.extremecloudiq.com/swagger-ui/index.html?configUrl=/openapi/swagger-config#/User/grantExternalUser" rel="noopener"&gt; View this on Extremecloudiq &amp;gt;&lt;/A&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;BR /&gt;I'm using the following URL - https://api.extremecloudiq.com/users/external&lt;BR /&gt;&lt;BR /&gt;Not matter what I put in the body I always get an 400 error as per below.&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"error_code": "INVALID_ARGUMENT",&lt;BR /&gt;"error_id": "b4c66c4cc3284a6dbb66234c17334d5d",&lt;BR /&gt;"error_message": "INVALID_ARGUMENT: core.service.invalid.data"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;I've tried multiple different user accounts but always the same outcome. Any known issues at all?&lt;BR /&gt;&lt;BR /&gt;Any help is much appreciated.&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;Update: Including Raw Output with username replaced.&lt;BR /&gt;&lt;BR /&gt;POST /users/external HTTP/1.1&lt;BR /&gt;Authorization: Bearer [Placeholder token]&lt;BR /&gt;Host: api.extremecloudiq.com&lt;BR /&gt;Content-Type: application/json&lt;BR /&gt;Content-Length: 116&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"login_name": "xxxx.xxxx@xxxx.nz",&lt;BR /&gt;"user_role": "ADMINISTRATOR",&lt;BR /&gt;"enable_api_access": "true"&lt;BR /&gt;}</description>
      <pubDate>Wed, 08 Dec 2021 09:57:45 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71758#M16</guid>
      <dc:creator>grech659</dc:creator>
      <dc:date>2021-12-08T09:57:45Z</dc:date>
    </item>
    <item>
      <title>Re: New API, post method not working</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71759#M17</link>
      <description>Congratulations on being the first one to post a question into our new API community &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;I just gave this API call a try using the Swagger page and it worked fined. I tried it with two accounts (email addresses) from colleagues who have XIQ accounts but are not yet added to my demo XIQ. I gave them both the ADMINISTRATOR role and one I allowed API access as well, the other one I set that parameter to false. Example curl command that Swagger auto-generated:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;curl -X POST "https://api.extremecloudiq.com/users/external" -H "accept: application/json" -H "Authorization: Bearer bearer_token_removed" -H "Content-Type: application/json" -d "{\"login_name\":\"colleague1_real_email_removed@extremenetworks.com\",\"user_role\":\"ADMINISTRATOR\",\"enable_api_access\":\"true\"}"&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;Are you logged in as an Administrator with full access rights to the API? I'm logged in with my main account - the email account that created my demo XIQ account.&amp;nbsp;&lt;BR /&gt;That external email that you are trying to add: is this an already existing user within some other XIQ account? I don't think you can add just any random email and invite that person. It probably needs to be an already registered user with some XIQ account (not yours, of course).&lt;BR /&gt;&lt;BR /&gt;Kurt</description>
      <pubDate>Wed, 08 Dec 2021 12:24:52 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71759#M17</guid>
      <dc:creator>Kurt_Semba</dc:creator>
      <dc:date>2021-12-08T12:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: New API, post method not working</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71760#M18</link>
      <description>Hey Kurt,&lt;BR /&gt;&lt;BR /&gt;Thanks for the response. I've just done some more playing around and think I have isolated the issue.&lt;BR /&gt;&lt;BR /&gt;It seems to be working fine if I try with a login local to that instance. I'm currently trying with guest admin account(Administrator with API enabled) with access token being generated with the /account/:switch method which is causing the issue. So seems guest admins with API access enabled has no write/post access?&lt;BR /&gt;&lt;BR /&gt;Cheers</description>
      <pubDate>Wed, 08 Dec 2021 17:15:45 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71760#M18</guid>
      <dc:creator>grech659</dc:creator>
      <dc:date>2021-12-08T17:15:45Z</dc:date>
    </item>
    <item>
      <title>Re: New API, post method not working</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71761#M19</link>
      <description>Thanks for sharing your findings. That acutally makes sense: a guest admin should not have the capability to add external admins to the XIQ account. Is that "guest admin" a local admin with the "Guest Management" role?</description>
      <pubDate>Wed, 08 Dec 2021 17:27:31 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71761#M19</guid>
      <dc:creator>Kurt_Semba</dc:creator>
      <dc:date>2021-12-08T17:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: New API, post method not working</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71762#M20</link>
      <description>Sorry, not guest admin. I mean external admin &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Wed, 08 Dec 2021 17:35:56 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71762#M20</guid>
      <dc:creator>grech659</dc:creator>
      <dc:date>2021-12-08T17:35:56Z</dc:date>
    </item>
    <item>
      <title>Re: New API, post method not working</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71763#M21</link>
      <description>When you authenticate to the XIQ API you get logged into your "main" account. This is the account in which are a a normal admin and not an "external admin". Using that authentication token, you should be able to make all API calls in your main account.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;If you want to then make API calls in a different account in which you have been added as "external admin" you will first have to switch to that account. You can use /account/external to list all account IDs that you are able to switch to. Then use /account/:switch to actually switch your context to this account (you will get a new token to use for subsequent calls).</description>
      <pubDate>Wed, 08 Dec 2021 19:55:01 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71763#M21</guid>
      <dc:creator>Kurt_Semba</dc:creator>
      <dc:date>2021-12-08T19:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: New API, post method not working</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71764#M22</link>
      <description>That is exactly what I'm currently doing. This issue seems to be that the access token generated by the &lt;SPAN&gt;/account/:switch method isnt allowing me to post anything to the new context which is causing the error below.&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;"error_code": "INVALID_ARGUMENT",&lt;BR /&gt;"error_id": "b4c66c4cc3284a6dbb66234c17334d5d",&lt;BR /&gt;"error_message": "INVALID_ARGUMENT: core.service.invalid.data"&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;If I swap the access token(and not touch the body) out for one that was generated by a local admin account&amp;nbsp;then it works perfectly fine.&lt;/SPAN&gt;</description>
      <pubDate>Wed, 08 Dec 2021 21:02:39 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71764#M22</guid>
      <dc:creator>grech659</dc:creator>
      <dc:date>2021-12-08T21:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: New API, post method not working</title>
      <link>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71765#M23</link>
      <description>So I've done a bit more testing. This can be replicated in swagger by following:&lt;BR /&gt;&lt;BR /&gt;Testing a local account(Works)&lt;BR /&gt;POST /login - with local username and password&lt;BR /&gt;Set authorization token to result of above&lt;BR /&gt;POST /users/external - successfully added external user&lt;BR /&gt;&lt;BR /&gt;Testing on external admin(Doesn't work)&lt;BR /&gt;POST /login - with the external admins username and password&lt;BR /&gt;Set authorization token to result of above&lt;BR /&gt;GET /account/external - to get a list of available instances to switch to&lt;BR /&gt;POST /account/:switch?id=&amp;lt;id from above GET method&amp;gt;&lt;BR /&gt;Update authorization token to result of above so its authorized to the new instance&lt;BR /&gt;POST /users/external - Error 400 - doesn't seem exclusive to just the POST /user/external method as well. Seems most post methods dont work&lt;BR /&gt;&lt;BR /&gt;Running /auth/permissions on the new access token generated by POST /account/:switch show all the same permissions as the token generated by local account. Same with running POST /auth/permissions/:check and passing it the POST /user/external method you get code 200 back showing you do have the permissions for it.&lt;BR /&gt;&lt;BR /&gt;So seems like a bug?</description>
      <pubDate>Thu, 09 Dec 2021 22:50:38 GMT</pubDate>
      <guid>https://community.extremenetworks.com/t5/extremecloud-iq-developer/new-api-post-method-not-working/m-p/71765#M23</guid>
      <dc:creator>grech659</dc:creator>
      <dc:date>2021-12-09T22:50:38Z</dc:date>
    </item>
  </channel>
</rss>

