投稿済み Fri, 30 Nov 2018 03:51:55 GMT 、投稿者 Fabrice Mosca

Hi,

did anyone ever use python to launch a request using the REST API ? I need example to achieve that.

Thanks

投稿済み Fri, 30 Nov 2018 13:01:59 GMT 、投稿者 Joe Kaufman Bell Laboratories Inc No longer there

Fabrice,

If you search the support form for "xmlhttp" and "serverxmlhttp" you will see some examples of accessing the API via Visual Foxpro, and others have asked about toolkits like node.js. The full list of entry points (URL resources) to consume via the API can be found here:

http://<your DW server>/DocuWare/Platform/Home/UriTemplatesDocumentation

(online DW documentation appears to not be loading this morning. Grrrr.)

At some point I wish DocuWare would post more generic examples (such as curl), or a Postman package with examples. As far as I know, though, no such pieces of documentation exist at this time. You just need to become familiar with how pythom does GETs and PUTs and POSTs and you should be off to the races.

 

Thanks,

Joe Kaufman

投稿済み Sun, 02 Dec 2018 22:34:23 GMT 、投稿者 Fabrice Mosca

Thanks Joe,

I will take a look on these ressources.

投稿済み Fri, 07 Dec 2018 03:39:00 GMT 、投稿者 Fabrice Mosca

I am now able to connect to DocuWare using that syntax and retrieve metadatas :

url = 'https://MyOrg.docuware.cloud/DocuWare/Platform/Account/LogOn?returnUrl=/...
datalog={'Username':'login', 'Password':'password', 'Organization':'MyOrg'}

r=requests.post(url,datalog)
file=open("response.xml","w+")

file.write(r.text)

Thanks for your help.

 

投稿済み Fri, 07 Dec 2018 12:52:30 GMT 、投稿者 Joe Kaufman Bell Laboratories Inc No longer there

Fabrice,

Glad you got that working! Python makes the coding look easy.  *smile*

 

Thanks,

Joe Kaufman

フォーラムに投稿するためにはログインが必要です。