cancel
Showing results for 
Search instead for 
Did you mean: 

Odata Service $skip vs. $skiptoken

shin861231
Explorer
0 Kudos
243

Hello Experts,

I have checked this blog (https://community.sap.com/t5/technology-blogs-by-members/difference-between-skip-and-skiptoken-in-od...), and understood that the difference between $skip and $skiptoken is as follow.

$skip ->client-controlled paging

$skiptoken -> server-side paging

However, is there any difference when it comes to use-case in the reality?

For example, what I assume now is that maybe one of them would consume more data than the other. (I do not know if this is true.)

 

Could someone kindly advise on this?

 

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

RalfHandl
Product and Topic Expert
Product and Topic Expert

The main difference is that

  • $skip is well-defined: its value is the non-negative number of entities to skip when constructing the result
  • $skiptoken is reserved for service-specific use in server-driven paging

Some known uses of $skiptoken:

  • Contains the last key sent with this page
  • Contains the first key to be sent with the next page
  • Contains a stringified JSON object with enough information for the service to decide where to start the next page

My personal recommendation to service implementors

  • $skiptoken contains encrypted information, with a weekly rotated secret key

The OData specification requires that

OData clients MUST NOT use the system query option $skiptoken when constructing requests.

My advice to client developers:

  • Use $skip for paging, it is documented
  • Don't try to decrypt a specific service's use of $skiptoken
    • It may be different tomorrow
    • It most likely is different for the next service you encounter

Does this answer your question?

shin861231
Explorer
0 Kudos
Yes,thank you!

Answers (0)