cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ODATA API Consumption SAP Datasphere - API filtering issue

Laxmi5
Explorer
0 Kudos
920

Hi All,

 

I am using GET method to bring data from Datasphere relational dataset. I want to filter the data based on fiscal year. When i do that in the HTTP request in Postman. It returns with below error. 

Laxmi5_0-1712852051004.png

Can you please guide if the syntax being used correct for filtering the data is correct? I have used SAP API documentation

Laxmi5_1-1712852166952.png

Link to API reference: https://api.sap.com/api/DatasphereConsumption/path/getRelationalData

Thanks, 
Laxmi

Accepted Solutions (0)

Answers (3)

Answers (3)

Simon_Ye
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Please try to replace the space on either side of 'eq' with '%20', the new filter as below:

FiscalYear%20eq%202022

Regards,

Simon

Dinu
Active Contributor
0 Kudos

I am not familiar with this service. But, in general with oData, FiscalYear is probably modeled as a String. So you have to put single quotes around it in $filter. Verify how Fiscal year appears in the result or check $metadata to ascertain its datatype. 

Laxmi5
Explorer
0 Kudos

Hi Ryan, 

Thanks, I am using below API call and it is working. I want to extend it to filter using FiscalYear column and value = 2022

Laxmi5_0-1712854023370.png