<?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 Dashboard API returning error inconsistent with documentation in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Dashboard-API-returning-error-inconsistent-with-documentation/m-p/120620#M966</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm calling the Dashboard API to create a dashboard via a POST call.&lt;/P&gt;&lt;P&gt;If I specify the owner attribute in the dashboardMetadata section, and make the call, the API returns a 400 response (see below). The &lt;A rel="noopener noreferrer" href="https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/configuration-api/dashboards-api/?request-parameters%3C-%3Ejson-model=request-parameters#dashboards-post-parameter-dashboardmetadata" target="_blank"&gt;documentation&lt;/A&gt; states that the owner attribute is optional though.&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "error": {&lt;/P&gt;&lt;P&gt;        "code": 400,&lt;/P&gt;&lt;P&gt;        "message": "Constraints violated.",&lt;/P&gt;&lt;P&gt;        "constraintViolations": [&lt;/P&gt;&lt;P&gt;            {&lt;/P&gt;&lt;P&gt;                "path": "owner",&lt;/P&gt;&lt;P&gt;                "message": "Body specifies owner.",&lt;/P&gt;&lt;P&gt;                "parameterLocation": "PAYLOAD_BODY",&lt;/P&gt;&lt;P&gt;                "location": null&lt;/P&gt;&lt;P&gt;            }&lt;/P&gt;&lt;P&gt;        ]&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Similarly, if I specify an id value in the POST body the response below is received. Again, the docs say id is an optional attribute that can be set.&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "error": {&lt;/P&gt;&lt;P&gt;        "code": 400,&lt;/P&gt;&lt;P&gt;        "message": "Constraints violated.",&lt;/P&gt;&lt;P&gt;        "constraintViolations": [&lt;/P&gt;&lt;P&gt;            {&lt;/P&gt;&lt;P&gt;                "path": "id",&lt;/P&gt;&lt;P&gt;                "message": "The payload must not have an id set.",&lt;/P&gt;&lt;P&gt;                "parameterLocation": "PAYLOAD_BODY",&lt;/P&gt;&lt;P&gt;                "location": null&lt;/P&gt;&lt;P&gt;            }&lt;/P&gt;&lt;P&gt;        ]&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So are the docs incorrect, or is the API not handling the requests correctly?&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 04 Jul 2019 15:14:27 GMT</pubDate>
    <dc:creator>andy_byrne</dc:creator>
    <dc:date>2019-07-04T15:14:27Z</dc:date>
    <item>
      <title>Dashboard API returning error inconsistent with documentation</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Dashboard-API-returning-error-inconsistent-with-documentation/m-p/120620#M966</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm calling the Dashboard API to create a dashboard via a POST call.&lt;/P&gt;&lt;P&gt;If I specify the owner attribute in the dashboardMetadata section, and make the call, the API returns a 400 response (see below). The &lt;A rel="noopener noreferrer" href="https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/configuration-api/dashboards-api/?request-parameters%3C-%3Ejson-model=request-parameters#dashboards-post-parameter-dashboardmetadata" target="_blank"&gt;documentation&lt;/A&gt; states that the owner attribute is optional though.&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "error": {&lt;/P&gt;&lt;P&gt;        "code": 400,&lt;/P&gt;&lt;P&gt;        "message": "Constraints violated.",&lt;/P&gt;&lt;P&gt;        "constraintViolations": [&lt;/P&gt;&lt;P&gt;            {&lt;/P&gt;&lt;P&gt;                "path": "owner",&lt;/P&gt;&lt;P&gt;                "message": "Body specifies owner.",&lt;/P&gt;&lt;P&gt;                "parameterLocation": "PAYLOAD_BODY",&lt;/P&gt;&lt;P&gt;                "location": null&lt;/P&gt;&lt;P&gt;            }&lt;/P&gt;&lt;P&gt;        ]&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Similarly, if I specify an id value in the POST body the response below is received. Again, the docs say id is an optional attribute that can be set.&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;    "error": {&lt;/P&gt;&lt;P&gt;        "code": 400,&lt;/P&gt;&lt;P&gt;        "message": "Constraints violated.",&lt;/P&gt;&lt;P&gt;        "constraintViolations": [&lt;/P&gt;&lt;P&gt;            {&lt;/P&gt;&lt;P&gt;                "path": "id",&lt;/P&gt;&lt;P&gt;                "message": "The payload must not have an id set.",&lt;/P&gt;&lt;P&gt;                "parameterLocation": "PAYLOAD_BODY",&lt;/P&gt;&lt;P&gt;                "location": null&lt;/P&gt;&lt;P&gt;            }&lt;/P&gt;&lt;P&gt;        ]&lt;/P&gt;&lt;P&gt;    }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;So are the docs incorrect, or is the API not handling the requests correctly?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jul 2019 15:14:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Dashboard-API-returning-error-inconsistent-with-documentation/m-p/120620#M966</guid>
      <dc:creator>andy_byrne</dc:creator>
      <dc:date>2019-07-04T15:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard API returning error inconsistent with documentation</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Dashboard-API-returning-error-inconsistent-with-documentation/m-p/120621#M967</link>
      <description>&lt;P&gt;Well, I think docs are not exactly specific. I also ran into both situations. I think the optional means that the object might have such attributes when fetching a dashboard definition.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;However, I'd really appreciate the possibility of specifying the ID and owner. This would make synchronization of dashboards (and probably other items with ids - for example, request attributes)  much more simple.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 04 Jul 2019 18:41:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Dashboard-API-returning-error-inconsistent-with-documentation/m-p/120621#M967</guid>
      <dc:creator>Julius_Loman</dc:creator>
      <dc:date>2019-07-04T18:41:08Z</dc:date>
    </item>
  </channel>
</rss>

