<?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 Re: /api/v2/settings/objects and maintenance window -  Must be of type local_date_time. in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Type-local-date-time-in-api-v2-settings-objects-and-Maintenance/m-p/192771#M1996</link>
    <description>&lt;P&gt;OK, I learn that:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;local_date_time&lt;/STRONG&gt; type follows the following format: year-month-day-hour-minute-second, so for your configuration you will need to adapt the schedule to something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;startTime: "2022-08-17T20:00:00"&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Aug 2022 07:31:24 GMT</pubDate>
    <dc:creator>ZiemekBorowski</dc:creator>
    <dc:date>2022-08-17T07:31:24Z</dc:date>
    <item>
      <title>Type local_date_time. in /api/v2/settings/objects and Maintenance Window</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Type-local-date-time-in-api-v2-settings-objects-and-Maintenance/m-p/192758#M1995</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried to setup MW as bellow&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;[
  {
    "schemaId": "builtin:alerting.maintenance-window",
    "scope": "environment",
    "schemaVersion": "2.14",
    "value": {
      "enabled": true,
      "generalProperties": {
        "name": "Example Window ZZZZ",
        "description": "An example Maintenance window ZZZZ",
        "maintenanceType": "UNPLANNED",
        "suppression": "DETECT_PROBLEMS_DONT_ALERT",
        "disableSyntheticMonitorExecution": false
      },
      "schedule": {
        "scheduleType": "ONCE",
        "onceRecurrence": {
          "startTime": "18:00:00.00",
          "endTime": "19:00:00.00",
          "timeZone": "Europe/Berlin"
        }
      },
      "filters": [
        {
          "entityType": "HOST",
          "entityTags": [
            "PatchGroup:t1g1"
          ],
          "managementZones": [
            "1234567890123455"
          ]
        }
      ]
    }
  }
]&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;but all call of API finish with warning:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Post to Dynatrace failed.; Error `Create failed with code 400and error: 
{
  "code": 400,
  "message": "Validation failed for 2 Validators.",
  "constraintViolations": [
    {
      "path": "builtin:alerting.maintenance-window/0/schedule/onceRecurrence/startTime",
      "message": "Given property 'startTime' with value: '20:00:00' violates the following constraint: Must be of type local_date_time.",
      "parameterLocation": "PAYLOAD_BODY",
      "location": null
    },
    {
      "path": "builtin:alerting.maintenance-window/0/schedule/onceRecurrence/endTime",
      "message": "Given property 'endTime' with value: '21:00:00' violates the following constraint: Must be of type local_date_time.",
      "parameterLocation": "PAYLOAD_BODY",
      "location": null
    }
  ]
}`&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tested many of format of time and datetime - all wrong.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Aug 2024 07:31:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Type-local-date-time-in-api-v2-settings-objects-and-Maintenance/m-p/192758#M1995</guid>
      <dc:creator>ZiemekBorowski</dc:creator>
      <dc:date>2024-08-21T07:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: /api/v2/settings/objects and maintenance window -  Must be of type local_date_time.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Type-local-date-time-in-api-v2-settings-objects-and-Maintenance/m-p/192771#M1996</link>
      <description>&lt;P&gt;OK, I learn that:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;local_date_time&lt;/STRONG&gt; type follows the following format: year-month-day-hour-minute-second, so for your configuration you will need to adapt the schedule to something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;startTime: "2022-08-17T20:00:00"&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Aug 2022 07:31:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Type-local-date-time-in-api-v2-settings-objects-and-Maintenance/m-p/192771#M1996</guid>
      <dc:creator>ZiemekBorowski</dc:creator>
      <dc:date>2022-08-17T07:31:24Z</dc:date>
    </item>
  </channel>
</rss>

