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

Settings 2.0 - API calls without passwords/secrets/credentials

ct_27
DynaMight Pro
DynaMight Pro

So, for many Schema's you need to provide a token, password, or some form of credential. Here is just one example but their are many. This is for Problem Notification schema.

"url": "https://*****/api/560751/dynatrace/HM_Dynatrace_Create_Incident", "acceptAnyCertificate": true, "notifyEventMergesEnabled": true, "notifyClosedProblems": true, "headers": [ { "name": "Authorization", "secret": true, "secretValue": "***169***" } ],

You can see there is a 'secretValue' attribute. Dynatrace now auto fills with "****XXX****" when you do a get on /settings/objects api. But when i go to do a PUT on /settings/objects/{objectID} there are certain required JSON components that must be provided.

Many times, those JSON objects contain the credential sections. I don't want or may not know the secretValue or credential but I need to call the API to DISABLE the configuration or change a different attribute. If I make the PUT call without this data, Dynatrace then clears my credential data.

So, my question is how can I do a PUT for an object without having to provide the secretValue but also not clearing out the secretValue.

Thank you in advance.

HigherEd
2 REPLIES 2

ct_27
DynaMight Pro
DynaMight Pro

Dynatrace or Community....any input on how to do a Settings API PUT to update an Object but without having to re-send the SecretValue

HigherEd

Wolfgang_Groiss
Dynatrace Enthusiast
Dynatrace Enthusiast

Hi @ct_27,

you can just re-submit the masked ("****XXX****") value in your PUT's payload. This will indicate that the secret should not be changed.

A big caveat is that in some cases this is not allowed, to prevent secrets from being sent to endpoints that the user providing the secret didn't intend. In this case it should work though.´

Featured Posts