Tyrone Posted March 15, 2023 Share Posted March 15, 2023 Hi All, I am trying to find a way to use the Password Retrieval API to only fetch the Password for the corresponding entry without fetching/displaying any of the extra information. The point is to use the retrieved password in a script that needs to use the fetched password. Does anyone have a way/any suggestions on how to achieve this using the API? Thanks in advance for taking a look at this request. Link to comment Share on other sites More sharing options...
Sarge Posted March 16, 2023 Share Posted March 16, 2023 # PowerShell Request $PasswordstateUrl = 'https://passwordstate/api/passwords/<PasswordID>' Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Header @{ "APIKey" = "<apikey>" } By default this will return all data associated with the password record. You can do this instead to select only the password. $GetPassword = Invoke-Restmethod -Method GET -Uri $PasswordstateUrl -Header @{ "APIKey" = "<apikey>" } $Password = $GetPassword.Password.ToString() Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now