A REST API call retrieves data from a person.
It works fine but the photo (format = Picture, stored in database) is not returned.
This field is missing in the response.
According to a tip on the forum, DOCDATA should be used in the attribute.
WebResult.Photo=Person.Photo.DOCDATA
But this doesn't work.
How to get the binary data of the picture in the response?
regards
Jannes
No binary data of picture returned in REST-API (SOLVED)
No binary data of picture returned in REST-API (SOLVED)
Last edited by jannes on Thu Sep 09, 2021 9:14 pm, edited 6 times in total.
Re: No picture returned in REST-API
There are like 5 things in this post that don’t make sense.
Sorry, can’t help.
Sorry, can’t help.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.
Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Aware Programming & Consulting - Tampa FL
Re: No picture returned in REST-API
Hi Jaymer,
I changed the text of the post.
I hope it makes more sense now.
regards
Jannes
I changed the text of the post.
I hope it makes more sense now.
regards
Jannes
-
- Posts: 7565
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: No binary data of picture returned in REST-API
1) Are you consuming or exposing a REST service?
2) If you are consuming what are your settings?
3) Can you provide a link to the forum thread with a tip about DOCDATA?
2) If you are consuming what are your settings?
3) Can you provide a link to the forum thread with a tip about DOCDATA?
Aware IM Support Team
Re: No binary data of picture returned in REST-API
1)
Exposing :
https://cloud.f...:8444/AwareIM/REST/PV ... xtern=1155
See complete link in pm
2)
Service "GetPass" :
Process : WebGetPass
[x] Third parties will ..
Service will retun object : WebResult
REST Service Settings
Use default URL
JSON format
Do not encode undefined settings
3)
https://www.awareim.com/forum/viewtopic.php?t=3959
Post by aware_support » Mon Jan 04, 2010 9:45 am
Instead of specifying the name of the attribute, specify the name of the attribute followed by dot and "DOCDATA", for example: AttriibuteName.DOCDATA
This should return the binary data of the picture
Aware IM Support Team
Exposing :
https://cloud.f...:8444/AwareIM/REST/PV ... xtern=1155
See complete link in pm
2)
Service "GetPass" :
Process : WebGetPass
[x] Third parties will ..
Service will retun object : WebResult
REST Service Settings
Use default URL
JSON format
Do not encode undefined settings
3)
https://www.awareim.com/forum/viewtopic.php?t=3959
Post by aware_support » Mon Jan 04, 2010 9:45 am
Instead of specifying the name of the attribute, specify the name of the attribute followed by dot and "DOCDATA", for example: AttriibuteName.DOCDATA
This should return the binary data of the picture
Aware IM Support Team
Re: No binary data of picture returned in REST-API (Solved)
The binary data can be retrieved via :
WebResult.Foto=IMAGE_DATA(Persoon.Foto)
WebResult.Foto must be a (big) PlainText (MEDIUMTEXT)
regards
Jannes
Thnx to Himanshu!
WebResult.Foto=IMAGE_DATA(Persoon.Foto)
WebResult.Foto must be a (big) PlainText (MEDIUMTEXT)
regards
Jannes
Thnx to Himanshu!