04 Jul 2019 04:14 PM
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?
Solved! Go to Solution.
04 Jul 2019 07:41 PM
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.