<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Classic Environment API with Platform Token in Dynatrace tips</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-tips/Classic-Environment-API-with-Platform-Token/m-p/295999#M1889</link>
    <description>&lt;P&gt;You can also use Dynatrace platform tokens[1] against classic endpoints such as Settings Objects[2].&lt;/P&gt;
&lt;P&gt;Give your platform token the permission to access the specific account and environment and at least following scopes:&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;UL&gt;
&lt;LI&gt;settings:objects:read&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;UL&gt;
&lt;LI&gt;settings:objects:write&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;And call the API like this e.g.:&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;LI-CODE lang="javascript"&gt;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"
        }
        }
    }
    }
]'&lt;/LI-CODE&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/platform-tokens" target="_blank" rel="noopener"&gt;[1]https://docs.dynatrace.com/docs/shortlink/platform-tokens&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;A href="https://docs.dynatrace.com/docs/dynatrace-api/environment-api/settings/objects/post-object" target="_blank" rel="noopener"&gt;[2]https://docs.dynatrace.com/docs/dynatrace-api/environment-api/settings/objects/post-object&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
    <pubDate>Wed, 11 Mar 2026 07:52:10 GMT</pubDate>
    <dc:creator>mark_bley</dc:creator>
    <dc:date>2026-03-11T07:52:10Z</dc:date>
    <item>
      <title>Classic Environment API with Platform Token</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/Classic-Environment-API-with-Platform-Token/m-p/295999#M1889</link>
      <description>&lt;P&gt;You can also use Dynatrace platform tokens[1] against classic endpoints such as Settings Objects[2].&lt;/P&gt;
&lt;P&gt;Give your platform token the permission to access the specific account and environment and at least following scopes:&lt;/P&gt;
&lt;DIV class=""&gt;
&lt;UL&gt;
&lt;LI&gt;settings:objects:read&lt;/LI&gt;
&lt;/UL&gt;
&lt;DIV class=""&gt;
&lt;DIV class=""&gt;
&lt;UL&gt;
&lt;LI&gt;settings:objects:write&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;And call the API like this e.g.:&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;LI-CODE lang="javascript"&gt;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"
        }
        }
    }
    }
]'&lt;/LI-CODE&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/platform-tokens" target="_blank" rel="noopener"&gt;[1]https://docs.dynatrace.com/docs/shortlink/platform-tokens&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&lt;A href="https://docs.dynatrace.com/docs/dynatrace-api/environment-api/settings/objects/post-object" target="_blank" rel="noopener"&gt;[2]https://docs.dynatrace.com/docs/dynatrace-api/environment-api/settings/objects/post-object&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 11 Mar 2026 07:52:10 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/Classic-Environment-API-with-Platform-Token/m-p/295999#M1889</guid>
      <dc:creator>mark_bley</dc:creator>
      <dc:date>2026-03-11T07:52:10Z</dc:date>
    </item>
  </channel>
</rss>

