<?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 Import Dashboard Using Controller API and Postman Tool in Splunk AppDynamics</title>
    <link>https://community.splunk.com/t5/Splunk-AppDynamics/Import-Dashboard-Using-Controller-API-and-Postman-Tool/m-p/729716#M6795</link>
    <description>&lt;P&gt;I am trying to export and import a dashboard using the Controller API, and using the Postman tool.&lt;/P&gt;&lt;P&gt;Ref export, I have this working OK:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I created an API Client with the administrator role&lt;/LI&gt;&lt;LI&gt;I used the Controller API with the API Client credentials to generate a Bearer Token,&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;https://&lt;SPAN&gt;{{controller_uri}}&lt;/SPAN&gt;&lt;SPAN&gt;//controller/api/oauth/access_token&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I successfully exported a dashboard&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://%7b%7bcontroller_uri%7d%7d/controller/CustomDashboardImportExportServlet?dashboardId=12355" target="_blank" rel="noopener nofollow noreferrer"&gt;https://{{controller_uri}}/controller/CustomDashboardImportExportServlet?dashboardId=12355&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Headers:&lt;/P&gt;&lt;P&gt;Authorization:Bearer {{bearer_token}}&lt;/P&gt;&lt;P&gt;Now when I try to import a dashboard using the API, with:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A new dashboard name that currently doesn’t exist,&lt;/LI&gt;&lt;LI&gt;Using basic authentication (my user account which also has admin access) because the import API does not support the use of the Bearer Token (open enhancement exists: Internal story ID &lt;A href="https://jira.corp.appdynamics.com/browse/METADATA-9305" target="_blank" rel="noopener nofollow noreferrer"&gt;https://jira.corp.appdynamics.com/browse/METADATA-9305&lt;/A&gt;).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.. I simply get a 500 response.&lt;/P&gt;&lt;P&gt;What I tried is:&lt;/P&gt;&lt;P&gt;Method: POST&lt;/P&gt;&lt;P&gt;URI: https://{{controller_uri}}/controller/CustomDashboardImportExportServlet&lt;/P&gt;&lt;P&gt;BODY: The json of the previously exported dashboard&lt;/P&gt;&lt;P&gt;Content-Type: application/json&lt;/P&gt;&lt;P&gt;As per the documentation, I also tried using CURL and it worked:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.appdynamics.com/4.5.x/en/extend-appdynamics/appdynamics-apis/configuration-import-and-export-api" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.appdynamics.com/4.5.x/en/extend-appdynamics/appdynamics-apis/configuration-import-and-export-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;curl -X POST --user Allister.Green@RSAGroup:&amp;lt;pw&amp;gt; &lt;A href="https://%3cdomain" target="_blank" rel="noopener nofollow noreferrer"&gt;https://&amp;lt;domain&lt;/A&gt; uri&amp;gt;/controller/CustomDashboardImportExportServlet -F file=@dashboard.json&lt;/P&gt;&lt;P&gt;Because the curl example uses a file, I also tried using a file with Postman instead of using the dashboard json as the message body, but this also generated a 500 response.&lt;/P&gt;&lt;P&gt;To use a file:&lt;/P&gt;&lt;P&gt;Body: form-data&lt;/P&gt;&lt;P&gt;KEY: file, VALUE: &amp;lt;filename&amp;gt;, CONTENT TYPE application/json&lt;/P&gt;&lt;P&gt;Has anyone got dashboard imports working using Postman, and if so, please can you share how.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Allister.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Aug 2021 10:53:19 GMT</pubDate>
    <dc:creator>Allister_Green</dc:creator>
    <dc:date>2021-08-23T10:53:19Z</dc:date>
    <item>
      <title>Import Dashboard Using Controller API and Postman Tool</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Import-Dashboard-Using-Controller-API-and-Postman-Tool/m-p/729716#M6795</link>
      <description>&lt;P&gt;I am trying to export and import a dashboard using the Controller API, and using the Postman tool.&lt;/P&gt;&lt;P&gt;Ref export, I have this working OK:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I created an API Client with the administrator role&lt;/LI&gt;&lt;LI&gt;I used the Controller API with the API Client credentials to generate a Bearer Token,&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;https://&lt;SPAN&gt;{{controller_uri}}&lt;/SPAN&gt;&lt;SPAN&gt;//controller/api/oauth/access_token&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;I successfully exported a dashboard&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A href="https://%7b%7bcontroller_uri%7d%7d/controller/CustomDashboardImportExportServlet?dashboardId=12355" target="_blank" rel="noopener nofollow noreferrer"&gt;https://{{controller_uri}}/controller/CustomDashboardImportExportServlet?dashboardId=12355&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Headers:&lt;/P&gt;&lt;P&gt;Authorization:Bearer {{bearer_token}}&lt;/P&gt;&lt;P&gt;Now when I try to import a dashboard using the API, with:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;A new dashboard name that currently doesn’t exist,&lt;/LI&gt;&lt;LI&gt;Using basic authentication (my user account which also has admin access) because the import API does not support the use of the Bearer Token (open enhancement exists: Internal story ID &lt;A href="https://jira.corp.appdynamics.com/browse/METADATA-9305" target="_blank" rel="noopener nofollow noreferrer"&gt;https://jira.corp.appdynamics.com/browse/METADATA-9305&lt;/A&gt;).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;.. I simply get a 500 response.&lt;/P&gt;&lt;P&gt;What I tried is:&lt;/P&gt;&lt;P&gt;Method: POST&lt;/P&gt;&lt;P&gt;URI: https://{{controller_uri}}/controller/CustomDashboardImportExportServlet&lt;/P&gt;&lt;P&gt;BODY: The json of the previously exported dashboard&lt;/P&gt;&lt;P&gt;Content-Type: application/json&lt;/P&gt;&lt;P&gt;As per the documentation, I also tried using CURL and it worked:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.appdynamics.com/4.5.x/en/extend-appdynamics/appdynamics-apis/configuration-import-and-export-api" target="_blank" rel="noopener nofollow noreferrer"&gt;https://docs.appdynamics.com/4.5.x/en/extend-appdynamics/appdynamics-apis/configuration-import-and-export-api&lt;/A&gt;&lt;/P&gt;&lt;P&gt;curl -X POST --user Allister.Green@RSAGroup:&amp;lt;pw&amp;gt; &lt;A href="https://%3cdomain" target="_blank" rel="noopener nofollow noreferrer"&gt;https://&amp;lt;domain&lt;/A&gt; uri&amp;gt;/controller/CustomDashboardImportExportServlet -F file=@dashboard.json&lt;/P&gt;&lt;P&gt;Because the curl example uses a file, I also tried using a file with Postman instead of using the dashboard json as the message body, but this also generated a 500 response.&lt;/P&gt;&lt;P&gt;To use a file:&lt;/P&gt;&lt;P&gt;Body: form-data&lt;/P&gt;&lt;P&gt;KEY: file, VALUE: &amp;lt;filename&amp;gt;, CONTENT TYPE application/json&lt;/P&gt;&lt;P&gt;Has anyone got dashboard imports working using Postman, and if so, please can you share how.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Allister.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 10:53:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Import-Dashboard-Using-Controller-API-and-Postman-Tool/m-p/729716#M6795</guid>
      <dc:creator>Allister_Green</dc:creator>
      <dc:date>2021-08-23T10:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Import Dashboard Using Controller API and Postman Tool</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Import-Dashboard-Using-Controller-API-and-Postman-Tool/m-p/729717#M6796</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.appdynamics.com/t5/user/viewprofilepage/user-id/136128"&gt;@Allister.Green&lt;/A&gt;,&lt;/P&gt;

&lt;P&gt;I see you ended up creating a Support ticket. Can you please share your results as a reply to this post.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Knowledge sharing is key to this community.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Aug 2021 17:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Import-Dashboard-Using-Controller-API-and-Postman-Tool/m-p/729717#M6796</guid>
      <dc:creator>iamryan</dc:creator>
      <dc:date>2021-08-30T17:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Import Dashboard Using Controller API and Postman Tool</title>
      <link>https://community.splunk.com/t5/Splunk-AppDynamics/Import-Dashboard-Using-Controller-API-and-Postman-Tool/m-p/729718#M6797</link>
      <description>&lt;P&gt;Thanks for the prompt Ryan.&lt;/P&gt;

&lt;P&gt;I wasn't able to get the dashboard import working using Postman.&lt;/P&gt;

&lt;P&gt;But... I was able to get it to work using Fiddler.&lt;/P&gt;

&lt;P&gt;Method: POST&lt;/P&gt;
&lt;P&gt;URI: &lt;A href="https://&amp;lt;controller" target="_blank" rel="nofollow noopener noreferrer"&gt;https://&amp;lt;controller&lt;/A&gt;&amp;nbsp;domain&amp;gt;/controller/CustomDashboardImportExportServlet&lt;/P&gt;
&lt;P&gt;Header: Authorization: Basic QWxsaXN0ZXxxxxxxxxxxxxxxx&lt;/P&gt;
&lt;P&gt;Body:&lt;/P&gt;
&lt;P&gt;Click on “upload file” and select the json file containing the dashboard. Note it is not possible to use JSON directly as the message body.&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AllisterGreen_0-1630420467857.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="image.png"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/35121i333244376EC8E6D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;To generate the Authorization header:&lt;/P&gt;

&lt;P&gt;Create string: &amp;lt;user name&amp;gt;@&amp;lt;tenant&amp;gt;:&amp;lt;user password&amp;gt;&lt;/P&gt;
&lt;P&gt;Then base 64 encode this using your tool of choice.&lt;/P&gt;
&lt;P&gt;e.g. if using Notepad++&lt;/P&gt;
&lt;P&gt;select the text&lt;/P&gt;
&lt;P&gt;Plugins -&amp;gt; MIME Toools -&amp;gt; Base64 Encode&lt;/P&gt;

&lt;P&gt;Then the header is simply:&lt;/P&gt;
&lt;P&gt;Authorization: Basic &amp;lt;base64 encoded string&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Aug 2021 14:36:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-AppDynamics/Import-Dashboard-Using-Controller-API-and-Postman-Tool/m-p/729718#M6797</guid>
      <dc:creator>Allister_Green1</dc:creator>
      <dc:date>2021-08-31T14:36:51Z</dc:date>
    </item>
  </channel>
</rss>

