Update schedule metadata

22 views
Skip to first unread message

helene...@gmail.com

unread,
Feb 14, 2018, 8:30:39 AM2/14/18
to SiteWhere
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

Derek Adams

unread,
Feb 14, 2018, 8:58:30 AM2/14/18
to SiteWhere
This appears to be a bug. I added an issue so that we address it in the next release. Thanks for bringing it to our attention!

helene...@gmail.com

unread,
Feb 14, 2018, 9:00:21 AM2/14/18
to SiteWhere
Thank you very much!

Helene
Reply all
Reply to author
Forward
0 new messages