Azure / Azure/azure-rest-api-specs

API Management - Reports - List By Request- Skip Parameter Not Working

Open
#7,980 1 comment 0 reactions 0 assignees View on GitHub
API Management Service Attention
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 2h
Merged PRs (30d)
424

Description

https://docs.microsoft.com/en-us/rest/api/apimanagement/2019-01-01/reports/listbyrequest

The $skip parameter does not appear to be skipping anything, I keep getting back about 90% of the same records every time. This may have something to do with $orderby not being supported. The records returned seem to be a little different every time, I'm assuming because there is no $orderby. But regardless, we had 202 requests in November but skipping 200, 2000, 20000, keeps returning 100 records when $top=100.

Maybe I am doing something wrong.

```
/resourceGroups/GROUP/providers/Microsoft.ApiManagement/service/SERVICE/reports/byRequest?api-version=2019-01-01&$skip=200&$top=100&$filter=timestamp ge datetime'2019-11-01T00:00:00' and timestamp le datetime'2019-11-30T23:59:59' and userId eq 'XXX' and apiId eq 'AAA' and operationId eq 'OOO'
```

I would expect the above to return only 2 records. Of 202 records in November and we skip 200 taking the top 100, there should only be 2 returned. However, 100 are always returned.

If I use the Swagger style "Try It" page at
https://docs.microsoft.com/en-us/rest/api/apimanagement/2019-01-01/reports/listbyrequest#code-try-0
It seems both the $skip and $top parameters are being ignored there, I'm always getting back 202 records for November regardless of the $skip and $top values.

![image](https://user-images.githubusercontent.com/8837910/70887754-8c235200-1f93-11ea-9c57-7b6f68d0d3e8.png)

Contributor guide

Open the contributing guide

Research direction

Start with the Reports - List By Request REST API documentation and reproduce the endpoint request using the shown $skip, $top, and $filter values. Compare responses for different pagination parameters and determine whether the documented behavior matches the service; done means the pagination behavior or its specification is corrected and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, openapi
Domain
api
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.