Is it possible to retrieve a picture that was added by a Geotab Drive user when performing a DVIR Asset Inspection via the SDK?
Thanks
Sean
Edited by EishiFUN
Is it possible to retrieve a picture that was added by a Geotab Drive user when performing a DVIR Asset Inspection via the SDK?
Thanks
Sean
You need to be logged in to reply to this post and participate in the Geotab Community discussions.
Yes it is. Unfortunately its location is missing in the SDK (oversight, not purposefully undocumented).
Given a DVIRLog entity for a logged defect with an image, the image id can be found in the dVIRDefects->defectRemarks->mediaFiles[] object containing any {"id": "<media file id>"} objects. It is the mediaFiles object that is missing from the description for the defectRemark object.
With that media file id you would call DownloadMediaFile as shown below to retrieve the data., but methods for the MediaFile itself will behave as described in the Media Files portion of the SDK here. Thus the result will be binary data with a http content-length and content-type headers, but it will not be "a file" until/unless you save it out as such.

Yes it is. Unfortunately its location is missing in the SDK (oversight, not purposefully undocumented).
Given a DVIRLog entity for a logged defect with an image, the image id can be found in the dVIRDefects->defectRemarks->mediaFiles[] object containing any {"id": "<media file id>"} objects. It is the mediaFiles object that is missing from the description for the defectRemark object.
With that media file id you would call DownloadMediaFile as shown below to retrieve the data., but methods for the MediaFile itself will behave as described in the Media Files portion of the SDK here. Thus the result will be binary data with a http content-length and content-type headers, but it will not be "a file" until/unless you save it out as such.
