Hi All,
Need your guidance on below Question:-
How to export Management Zone from Dynatrace. We have 800++ management zones.
Any idea to export Management Zones will be much appreciated
Mukesh
Hi All,
Need your guidance on below Question:-
How to export Management Zone from Dynatrace. We have 800++ management zones.
Any idea to export Management Zones will be much appreciated
Mukesh
Hello,
You can use Dynatrace environment API v2, /settings/objects. and use builtin:management-zones in schemaIds.
This should help you export all your management zones.
Thanks,
Islam
Thanks for your response.
Can you please tell what are steps we need to take it?
Mukesh
Hi,
curl -X 'GET' \
'https://XXXXXXXX.live.dynatrace.com/api/v2/settings/objects?schemaIds=builtin%3Amanagement-zones&fields=objectId%2Cvalue&pageSize=500' \
-H 'accept: application/json; charset=utf-8' \
-H 'Authorization: Api-Token XXXXXXXX'
That will provide first chunk with 500 MZ in your tenant.
It would provide an ID, in the body, to make a similar call with next chunk. That API return 500 entities as maximum in one shot.
Bets regards
Hi guys,
Just to add to @AntonPineiro & @Islam_Zedan correct answers, you can always look for the ⌠at the top right
Click on API button
Which will help you to get the right API you need in this case for read
HTH
Yos
Thanks for your suggestion.
We are getting below error:
<span>{</span> <span class="">"error"</span><span>: {</span> <span class="">"code"</span><span>: </span><span>404</span><span>,</span> <span class="">"message"</span><span>: </span><span>"Settings not found"</span>
}
}
How can we fix it?
Could you please share the Curl you used?
curl âhttps://{environmentid}.live.dynatrace.com/api/v2/settings/objects?schemaIds=builtinâ%â3Amanagement-zones&scopes=environment&fields=objectIdâ%â2Cvalueâ ^
-X GET ^
-H âAccept: application/json; charset=utf-8â ^
-H âContent-Type: application/json; charset=utf-8â ^
-H âAuthorization: Api-Token XXXXXXXXXXXXXâ
curl âhttps://{environmentid}.live.dynatrace.com/api/v2/settings/objects?schemaIds=builtinâ%â3Amanagement-zones&scopes=environment&fields=objectIdâ%â2Cvalueâ ^
-X GET ^
-H âAccept: application/json; charset=utf-8â ^
-H âContent-Type: application/json; charset=utf-8â ^
-H âAuthorization: Api-Token xxxxxxxâ
Hi @nicemukesh
For me in windows cmd the api request works OK
Also from Postman
From where are you running the curl command?
Yos
Hi All,
Thanks for all responses, i ran below CURL command, it is working now.
curl -X âGETâ \ âhttps://{environmentid}.live.dynatrace.com/api/v2/settings/objects?schemaIds=builtin%3Amanagement-zones&fields=objectId%2Cvalue&pageSize=500â \ -H âaccept: application/json; charset=utf-8â \ -H âAuthorization: Api-Token XXXXXXXXâ
I have a query, when i tried to run in Dynatrace API. Bit confused for object ID, how to fetch OBJECT ID.
Mukesh
Hi @nicemukesh
You need to fetch all the objects with get /settings/objects
The schema ID can be found on the MZ page
HTH
Yos
Thanks for your suggestions. it helps a lot
We have DY installed inside our network. I replaced the URL with our environment URL.
Getting this error :
404 {âerrorâ:{âcodeâ:404,âmessageâ:âfailed to resolve tenant <apm-qa>â}}