Jump to content

jcoughlan

Members
  • Content count

    8
  • Joined

  • Last visited

  1. Can't Delete a password with WebApi

    Thank you, yes spelling "MoveToRecycleBin" properly would probably help me in my future code. Thank you for catching that, although it wasn't the problem. The first example you gave me does work, although I'm not entirely sure why it does over the previous method you suggested. Thank you for your help!
  2. Can't Delete a password with WebApi

    Hi, I have tried out the solution you have suggested as shown below, but I'm afraid it still invokes the same error. $DEL_HEADER = @{ "APIKey"=$APIKEY } $API_URL = "$PASSWORDSTATE_SERVER/api/passwords/$ID_No?MoveToRecyleBin=True" Invoke-Restmethod -Method DELETE -Uri $API_URL -Header $DEL_HEADER
  3. Can't Delete a password with WebApi

    Hello, I'm having the same issue as Paul above, only the solution you gave him does not work for me. I'm using version 7086 at our office with Powershell. The code I'm using to delete a password is as follows: Invoke-Restmothod : [{"errors":[{"Messsage":"Invalid API call"}, {"Phrase":"Error = Object reference not set to an instance of an object."}]}] This follows the same logic I I've been using to create new passwords, along side what is on the API. However, running this the result: Invoke-Restmothod : [{"errors":[{"Messsage":"Invalid API call"}, {"Phrase":"Error = Object reference not set to an instance of an object."}]}]
  4. Updating Password in Powershell Issue

    Thank you for your help, hopefully that will fix things.
  5. Updating Password in Powershell Issue

    We are using build 7086. I'm afraid I cannot organize a remote desktop session as this is a company machine with a lot of sensitive data on it.
  6. Updating Password in Powershell Issue

    I'm afraid that has also done nothing to change the issue.
  7. Updating Password in Powershell Issue

    Hi, I have tried removing the PasswordListID from the field, but it did not change the result. Same error has ocurred
  8. 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!
×