cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

REST Incident calls - Authentication

rravindran
Inactive

How can we pass the username and password for DT server, when we use REST API to update an incident . THe URL we are using looks like this

"https://MDC1SIT-EAM001.MLC.COM.AU:8021/rest/management/profiles/dynaTrace Self-Monitoring/incidentrules/MP1 - CPU High/incidents/cd65d997-e3cd-4512-9906-03819effedd4"

10 REPLIES 10

sooryaprabha_mo
Inactive

Hi Rejith,

In my Dynatrace Server I tried the above REST URL which you provided, it pop ups "Username and password" for Dynatrace Server credentials authentication.

Attached the screenshot for your reference.dtservercredentials-popup.jpg

Thanks

Soorya Mohan

rravindran
Inactive

Yes .. But I want to supress the pop up , and pass the credentials along with URL

Ex: https://hostname:8021/xx/xxx/xxx?username=abc&password=123

hao-lin_liang
Helper

Hey Reijith,

Worth a shot https://{host}/xx/xx/xx/login?user=sampleuser&password=samplepw

Got it in the documentation on how to login to the synthetic api portal, seeing they are both rest api's worth giving it a shot.

https://community.dynatrace.com/community/display/...

Hi ,

Documentation which you mentioned is for Dynatrace Synthetic..Even though tried the same logic in these REST login credentials, but no luck.

Found the Dynatrace REST documentation:

https://community.dynatrace.com/community/pages/viewpage.action?pageId=221381767

But here also no where mentioned how to pass credentails in URL or any other way to suppress the pop.

Thanks

Soorya Mohan

Babar_Qayyum
DynaMight Leader
DynaMight Leader

Hello @Soorya Prabha M.,

Most sections of the AppMon REST interfaces requires authentication. Since AppMon 6.3 all pages and services requiring authentication are by default only available if HTTPS is used. This default setting can be changed within Webserver Management, but it's not recommended.

Regards,

Babar

david_n
Inactive

We are able to get past the authentication issue when we place the authentication credentials near the beginning of the link: https://username:password@<servername>:8021....

Thanks,

David Nicholls

I have tried using the url you mentioned, but it popping an error. Are you able to login successfully?

Hello Bharath,

Try the following one.

https:/<dt server host/ip>:8021?username=abcdef&password=123456

Regards,

Babar

Thanks Babar. But I am trying to access a html page i.e. dashboard directly without the credentials popup. Here is the url which I am trying to use:

https://

<dt server host>:8021/rest/management/reports/create/<dashboard>?source=live:<profile>&type=html

Tried using the format you mentioned. But no luck.

Regards,

Bharath

Hello Rejith,

You cannot skip or suppress the authentication.

If you are using Java, you can see here: Fetching the XML from REST for a plugin

I have included a snippet to circumvent this. Feel free to use this snippet in your code.

Regards, Rajesh.