Jump to content

Delete password via the API - "The requested resource does not support http method 'DELETE'


mikkijayne

Recommended Posts

Hi all,

 

I'm working with the API in PowerShell and all is going well so far until I try to delete a password. I do a search to get the ID in to the $pwid variable (works fine), and then pass that to the following command (derived from the API documentation):

 

Invoke-Restmethod -Method Delete -Uri "https://password.server.com/winapi/passwords/$pwid?MoveToRecycleBin=false" -ContentType "application/json" -UseDefaultCredentials

 

This gives an error thus:

 

Invoke-Restmethod : [{"errors":[{"message":"Method Not Allowed"},{"phrase":"The requested resource does not support http method 'DELETE'."}]}]

 

I can delete passwords in the UI just fine with this account so I don't think its permissions.

Any suggestions please?

Thanks :)

MJ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...