Jump to content

Recommended Posts

Posted

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
Posted

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

Posted
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.

Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...