Publicado Fri, 30 Nov 2018 03:51:55 GMT por Fabrice Mosca

Hi,

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

Thanks

Publicado Fri, 30 Nov 2018 13:01:59 GMT por Joe Kaufman Bell Laboratories Inc Senior System Architect

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

Publicado Sun, 02 Dec 2018 22:34:23 GMT por Fabrice Mosca

Thanks Joe,

I will take a look on these ressources.

Publicado Fri, 07 Dec 2018 03:39:00 GMT por 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.

 

Publicado Fri, 07 Dec 2018 12:52:30 GMT por Joe Kaufman Bell Laboratories Inc Senior System Architect

Fabrice,

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

 

Thanks,

Joe Kaufman

You must be signed in to post in this forum.