Viewing 0 reply threads
Viewing 0 reply threads
- You must be logged in to reply to this topic.
Tagged: api, changelogs, vehicle deleted
In the following forum you can see a method through the APIs of how to identify which user deleted a vehicle.
We will first use the Devices API to get the last vehicle ID associated with the device.
https://pegasus1.pegasusgateway.com/api-static/docs/#api-Devices-GetDevice
Use the following API by replacing your site and the IMEI of the device in the URL
https://pegasus1.pegasusgateway.com/api/devices/:IMEI
In the response, you need to find the last associated vehicle ID.
Once you have the “vid” it will be used in another API to identify who eliminated that vehicle.
Now the Changelogs API must be used and we will use the vehicle ID obtained previously
https://pegasus1.pegasusgateway.com/api-static/docs/#api-Changelogs-GetChangelogs
Parameters to consider
https://pegasus1.pegasusgateway.com/api/changelogs?from=2020-11-01&methods=DELETE&path=^/api/vehicles/5659
In the response you get the “user_id” of the user who deleted the vehicle, you only have to look in Organization with the ID to know which user is.
Note: If you want could leave only the path with the following value ^/api/vehicles to see all the vehicles deleted in the entered time period.
email: support@digitalcomtech.com
slack: DCT Support Channel
chat: DCT Main Page
developer chat: Gitter
Thank you for Signing Up |
*Entering your email address in this form indicates that you agree to our Privacy Policy. You can withdraw your consent at any time.