1

What do you think about making the "time" property optional in request body to provide more flexibility. This property could be added automatically with current date and time when not present in the request.

It could be useful for SigFox compatibility for example because even if it's possible to add a {time} pattern in message body forwarded by SigFox system, there is no way to modify the format of the datetime generated. Currently the {time} pattern generate a Timestamp and Cumulocity expect an ISO 8601 formatted date time.

Currently I got a "422 - Unprocessable Entity" even if the request is TRANSIENT when I give a Timestamp or no time property when calling Cumulocity. I had the idea to make a TRANSIENT request to store an Event by writing a CEL statement to generate the missing "time" property but it's not possible because the error appears before reaching the event process.

Do you know an other way to do operate?

1 Answers1

1

You can take a look at SmartREST (http://cumulocity.com/guides/reference/smartrest/).

It allows you to create templates for you requests on the server side. Afterwards you just send the values to replace in the template as csv (+ the template id).

It also allows you to let the time value be automatically set by the server.

TyrManuZ
  • 2,039
  • 1
  • 14
  • 23