Skip to Content
avatar image
Former Member

Can the output of a REST service be simplified?

We have a REST service:

http://mysap.dummy.com:8000/sap/opu/odata/sap/ZFRAG_LIBRARY_SRV/FragranceLibrarys(Material='30121790')?$expand=FragLibrary,VATChar,Value&$format=json

The output of this service is quite large. There seems to be some additional data generated which we don't need and rather don't want to see.

Especially the URI that is repeated every time. Is there an option that does not show this data?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 06, 2015 at 04:53 AM

    Hello Paul,

    Here are some thoughts on your requirement

    1. In general you can make use of $select, $filter, $top , $skip to limit the data volume in OData

    2. Other than that you can not do anything major to control teh data volume.

    3. You are right, the URIs are another reason for making the response heavy. So in OData V4, these URIs will be dropped. But For now in V2, it comes by default .

    Regards,

    Atanu

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jul 02, 2015 at 08:37 AM

    Hello Paul,

    By default we cant restrict the way response comes from GW with all those details. Response will be encapsulated that way and we do not have any control in trimming of those from GW Level.

    Regards,

    Ashwin

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 05, 2015 at 06:58 AM

    Hi Paul,

    You cannot control those. Only thing you can control is the amount of data that is selected in the GET_EXPANDEDENTITY and GET_EXPANDEDENTITYSET method.

    Regards

    Arshad

    Add comment
    10|10000 characters needed characters exceeded