PowerShell - Invoke-RestMethod return partial response

43 Views Asked by At

I'm running a GET Rest request using PowerShell Invoke-RestMethod command. When trying to run the same API on a browser, I'm getting a full JSON file with full content. But when running using PowerShell Invoke-RestMethod, some parameters are not full. Instead I see: System.Object[]. For Example:

"process":  {
                    "phases":  [
                                   "@{steps=System.Object[]; name=Agent job 1; refName=Job_1;

What I'm expecting to get is:

"process": {
        "phases": [
            {
                "steps": [
                    {
                        "environment": {},
                        "enabled": true,
                        "continueOnError": false,
                        "alwaysRun": false,

Does any one have an idea how to overcome this PowerShell limitation?

Thanks, Shai.

0

There are 0 best solutions below