Hi,
It seems like it is not possible to update a schedule metadata.
I am using SiteWhere 1.9.
My schedule was:
{
"createdDate": "2018-02-14T09:25:07.036+0000",
"createdBy": "admin",
"updatedDate": null,
"updatedBy": null,
"deleted": false,
"token": "sch1",
"name": "test1",
"triggerType": "SimpleTrigger",
"triggerConfiguration": { "repeatInterval": "1", "repeatCount": "0" },
"startDate": null,
"endDate": null,
"metadata": { "foo": "bar" }
}
I tried with body:
{
"name":"test2",
"metadata": {"hello": "world"}
}
Request URL is: {host}/sitewhere/api/schedules/sch1.
.
Here is what I got as Response body (code is 200):
{
"createdDate": "2018-02-14T09:25:07.036+0000",
"createdBy": "admin",
"updatedDate": "2018-02-14T09:26:56.608+0000",
"updatedBy": "admin",
"deleted": false,
"token": "sch1",
"name": "test2",
"triggerType": "SimpleTrigger",
"triggerConfiguration": { "repeatInterval": "1", "repeatCount": "0" },
"startDate": null,
"endDate": null,
"metadata": { "foo": "bar" }
}
As you can see, name has been updated but metadata was not.
Do you have any idea of what the problem could be?
Thanks in advance!
Helene