Tim Posted September 8, 2022 Posted September 8, 2022 Hi All. I see this nice page declaring availability of an API but I can't find any reference page showing me what the calls are or how to use it. https://www.clickstudios.com.au/about/application-programming-interface.aspx I'm not on the Windows platform. Is there a reference, guide, or anything else I can use to fetch and update a password document? Thanks!
support Posted September 8, 2022 Posted September 8, 2022 Hi Tim, You can find the documentation under the Help menu in Passwordstate. Regards Click Studios
Tim Posted September 8, 2022 Author Posted September 8, 2022 Ah, thanks team. I was looking for it on the product website.
Tim Posted September 9, 2022 Author Posted September 9, 2022 One quick follow-up. Since this is not an API reference doc, but example based in powershell, can you help translate this to a curl request or just put the reference doc here? Thx! Quote # PowerShell Request $documentPath = "D:\Build-Specifications.txt" $uri = "https://passwordstate/api/document/password/<PasswordID>?DocumentName=<DocumentName>&DocumentDescription=<DocumentDescription>" $result = Invoke-RestMethod -Uri $uri -Method Post -InFile $documentPath -ContentType 'multipart/form-data' -Header @{ "APIKey" = "<apikey>" } Write-Host $result Would something like this work assuming variables are complete? Is content type mutlipart/form-data required? If so, what should the field name be for the uploaded document? Normally multipart data has a name and value like with curl this would be --form <name=content> URI=https://$PW_HOST/$ENDPOINT/$DOCID?DocumentName=$DOC_NAME&DocumentDescription=$DOC_DESCRIPTION curl -s -H "APIKey: $APIKEY" --data "$PWDOC" $URI
support Posted September 9, 2022 Posted September 9, 2022 Hi Tim, Sorry, but we do not have any experience with curl. Hopefully someone else on the forums will be able to assist you. Regards Click Studios
Tim Posted September 9, 2022 Author Posted September 9, 2022 3 hours ago, support said: Hi Tim, Sorry, but we do not have any experience with curl. Hopefully someone else on the forums will be able to assist you. Regards Click Studios No worries Team. Just wanting the API reference doc that specifies exactly how it works in plain terms not microsoft specific. The powershell examples don't show this.
support Posted September 9, 2022 Posted September 9, 2022 Yes, we certainly understand. Our software is built on a Microsoft platform, which is why we decided to provide the PowerShell examples. We've done a quick Google - does this help you at all - https://stackoverflow.com/questions/12667797/using-curl-to-upload-post-data-with-files Regards Click Studios
Tim Posted September 9, 2022 Author Posted September 9, 2022 I know how POST works. I'm asking about the API reference document for this product. I'll try to figure this out on my own.
support Posted September 11, 2022 Posted September 11, 2022 Okay thanks Tim - we thought the article would help in some way, as it showed mutlipart/form-data was required, as per your original question.
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