I need to upgrade a category through Power Shell Rest API URL. I am getting 400 bad request instead of getting the proper error. can anyone help me here.
Below is the corresponding code I am using in power shell .ps1 file
$body = @{
category_id =id=@{
{$config.catID.id}
}
}| ConvertTo-Json -Depth 10
$response = Invoke-RestMethod $csURL -Method Put -Headers $headersb -Body $body -ContentType 'application/json'
Below is the JSON config file code:
{
"userName": "abcd",
"password": "abcd@1234",
"otdsURL": "",
"otcsURL": "",
"catID":
{
12345678
},
"folderID": 12345678,
"version": 2,
"ReportID": 12312312
}