Jump to content

Search the Community

Showing results for tags 'webapi'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Essentials
    • Announcements
  • Passwordstate 8.x
    • General Support
    • Feature Requests
    • Feature Requests - Completed
    • Known Issues
    • Installing Passwordstate
  • Knowledge Base
    • General FAQs
    • Password Resets
    • Remote Session Launcher
    • Mobile Client
    • Passwordstate API
    • Browser Extensions
    • Password Reset Portal
  • Passwordstate 7.x
    • General Support
    • Known Issues

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Google Plus Account


Location


Interests


Biography


Location


Interests


Occupation

Found 2 results

  1. Hello, I am unable to create password lists using passwordlists resource via webapi. I am using Powershell: $jsonData = ' { "PasswordList":"TEST LIST", "Description":"TEST" } ' $PasswordstateUrl = 'https://*passwordstate url*/winapi/passwordlists' $result = Invoke-Restmethod -Method Post -Uri $PasswordstateUrl -ContentType "application/json" -Body $jsonData -UseDefaultCredentials $PasswordListID = $result.PasswordListID Obviously I am replacing *passwordstate url* with the correct URL for my environment. Here is the exception I am getting: Invoke-Restmethod : [{"errors":[{"message":"Invalid API Call"},{"phrase":"Error = Object reference not set to an instance of an object."}]}] At line:2 char:15 + ... $result = Invoke-Restmethod -Method Post -Uri $PasswordstateUrl -Co ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand Outputting $error[0].Exception yields: The remote server returned an error: (500) Internal Server Error. My Passwordstate Build is 8501.
  2. Hi, i'm evaluating the usage of passwordstate for the company i'm working for and one of the main criteria is the webapi. I'm connectiong to the api with a python script and i have found three issues that i think could be bugs, and one is a showstopper for us. 1. The searchpasswords function in combination with a passwordlist-id and username seems to be broken Examplecode: headers = { 'APIKey': apiKey } uri = 'https://ourvault.ourtld/api/searchpasswords/'+str(passwordlist['PasswordListID'])+"?username="+user response = requests.get(uri, headers=headers, verify=False) print(uri) print() print(response.status_code) print() print(response.headers) print() print(response.content) Results: URI: https://ourvault.ourtld/api/searchpasswords/26?username=root Returncode: 500 Returnheader: {'Cache-Control': 'no-cache,max-age=0, no-cache, must-revalidate', 'Pragma': 'no-cache,no-cache', 'Content-Length': '120', 'Content-Type': 'text/plain; charset=utf-8', 'Expires': '-1,Thu, 01 Jan 1970 00:00:00 GMT', 'Server': 'Microsoft-IIS/8.5', 'Strict-Transport-Security': 'max-age=31536000', 'X-AspNet-Version': '4.0.30319', 'X-Powered-By': 'ASP.NET', 'X-UA-Compatible': 'IE=edge', 'Date': 'Wed, 29 Aug 2018 09:18:31 GMT'} Returnbody: b'[{"errors":[{"message":"Invalid API Call"},{"phrase":"Error = Object reference not set to an instance of an object."}]}]' api/passwords/26?QueryAll is working fine, so it seems it's the searchpasswords function. 2. Inserting hosts is working, but returns an error Examplecode: data = json.loads(parameters) data['HostName'] = hostname data['HostType'] = "Linux" data['APIKey'] = apiKey print(data) print() uri = 'https://ourvault.ourtld/api/hosts' response = requests.post(uri, data=data, verify=False) print(uri) print() print(response.status_code) print() print(response.headers) print() print(response.content) Results: POSTDATA: {'HostType': 'Linux', 'OperatingSystem': 'Ubuntu', 'RemoteConnectionType': 'SSH', 'RemoteConnectionPortNumber': '22', 'InternalIP': '192.168.1.57', 'MACAddress': '28-C2-DD-E2-52-0E', 'VirtualMachine': 'True', 'VirtualMachineType': 'VMware', 'HostName': 'testhost', 'APIKey': '49d65a2cb83e73f733a8d5f4cb26e94d'} URI: https://ourvault.ourtld/api/hosts Returncode: 500 Returnheader: {'Cache-Control': 'no-cache,max-age=0, no-cache, must-revalidate', 'Pragma': 'no-cache,no-cache', 'Content-Length': '120', 'Content-Type': 'text/plain; charset=utf-8', 'Expires': '-1,Thu, 01 Jan 1970 00:00:00 GMT', 'Server': 'Microsoft-IIS/8.5', 'Strict-Transport-Security': 'max-age=31536000', 'X-AspNet-Version': '4.0.30319', 'X-Powered-By': 'ASP.NET', 'X-UA-Compatible': 'IE=edge', 'Date': 'Wed, 29 Aug 2018 09:30:12 GMT'} Returnbody: b'[{"errors":[{"message":"Invalid API Call"},{"phrase":"Error = Object reference not set to an instance of an object."}]}]' The host is getting inserted correctly, but the expected returnbody is broken. 3. The hostsearch function is broken Examplecode: headers = { 'APIKey': apiKey } uri ='https://ourvault.ourtld/api/hosts?HostName='+hostname response = requests.get(uri, headers=headers, verify=False) print(uri) print() print(response.status_code) print() print(response.headers) print() print(response.content) Results: URI: https://ourvault.ourtld/api/hosts?HostName=testhost Returncode: 500 Returnheader: {'Cache-Control': 'no-cache,max-age=0, no-cache, must-revalidate', 'Pragma': 'no-cache,no-cache', 'Content-Length': '120', 'Content-Type': 'text/plain; charset=utf-8', 'Expires': '-1,Thu, 01 Jan 1970 00:00:00 GMT', 'Server': 'Microsoft-IIS/8.5', 'Strict-Transport-Security': 'max-age=31536000', 'X-AspNet-Version': '4.0.30319', 'X-Powered-By': 'ASP.NET', 'X-UA-Compatible': 'IE=edge', 'Date': 'Wed, 29 Aug 2018 09:21:38 GMT'} Returnbody: b'[{"errors":[{"message":"Invalid API Call"},{"phrase":"Error = Object reference not set to an instance of an object."}]}]' The examplehost "testhost" exists in our passwordstate instance. Also strange is that in the Apidocs, the GET function for hosts is declared as "GET /api/hosts", but all the search examples are for the path "/winapi/hosts/" Other functions like creating folders, passwordlists and passwords are working witout any problems.
×