SAP Knowledge Base Article - Public

3382280 - The OData API response is returning an empty value

Symptom

You are trying to make a query (Get call), and an empty response is returned. For example:

{
"d": {
"results": []
}
}

Environment

  • SAP SuccessFactors HXM Suite
    • OData API

Reproducing the Issue

To reproduce the issue of an empty response in the OData API, follow these steps:

  1. Make an API call with filters that do not match any records in the database.
  2. Verify that the user authenticated in the API does not have permission to access the requested data.


This should result in an empty response as mentioned above.

Cause

There are two main causes for this issue:

  • Missing Record: This happens when the filters applied to the query do not match any records in the database. Verify that the filters are correct and there are matching records.
  • Missing Permission: If the user authenticated in the API does not have permission to access the requested data, the response will also be empty. 

Resolution

To resolve this issue, follow these steps:

  • Check Filters: Ensure that the filters applied to the query are correct and match the data you intend to retrieve.
  • Verify Permissions: Make sure that the user authenticated in the API has the necessary permissions to access the data. Review permission settings and assign the required permissions if necessary.
  • Logs and Debugging: Use logs and debugging tools to trace the source of the problem. This can help identify whether the issue lies with the filters, permissions, or elsewhere.

Keywords

Blank, OData, API, Empty, Response, Missing, Record, Missing, Permission, Query, Filters, Access, Permissions, Troubleshooting , KBA , LOD-SF-INT-ODATA , OData API Framework , Problem

Product

SAP SuccessFactors HCM Suite all versions