Documents (LP Classic)
This documentation is for LiquidPlanner Classic: app.liquidplanner.com
Uploading Documents
This action is an exception to the general rule that submitted data should be JSON-encoded; multipart/form-data supports a binary 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 create a new document, do a multipart/form-data
POST with parameters:
Parameter | Description |
---|---|
| name of the file, to be used in download links |
| description of the 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 https://app.liquidplanner.com/api/v1/workspaces/:id/tasks/:id/documents \
-F 'document[attached_file][email protected]' \
-F 'document[file_name]=requirements.xls'
Downloading Documents
To download an existing document, do a GET with ‘download’ or ‘thumbnail’ appended, like:
% curl https://app.liquidplanner.com/api/v1/workspaces/:id/tasks/:id/documents/:id/download
% curl https://app.liquidplanner.com/api/v1/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:
Option | Description |
---|---|
| one of "box", "dropbox", or "google drive" |
| the url given by Box, Dropbox, or Google Drive as the shareable url for the document |
| name of the file, to be used in download links |
| description of the file (optional) |
| link to the image preview which is supplied by Dropbox (applies only to, and is required by, Dropbox attachments) |
For example:
% curl https://app.liquidplanner.com/api/v1/workspaces/:id/tasks/:id/documents \
-d '{ "document": { "browse_url": "https://box.com/link/to/file", "file_name": "FileName.doc", "description": "A description", "type" : "box" } }'
Updated 13 days ago