PowerShellGallery icon indicating copy to clipboard operation
PowerShellGallery copied to clipboard

API - Get with `$select=Owners` returns "an error has occurred"

Open o-l-a-v opened this issue 1 year ago • 1 comments

Prerequisites

  • [X] Write a descriptive title.
  • [X] Make sure you are able to repro it on the latest version
  • [X] Search the existing issues.

Steps to reproduce

To reduce load on PSGallery and increase speed I'd like to use $select to only request the properties I need.

This works for properties like Id, Version and Authors. But not for Owners for some reason.

URL with all properties:

  • https://www.powershellgallery.com/api/v2/Packages()?$filter=startswith(Id,%27Az.%27)%20and%20IsLatestVersion%20and%20not%20IsPrerelease&$orderby=Id%20asc

URL with Id and Version (works):

  • https://www.powershellgallery.com/api/v2/Packages()?$filter=startswith(Id,%27Az.%27)%20and%20IsLatestVersion%20and%20not%20IsPrerelease&$select=Id,Version&$orderby=Id%20asc

URL with Id, Version and Owners (does not work):

  • https://www.powershellgallery.com/api/v2/Packages()?$filter=startswith(Id,%27Az.%27)%20and%20IsLatestVersion%20and%20not%20IsPrerelease&$select=Id,Version,Owners&$orderby=Id%20asc

Expected behavior

All properties should be possible to $select

Actual behavior

$select=Owners does not work

Error details

No response

Environment data

Not relevant: API.

Version

Not relevant: API.

Visuals

No response

o-l-a-v avatar Mar 24 '24 10:03 o-l-a-v