We are trying to query the Sharepoint API. We are using the below query to get the top 5000 and it works.
https://abc.123.org/sites/js/project/_api/web/lists/GetByTitle('S%20Codes')/items?$top=5000
But breaks if we try to get more than 5000 records. We also tried to use the skip in the query parameter to get the next 5000 records and it is not working
https://abc.123.org/sites/js/project/_api/web/lists/GetByTitle('S%20Codes')/items?$skip=5000&$top=5000
How to skip the first set of records and get the next set.