How to make a device historical through the SDK

Related Questions

  • How to Make a Device Historical using MyGeotab SDK?

Applies To

  • MyGeotab SDK

Procedure

  1. Navigate to the MyGeotab SDK API Runner 
  2. Enter the server, database and your credentials to login
  3. Run the following API call:
    • api.call("Set", {
      "typeName": "Device",
      "entity":{
      "id":"<device id>",
      "activeTo": new Date().toISOString()
      }
      }, function(result) {
      console.log("Done: ", result);
      }, function(e) {
      console.error("Failed:", e);
      });

Additional Notes

  • Modify the device id to the device you would like to make historical.
  • Specify the time you would like to make the device historical in the activeTo field. Date must be the current timestamp or a timestamp in the past.
  • The timestamp in the activeTo property is in UTC.