본문으로 바로가기

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

여전히 궁금한 점이 있으신가요?