{"type":"api","title":"Get Location History","meta":{"id":"/apps/pubhub/media/edm-api-v2/a2a30bcc9ecab5281b65761ae61df7e0031d5691/f67a4e01-0023-334a-9a4a-7e606c2ef1a2","swagger":"2.0","info":{"contact":{"email":"devmgmt@cisco.com"},"description":"This is the IoT device management core service. The service is responsible for managing the lifecycle of various IoT gateways and endpoints deployed as part of the Field Area Networks","license":{"name":"Licensing is primarily subscription based. Call Andy now!","url":"https://www.cisco.com"},"termsOfService":"http://swagger.io/terms/","title":"IoT Device Lifecycle Management","version":"4.0.0"},"host":"us.ciscoiot.com","basePath":"/nbapi/edm/v1","schemes":["https"],"securityDefinitions":{"bearerAuth":{"description":"This is the bearer Auth token.","in":"header","name":"Authorization","type":"apiKey"}},"security":[{"bearerAuth":[]}],"x-parser-conf":{"apiKeyGenerator":{"$remoteModule":"./config/apikey.js"}}},"spec":{"description":"Returns location history for given device.\u003cbr /\u003e One of the below permissions is needed to invoke this API\u003cbr /\u003e- Tenant Management\u003cbr /\u003e- Troubleshoot Devices\u003cbr /\u003e- Manage Devices\u003cbr /\u003e- Manage Firmware Upgrades\u003cbr /\u003e- Manage Groups\u003cbr /\u003e- Manage Templates\u003cbr /\u003e- View Devices\u003cbr /\u003e- Delete_devices\u003cbr /\u003e- Deactivate Devices\u003cbr /\u003e- Request Device Deactivation/Deletion","operationId":"getLocationHistory","parameters":[{"description":"The uuid of the tenant in whose context we are calling the api.","format":"uuid","in":"header","name":"x-tenant-id","required":true,"type":"string"},{"description":"EID of the device to return","in":"path","name":"device_eid","required":true,"type":"string"},{"description":"start time of location history","format":"int64","in":"query","name":"startTime","required":true,"type":"integer"},{"description":"end time of location history","format":"int64","in":"query","name":"endTime","required":true,"type":"integer"}],"produces":["application/json"],"responses":{"200":{"description":"successful retrieval","schema":{"properties":{"deviceName":{"description":"device name","example":"IR807G-LTE-NA-K9+FCW22220058","type":"string"},"locationTrackingErrorCode":{"description":"location tracking error code","example":null,"type":"string"},"records":{"items":{"properties":{"latitude":{"example":37.43076,"type":"string"},"longitude":{"example":-121.89751,"type":"string"},"rssi":{"example":-78,"type":"string"},"timestamp":{"example":1604359563017,"format":"int64","type":"integer"}},"type":"object","$$ref":"#/definitions/LocationHistoryRecordsVo"},"type":"array"},"rssiSupported":{"description":"rssi supported","type":"boolean"}},"type":"object","$$ref":"#/definitions/LocationHistoryVo"}},"400":{"description":"Bad request","schema":{"description":"Specifies the error that occurred during the device add api request.","example":{"error":"Bad Request","message":"Required request parameter 'startTime' for method parameter type Long is not present","path":"/resource/rest/api/v1/devices/IG31R-VZ-B+12345678901/location_history","status":400,"timestamp":1676913755619},"type":"object","$$ref":"#/definitions/LocationHistoryError"}},"401":{"description":"Unauthorized","schema":{"example":"Unauthorized","type":"string"}},"403":{"description":"Forbidden","schema":{"example":"Permission denied to access the resouce","type":"string"}},"404":{"description":"Not found","schema":{"example":"Device not found","type":"string"}}},"summary":"Get location history","tags":["devices"],"__originalOperationId":"getLocationHistory","security":[{"bearerAuth":[]}],"method":"get","path":"/devices/{device_eid}/location_history"}}