API Guide > Convenience Methods > Uploading and Downloading Documents
|
|
Developer Forum - Ask the LiquidPlanner development team questions. Note that the LP iPhone app uses this same API. |
|
API Sample Code – See the API in action then give it a try. |
Enter a search term or try the Dev Forums for more answers.
LiquidPlanner uses a RESTful web service API. You can download the API Guide (PDF) for offline reference. Most actions that you can perform within the application can be automated using the API -- for example, you can create a task, comment on the task, track time against it, and then mark it done.
NEED HELP? Please post API questions in the API forums
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


