Working on the API and I am able to get data, delete users, but when I attempt to update data via the PUT method it comes back with a 404 error...the json body looks good
{
"user": {
"group": "dummygroup"
}
}
but I am doing this with invoke-webrequest with powershell (which I am able to do with other JSON sites and also snag data above)
$pair = "$($apikey):$($pass)"
$bytes = [System.Text.Encoding]::ASCII.GetBytes($pair)
$base64 = [System.Convert]::ToBase64String($bytes)
$basicAuthValue = "Basic $base64"
$headers = @{'Authorization'=$basicAuthValue}
$Website = "https://serverFQDN/admin/users/$userID" (which is legit info from the array, works for grabbing data)
$UpdateGroup = [ordered]@{
"user"=[ordered]@{
"group"="dummygroup";
}
}
$UpdateGroup = $UpdateGroup | ConvertTo-Json
Invoke-WebRequest -Uri $TempWebsite -Headers $headers -Body $UpdateGroup -ContentType 'application/json' -Method put
thoughts????
{
"user": {
"group": "dummygroup"
}
}
but I am doing this with invoke-webrequest with powershell (which I am able to do with other JSON sites and also snag data above)
$pair = "$($apikey):$($pass)"
$bytes = [System.Text.Encoding]::ASCII.GetBytes($pair)
$base64 = [System.Convert]::ToBase64String($bytes)
$basicAuthValue = "Basic $base64"
$headers = @{'Authorization'=$basicAuthValue}
$Website = "https://serverFQDN/admin/users/$userID" (which is legit info from the array, works for grabbing data)
$UpdateGroup = [ordered]@{
"user"=[ordered]@{
"group"="dummygroup";
}
}
$UpdateGroup = $UpdateGroup | ConvertTo-Json
Invoke-WebRequest -Uri $TempWebsite -Headers $headers -Body $UpdateGroup -ContentType 'application/json' -Method put
thoughts????