<?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 Not able to access Rest API using on-premises controller in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722585#M3239</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to access the REST API for an on-premises controller. I followed the instructions on this for my version of AppDynamics -&amp;nbsp;&lt;A href="https://docs.appdynamics.com/appd/21.x/21.4/en/extend-appdynamics/appdynamics-apis/api-clients" target="_blank" rel="nofollow noopener noreferrer"&gt;API Clients (appdynamics.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I created an API Client, generated the client ID, secret and I am able to generate the token by accessing the '&lt;SPAN&gt;controller/api/oauth/access_token' endpoint.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I use the Authentication token and/or the username/password for accessing any other endpoint, I am getting a 500 Internal Server Error response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions on how to resolve this?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Oct 2023 22:57:39 GMT</pubDate>
    <dc:creator>Pradeep_Prakasa</dc:creator>
    <dc:date>2023-10-16T22:57:39Z</dc:date>
    <item>
      <title>Not able to access Rest API using on-premises controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722585#M3239</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am trying to access the REST API for an on-premises controller. I followed the instructions on this for my version of AppDynamics -&amp;nbsp;&lt;A href="https://docs.appdynamics.com/appd/21.x/21.4/en/extend-appdynamics/appdynamics-apis/api-clients" target="_blank" rel="nofollow noopener noreferrer"&gt;API Clients (appdynamics.com)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I created an API Client, generated the client ID, secret and I am able to generate the token by accessing the '&lt;SPAN&gt;controller/api/oauth/access_token' endpoint.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;But when I use the Authentication token and/or the username/password for accessing any other endpoint, I am getting a 500 Internal Server Error response.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Any suggestions on how to resolve this?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Oct 2023 22:57:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722585#M3239</guid>
      <dc:creator>Pradeep_Prakasa</dc:creator>
      <dc:date>2023-10-16T22:57:39Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to access Rest API using on-premises controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722586#M3240</link>
      <description>&lt;P&gt;Hi Pradeep,&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Could you please do the following and let me know how it goes?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Go to the API Clients in Controller&amp;nbsp; -&amp;gt; Go to the Settings =&amp;gt; Administrator =&amp;gt; API Client&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Create an API client.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Enter the client Name, Description and Generate the Secret. Once the secret is generated, copy the secret and save it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Assign the role.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Save it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to generate Token via CURL Command&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5. run the below curl command to generate the token.&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="zd-indent"&gt;
&lt;PRE&gt;&lt;CODE&gt;curl -X POST -H "Content-Type: application/vnd.appd.cntrl+protobuf;v=1" "&lt;A href="https://test-controller.saas.appdynamics.com/controller/api/oauth/access_token" rel="noreferrer nofollow noopener" target="_blank"&gt;https://test-controller.saas.appdynamics.com/controller/api/oauth/access_token&lt;/A&gt;" -d 'grant_type=client_credentials&amp;amp;client_id=&amp;lt;client-id&amp;gt;@account_name&amp;amp;client_secret=&amp;lt;secret&amp;gt;'&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Replace &amp;lt;client-id&amp;gt; &amp;amp; &amp;lt;secret&amp;gt; accordingly.&lt;/P&gt;
&lt;P&gt;client-id -&amp;gt; Client Name from Step 3&lt;BR /&gt;client_secret -&amp;gt; Secret from step 3&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;for example:&lt;BR /&gt;curl -X POST -H "Content-Type: application/vnd.appd.cntrl+protobuf;v=1" "https://test-controller.saas.appdynamics.com/controller/api/oauth/access_token" -d 'grant_type=client_credentials&amp;amp;client_id=sunil_api_client@ces-controller&amp;amp;client_secret=738e62b5-2455-45af-a644-934234234234'&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV class="zd-indent"&gt;
&lt;P&gt;Here is the docs for the details:&amp;nbsp;&amp;nbsp;&lt;A href="https://docs.appdynamics.com/appd/23.x/latest/en/extend-appdynamics/appdynamics-apis/api-clients#id-.APIClientsv23.1-generate-access-tokens" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.appdynamics.com/appd/23.x/latest/en/extend-appdynamics/appdynamics-apis/api-clients#id-.APIClientsv23.1-generate-access-tokens&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 17 Oct 2023 04:26:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722586#M3240</guid>
      <dc:creator>Sunil_Agarwal</dc:creator>
      <dc:date>2023-10-17T04:26:35Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to access Rest API using on-premises controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722587#M3241</link>
      <description>&lt;P&gt;Hi Sunil,&lt;/P&gt;&lt;P&gt;Thanks for your response. I am able to complete the steps from your solution and get the access token. But when I try to use the access token to access other APIs.&lt;/P&gt;&lt;P&gt;Example:&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;curl --user &amp;lt;username&amp;gt;@customer1:&amp;lt;password&amp;gt; -H "Authorization:Bearer &amp;lt;ACCESS TOKEN&amp;gt; "https://&amp;lt;controller page&amp;gt;/controller/rest/applications"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I am getting the following error:&lt;/P&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;h1&amp;gt;500 Internal Server Error&amp;lt;/h1&amp;gt;&amp;lt;br/&amp;gt;Exception Id:f08d81b3-42c6-4a1e-a9ad-882dd210bad9&amp;lt;br/&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The same response when I try without the Access token as well. I am not sure why this happens.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Oct 2023 12:16:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722587#M3241</guid>
      <dc:creator>Pradeep_Prakasa</dc:creator>
      <dc:date>2023-10-17T12:16:46Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to access Rest API using on-premises controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722588#M3242</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/148268"&gt;@Sunil.Agarwal&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Any idea how to resolve this?&lt;/P&gt;&lt;P&gt;I am still getting the same error. I even tried accessing it internally from the linux server running the controller and getting the same error.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2023 19:35:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722588#M3242</guid>
      <dc:creator>Pradeep_Prakasa</dc:creator>
      <dc:date>2023-10-18T19:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to access Rest API using on-premises controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722589#M3243</link>
      <description>&lt;P&gt;Hi Pradeep,&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="group final-completion w-full text-token-text-primary border-b border-black/10 gizmo:border-0 dark:border-gray-900/50 gizmo:dark:border-0 bg-gray-50 gizmo:bg-transparent dark:bg-[#444654] gizmo:dark:bg-transparent" data-testid="conversation-turn-9"&gt;
&lt;DIV class="p-4 justify-center text-base md:gap-6 md:py-6 m-auto"&gt;
&lt;DIV class="flex flex-1 gap-4 text-base mx-auto md:gap-6 gizmo:gap-3 gizmo:md:px-5 gizmo:lg:px-1 gizmo:xl:px-5 md:max-w-2xl lg:max-w-[38rem] gizmo:md:max-w-3xl gizmo:lg:max-w-[40rem] gizmo:xl:max-w-[48rem] xl:max-w-3xl }"&gt;
&lt;DIV class="relative flex w-[calc(100%-50px)] flex-col gizmo:w-full lg:w-[calc(100%-115px)] agent-turn"&gt;
&lt;DIV class="flex-col gap-1 md:gap-3"&gt;
&lt;DIV class="flex flex-grow flex-col gap-3 max-w-full"&gt;
&lt;DIV class="min-h-[20px] flex flex-col items-start gap-3 whitespace-pre-wrap break-words overflow-x-auto"&gt;
&lt;DIV class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;P&gt;Thank you for providing the Curl command. I noticed that you've combined two different authorization methods in the same command, "Password-Based" and "Bearer Token." To proceed, please choose either "UsernamePassword" or "Bearer Token" for this command. &lt;BR /&gt;&lt;BR /&gt;Here is the revised command;&amp;nbsp; please try it and inform me of the results.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;curl --user &amp;lt;username&amp;gt;@account-name:&amp;lt;password&amp;gt; "https://&amp;lt;controller page&amp;gt;/controller/rest/applications"&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample language-markup"&gt;&lt;CODE&gt;curl -H "Authorization:Bearer &amp;lt;ACCESS TOKEN&amp;gt; "https://&amp;lt;controller page&amp;gt;/controller/rest/applications"&lt;/CODE&gt;&lt;/PRE&gt;


&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 19 Oct 2023 06:37:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722589#M3243</guid>
      <dc:creator>Sunil_Agarwal</dc:creator>
      <dc:date>2023-10-19T06:37:01Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to access Rest API using on-premises controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722590#M3244</link>
      <description>&lt;P&gt;The issue was related to license not updated in the account. It is working now after refreshing the license and account details in the admin page.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 17:13:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722590#M3244</guid>
      <dc:creator>Pradeep_Prakasa</dc:creator>
      <dc:date>2023-10-20T17:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Not able to access Rest API using on-premises controller</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722591#M3245</link>
      <description>&lt;P&gt;&lt;SPAN&gt;That's excellent news. You can always utilize the "-v" verbose option in the Curl command to access additional details about errors and other related information, which can be invaluable for troubleshooting issues. As we discussed during the Webex call, the root cause of your API issues was the expired license. It's reassuring to hear that this matter has now been resolved.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 17:22:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Not-able-to-access-Rest-API-using-on-premises-controller/m-p/722591#M3245</guid>
      <dc:creator>Sunil_Agarwal</dc:creator>
      <dc:date>2023-10-20T17:22:39Z</dc:date>
    </item>
  </channel>
</rss>

