Hi there,
How can I edit the timestamp of a dot?
Thanks,
Hi there,
How can I edit the timestamp of a dot?
Thanks,
Hello, @adrian.hinostroza.
Unfortunately, there is no way of editing the timestamp of a dot, instead, you would have to send the dot again, specifying the timestamp in milliseconds in the JSON, and delete the initial dot to avoid having the same value at different times. An example of a POST request that sends a value with timestamp will look like this:
POST --> https://industrial.api.ubidots.com/api/v1.6/devices/{DEVICE_LABEL}
JSON
{“variable-label”: VALUE, “timestamp”:TIMESTAMP IN MILLISECONDS}
All the best,
-Sebastian
Hi,
Thanks for reply.
How can I send timestamp by using a browser URL?
Hello @adrian.hinostroza,
Sending timestamp through browser URL isn’t supported. That is, if you are sending the whole request through a Browser, sending a specific timestamp isn’t supported.
On the other hand, if you are sending the request through a curl command, then yes, a global timestamp can be specified through the Query Params. The request should look something like this:
curl -X POST 'https://industrial.api.ubidots.com/api/v1.6/devices/<DEVICE_LABEL>/?timestamp=1622476418000' \
-H 'X-Auth-Token: <UBIDOTS_TOKEN>' \
-H 'Content-Type:application/json' \
-d '{"demo": 4}'
More information on how requests can be sent with specific things can be seen at our API Documentation.
Best regards,
Sebastián