I am sending a GET request that returns an object. Using postman, I get:
{
"changedInstance": {
"change": "Created",
"instanceAfterChange": {
"instanceId": "123",
"schemaName": "RBAC",
"className": "PermissionCategory",
"properties": {
"Name": "IModel Schema Management Service",
"TypeId": 2,
"TypeName": "Service Access and Permissions"
}
}
}}
But when I send a request through Powershell, I get the response:
@{change=Created; instanceAfterChange=}
The request I have made:
$Response = Invoke-RestMethod -Uri $base_url/v2.4/Repositories/BentleyCONNECT--Main/RBAC/PermissionCategory -Method Post -Headers @{'Authorization' = 'Bearer ' + $global:token} -Body $postParams -ContentType "application/json"
I have checked all the header values and the body, no values are missing.
The property 'instanceAfterChange' is empty, however when I monitor this same request in fiddler, it shows the correct response. My question is, why is Powershell displaying it as empty even though when it is not.