This document explains -
- How to perform a query operation using the Odata API entity?
- What is the API response in this case?
- How to retrieve the photo from the API response?
1. Odata API request to fetch the user's photo.
Understanding the Query url:
Entity used - Photo (Odata)
Filter - User id is filtered (where user id = admin)
Select - Photo.
2. Odata API response for the above call.
Please refer to the attachment API response.txt
The binary data for the photo is extracted and attached in the attachments section.
3. How to retrieve the photo back to jpg?
You would require another tool to decode binary data to another format like jpg.
In this document, we have used a third party online tool to perform the decode.
You could use any relevant application/tool to generate the image.
The system stores several images for a single user's profile picture in different sizes to be used in different applications.
For example, thumbnail size images are used in the org chart, quick card and faces page, while larger size images are used in the employee profile.
The different photo types are categorized by the photoType field. You can query for a specified photoType. All photos with the identified photoType for all active users are returned.
To retrieve photos for a given userId but different photoType, you need to specify the userId in the query.
To retrieve a single photo for a given userId and photoType, you need to put both of them into query criteria.
- Photo entity
- How to get photo using API