Dynatrace tips
Tips and workarounds from Dynatrace users for Dynatrace users.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Classic Environment API with Platform Token

mark_bley
Dynatrace Champion
Dynatrace Champion

You can also use Dynatrace platform tokens[1] against classic endpoints such as Settings Objects[2].

Give your platform token the permission to access the specific account and environment and at least following scopes:

  • settings:objects:read
  • settings:objects:write

And call the API like this e.g.:

curl -X POST "https://{environmentid}.apps.dynatrace.com/platform/classic/environment-api/v2/settings/objects" \                                                                                                                
-H "Authorization: Bearer dt0s16.L4ULG7YU.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \                                                                                                                   
-H "Content-Type: application/json" \                                                                                                                                                                                             
-d '[                                                                                                                                                                                                                           
    {                                                                                                                                                                                                                               
    "schemaId": "builtin:alerting.maintenance-window",
    "scope": "environment",
    "value": {
        "enabled": false,
        "generalProperties": {
        "name": "Scheduled maintenance window",
        "description": "Created via API",
        "maintenanceType": "PLANNED",
        "suppression": "DETECT_PROBLEMS_DONT_ALERT",
        "disableSyntheticMonitorExecution": false
        },
        "schedule": {
        "scheduleType": "ONCE",
        "onceRecurrence": {
            "startTime": "2026-03-10T12:00:00",
            "endTime": "2026-03-10T13:00:00",
            "timeZone": "UTC"
        }
        }
    }
    }
]'
 
 
0 REPLIES 0

Featured Posts