https://learn.microsoft.com/api/catalog type filtering issue

Grzegorz Orda 66 Reputation points
2023-05-08T13:54:53.6066667+00:00

It seems that the filters on the endpoint behave in a strange way - depending on the order of filtering the user gets the answer correct or with errors.

Changing position of module in type filter

example of good response:

https://learn.microsoft.com/api/catalog?locale=fr-BE&type=roles,modules,products,levels,learningPaths
User's image

example of using filtering with corrupted json in response:

https://learn.microsoft.com/api/catalog?locale=fr-BE&type=modules,roles,products,levels,learningPaths

User's image

The error occurs for different languages as well as downloadable items.

Is there any way to make it work stably where this strange behavior can be sent for verification?

Unfortunately, I do not find the right tag to properly attribute this error. please move to the appropriate section.

Developer technologies | .NET | Other
Microsoft Security | Microsoft Graph
{count} votes

Accepted answer
  1. Antonio 250 Reputation points Microsoft External Staff
    2023-05-12T16:27:45.66+00:00

    Hi Grzegorz Orda,

    Thanks for posting in the Q&A forum.

    As mentioned, downloading the list via PowerShell creates a list that is exactly the same regardless of the order. (See below)

    Invoke-RestMethod -Uri "https://learn.microsoft.com/api/catalog?locale=en-US&type=roles,modules,products,levels,learningPaths" -OutFile test1.txt Invoke-RestMethod -Uri "https://learn.microsoft.com/api/catalog?locale=en-US&type=modules,roles,products,levels,learningPaths" -OutFile test2.txt compare-object $(Get-Content test1.txt) $(Get-content test2.txt)

    As such, create a file from the Uri and read the file to populate variable list in ASP.NET code.

    Otherwise, if still occurring it could be an issue with the parser (JsonConvert.DeserializeObject) for non-English languages.

    Please post feedback in the SDK issues for .NET or GitHub Opensource Creator


    Please don't forget to upvote and Accept as answer if the reply is helpful


1 additional answer

Sort by: Most helpful
  1. Grzegorz Orda 66 Reputation points
    2023-05-16T09:06:56.63+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.