I have an external system which needs to retrieve documents that have been uploaded to Appian cases. To do this, I am going to [try to] write a web-api that allows me to retrieve a document from a folder in appian.
I have a folder in an application, and that folder contains a folder for each case, and in each of those case folders are the documents that have been uploaded as part of that case.
To do this, I have used the "Document Download" template in creating a web-api. But having done so, I don't now know how I go about identifying the particular document that I want to retrieve via this web-api.
The basic URL looks like this:
I have tried referencing the document like using the Test pane on the right hand side of the Web-Api development screen by adding the folders to the path:
base Folder/sub Folder/Case Documents/Case Docs-1234/MyAttachment Name.PDF
Which produces a URL like this:
However this just returns a 404 error.
How does one go about specifying a particular document that exists in Appian that one wants to return?
The current Web-Api that I have developed is unchanged from the default template generated by the "Document Download" template.
thanks heaps for any help,
Ok, I figured out [kind'a] how to do this - you have to specify the document's by document number, so the url loooks like this:
Which returns the relevant document. Now I need to write a seperate api to figure out what docs are available [by document number] for any given case...
Also, I need one that gives me a list of cases that are available...
Ok, further to my last reply - I also figured out that a [new] api isn't really needed to get the actual content of the document. You can get it using the url:
where the number at the end of the url is the document number. This will return the document in the http reply. However, it is [now] necessary to find a way to identify what documents are available for each case. For each case, I need the document numbers of each document [what would also be useful is their document (file) name and other meta-data like date they were uploaded - though this isn't 100% necessary]
HI David -
have a look at the Content Tools plugin - this enables fn!getDocumentsFromFolder.
Discussion posts and replies are publicly visible
© 2020 Appian. All rights reserved.