Not a customer? Click the 'Start a free trial' link to begin a 30-day SaaS trial of our product and to join our community.
Existing Cisco AppDynamics customers should click the 'Sign In' button to authenticate to access the community
08-23-2021 03:53 AM
I am trying to export and import a dashboard using the Controller API, and using the Postman tool.
Ref export, I have this working OK:
https://{{controller_uri}}//controller/api/oauth/access_token
https://{{controller_uri}}/controller/CustomDashboardImportExportServlet?dashboardId=12355
Headers:
Authorization:Bearer {{bearer_token}}
Now when I try to import a dashboard using the API, with:
.. I simply get a 500 response.
What I tried is:
Method: POST
URI: https://{{controller_uri}}/controller/CustomDashboardImportExportServlet
BODY: The json of the previously exported dashboard
Content-Type: application/json
As per the documentation, I also tried using CURL and it worked:
curl -X POST --user Allister.Green@RSAGroup:<pw> https://<domain uri>/controller/CustomDashboardImportExportServlet -F file=@dashboard.json
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.
To use a file:
Body: form-data
KEY: file, VALUE: <filename>, CONTENT TYPE application/json
Has anyone got dashboard imports working using Postman, and if so, please can you share how.
Thanks,
Allister.
Solved! Go to Solution.
08-30-2021 10:21 AM
Hi @Allister.Green,
I see you ended up creating a Support ticket. Can you please share your results as a reply to this post.
Knowledge sharing is key to this community.
Thanks,
Ryan, Cisco AppDynamics Community Manager
Found something helpful? Click the Accept as Solution button to help others find answers faster.
Liked something? Click the Thumbs Up button.
Check out Observabiity in Action
new deep dive videos weekly in the Knowledge Base.
08-31-2021 07:36 AM
Thanks for the prompt Ryan.
I wasn't able to get the dashboard import working using Postman.
But... I was able to get it to work using Fiddler.
Method: POST
URI: https://<controller domain>/controller/CustomDashboardImportExportServlet
Header: Authorization: Basic QWxsaXN0ZXxxxxxxxxxxxxxxx
Body:
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.
To generate the Authorization header:
Create string: <user name>@<tenant>:<user password>
Then base 64 encode this using your tool of choice.
e.g. if using Notepad++
select the text
Plugins -> MIME Toools -> Base64 Encode
Then the header is simply:
Authorization: Basic <base64 encoded string>
Thank you! Your submission has been received!
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form