Hi, I've been working with passwordstate and powershell to create an automated password management script. I've so far been able to create, retrieve, and delete passwords from our server, but am unable to update an existing password. I've been using the following code:
$JSONSTRING = @{
"PasswordID"=$PWD_ID
"PasswordListID"=$PWD_LIST_ID
"GenericField2"="Active"
}
Invoke-Restmethod -Uri "$PASSWORDSTATE_SERVER/api/passwords" -Method PUT -ContentType "application/json" -Header @{"APIKey"=$APIKEY} -Body $JSONSTRING
This syntax works for all the other password methods, but for this method gives me the following error:
"Invalid API call - No compatible API route found, "Please check for valid request URLS, parameters, and http verbs."
To my knowledge, this code should work, as I'm following the tutorial set in the passwordstate api documentation, and again it works for other methods. Does anyone see something I'm missing?
Thanks!