メインコンテンツへスキップ

Retrieving DVIR pictures via Geotab SDK

SDavi-1096
オリジナルポスター

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.

image

1件の返信

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.

image

まだ質問がありますか?