Follow

Uploading and Downloading Documents

To create a new document, do a multipart/form-data POST with parameters:

document[file_name]
name of the file, to be used in download links
document[description]
description of the file
document[attached_file]
file data (as from a file upload control in an HTML form)

An example, assuming you have a file ‘requirements.xls’ to upload:

% curl http://app.liquidplanner.com/api/workspaces/:id/tasks/:id/documents \
-F 'document[attached_file]=@requirements.xls' -F 'document[file_name]=requirements.xls'

This action is an exception to the general rule that submitted data should be JSON-encoded; multipart/form-data supports a binary or raw encoding, and is therefore more efficient on both network and CPU than submitting the attached_file as e.g. a Base64 encoded string in JSON.

To download an existing document, do a GET with ‘download’ or ‘thumbnail’ appended, like:

% curl https://app.liquidplanner.com/api/workspaces/:id/tasks/:id/documents/:id/download
% curl https://app.liquidplanner.com/api/workspaces/:id/tasks/:id/documents/:id/thumbnail

You can also attach links to Box, DropBox, and Google Drive documents using a json POST with a document parameter:

It contains the following options:

type
            one of “box”, “dropbox” or “google drive”

browse_url
            the url given by Box, DropBox, or Google Drive as the sharable url for the document.

file_name

           name of the file, to be used in download links

description (optional)

           description of the file

icon_url ( applies only to – and is required by - DropBox attachments )

            link to the image preview which is supplied by DropBox

For example:

% curl https://app.liquidplanner.com/api/workspaces/:id/tasks/:id/documents \
       -d '{ "document": { "browse_url": "https://box.com/link/to/file", "file_name": "FileName.doc",
"description": "A description", "type" : "box"  } }'
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request
Powered by Zendesk