tester22 Posted April 15, 2019 Report Share Posted April 15, 2019 Hi, Based on the documentation is ts not possible to make GET/PUT requests to Hosts. Preferably the hostname would be the input parameter for these requests: # PowerShell Request $PasswordstateURL = 'https://passwordstate/api/hosts/<HostName>' Invoke-Restmethod -Method Put -Uri $PasswordstateURL -Header @{ "APIKey" = "<apikey>" } Link to comment Share on other sites More sharing options...
support Posted April 15, 2019 Report Share Posted April 15, 2019 Hi tester22, You can certainly do GET requests for Host records (your example above is searching by Host Name with a GET request), but we do not have the ability to do PUT (Update) requests at this time. Regards Click Studios Link to comment Share on other sites More sharing options...
tester22 Posted April 15, 2019 Author Report Share Posted April 15, 2019 Great found it now. At first I tried https://passwordstate:9119/api/hosts/<HostName> and I received all hosts. But https://passwordstate:9119/api/hosts/?HostName=<HostName> is working as expected. Thanks Link to comment Share on other sites More sharing options...
support Posted April 15, 2019 Report Share Posted April 15, 2019 Excellent, Glad this is all sorted now:) Regards, Support Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.