Status codes and response bodies are 2 completely different things. Status code indicates the general successfulness of the request. If there is any data to return then the response body has that. It is perfectly legal, and common, to return success (200) with no data. Generally it is preferred that you use 204 (no content) but it is not at all required.
Please confirm that your API actually returns data for the request you're sending by using a tool like Postman or curl. If you can share with us your PS code that would be great. PS can call APIs several different ways and it makes assumptions depending on what you're using. For example the Invoke-RestMethod
assumes a REST API and, I believe, JSON response. It converts the response, if any, to a typed-object based upon the JSON. However if you use Invoke-WebRequest
then you can call anything and it returns the raw response that you then have to reach into to get the data. Please provide us the PS call you're using along with the expected response (from Postman or similar) and what you're actually getting in PS.