SAP Knowledge Base Article - Public

2283730 - How to query original photo size using OData API "Photo" object

Symptom

When querying Odata API "Photo" object, the size of the photo comes back as 180*240 pixel when the image was uploaded/upserted was in a larger format.

Environment

SAP Successfactors

Cause

Photo size in Bizx system is controlled by a fixed number of variations.

For user uploaded photo, the  system will resize them to not exceed the max size 180*240.

Resolution

The system stores the original photo uploaded with photo type equal to 20.

When querying, you need to query and specify "phototype" = 20.

 

Example Query:

<<<Successfactors API URL >>>/odata/v2/Photo?$format=json&$top=5&$select=height,lastModified,photoName,photoType&$filter=photoType eq 20

Example: https://apisalesdemo4.successfactors.com/odata/v2/Photo?$format=json&$top=5&$select=height,lastModified,photoName,photoType&$filter=photoType eq 20

 

Example Response: 

{
"d" : {
"results" : [
{
"__metadata" : {
"uri" : "https://apisalesdemo4.successfactors.com:443/odata/v2/Photo(photoType=20,userId='00009861')", "type" : "SFOData.Photo"
}, "photoType" : 20, "height" : 580, "lastModified" : "\/Date(1436532722000)\/", "photoName" : null
}
]
}
}

Keywords

Photo, pixel size, pixel, OData API, Photo Type , KBA , LOD-SF-INT , SF Integrations - EC Payroll, Boomi/ HCI, API , Problem

Product

SAP SuccessFactors HCM Suite all versions