cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Dashboard API returning error inconsistent with documentation

andy_byrne
Newcomer

Hi,

I'm calling the Dashboard API to create a dashboard via a POST call.

If I specify the owner attribute in the dashboardMetadata section, and make the call, the API returns a 400 response (see below). The documentation states that the owner attribute is optional though.

{

"error": {

"code": 400,

"message": "Constraints violated.",

"constraintViolations": [

{

"path": "owner",

"message": "Body specifies owner.",

"parameterLocation": "PAYLOAD_BODY",

"location": null

}

]

}

}


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.

{

"error": {

"code": 400,

"message": "Constraints violated.",

"constraintViolations": [

{

"path": "id",

"message": "The payload must not have an id set.",

"parameterLocation": "PAYLOAD_BODY",

"location": null

}

]

}

}


So are the docs incorrect, or is the API not handling the requests correctly?


1 REPLY 1

Julius_Loman
DynaMight Legend
DynaMight Legend

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.


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.


Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts