Hi,
I am trying to query the packages API to do some manual cleaning but i am seeing the same results no matter what “skip” is set to.
This request curl -X GET -H "X-Octopus-ApiKey: REDACTED" "REDACTED/api/packages?latest=False&skip=0&take=30"
Yields this response:
{
"ItemType": "Package",
"IsStale": false,
"TotalResults": 107,
"ItemsPerPage": 30,
"Items": [
{
"Id": "packages-REDACTED-1.9.0",
"NuGetPackageId": "REDACTED",
"Title": null,
"Summary": null,
"NuGetFeedId": null,
"Version": "1.9.0",
"Description": "",
"Published": "Tuesday, February 9, 2016 2:51 PM",
"ReleaseNotes": null,
"PackageSizeBytes": 2146,
"Links": {
"Self": "/api/packages/packages-REDACTED-1.9.0",
"AllVersions": "/api/packages?nuGetPackageId=REDACTED",
"Feed": "/api/feeds/feeds-builtin",
"Raw": "/api/packages/packages-REDACTED-1.9.0/raw"
}
},
...
This request curl -X GET -H "X-Octopus-ApiKey: REDACTED" "REDACTED/api/packages?latest=False&skip=30&take=30"
yields the exact same response:
{
"ItemType": "Package",
"IsStale": false,
"TotalResults": 107,
"ItemsPerPage": 30,
"Items": [
{
"Id": "packages-REDACTED-1.9.0",
"NuGetPackageId": "REDACTED",
"Title": null,
"Summary": null,
"NuGetFeedId": null,
"Version": "1.9.0",
"Description": "",
"Published": "Tuesday, February 9, 2016 2:51 PM",
"ReleaseNotes": null,
"PackageSizeBytes": 2146,
"Links": {
"Self": "/api/packages/packages-REDACTED-1.9.0",
"AllVersions": "/api/packages?nuGetPackageId=REDACTED",
"Feed": "/api/feeds/feeds-builtin",
"Raw": "/api/packages/packages-REDACTED-1.9.0/raw"
}
},
...
In my script, i am following the pagination links in the responses, and those seems to be aware that i am reaching the end of the package list (Page.Next stops appearing), but the data is still the same no matter what skip is set to.
I have tried omitting latest=False
and that does not make a difference.
We are currently on version 3.2.15.
Is this a known bug?
Cheers,
Christian