Using a web-api to retrieve documents uploaded to appian

Hi all,

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:

myappiansitename.appiancloud.com/.../GetDocsForCase

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:

myappiansitename.appiancloud.com/.../MyAttachment Name.PDF

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,

David.

  Discussion posts and replies are publicly visible

Parents
  • 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:

    https://myappiansitename.appiancloud.com/suite/doc/433432

    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]

Reply
  • 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:

    https://myappiansitename.appiancloud.com/suite/doc/433432

    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]

Children