Our Octopus server is storing more than 700,000 events.
When querying events via the API (I was trying to establish the rate of growth in variablesets), pagination splits that data into more than 23,000 pages of results.
This means that the links collection included in each API response bloats the whole response object by about 20x and must surely add overhead on both the server and client as that payload is processed. Below is a snipped fragment of one such response - the full response is more than 24,000 lines long:
{
"ItemType": "Event",
"IsStale": false,
"TotalResults": 700519,
"ItemsPerPage": 30,
"Items": [
{
"Id": "Events-763335"
...
},
...
...
{
"Id": "Events-763305"
...
},
],
"Links": {
"Self": "/api/events?user=",
"Template": "/api/events{?skip,regarding,regardingAny,user,users,projects,environments,eventGroups,eventCategories,tags,tenants,from,to,internal,fromAutoId,toAutoId}",
"Page.Next": "/api/events?skip=30&user=",
"Page.Current": "/api/events?skip=0&user=",
"Page.0": "/api/events?skip=0&user=",
"Page.1": "/api/events?skip=30&user=",
...
...
...
"Page.23349": "/api/events?skip=700470&user=",
"Page.23350": "/api/events?skip=700500&user="
}
}
Is it possible to prevent the direct page links from being rendered by API - clearly Page.Current
and Page.Next
are very useful and add little overhead but getting links to all the pages really isn’t desirable for large data sets.
Has anyone else come across this?
Thanks,
James.