Files

This documentation is for LiquidPlanner New: next.liquidplanner.com

Use this endpoint to upload and manage Files on plan items (Package, Project, Sub Folder, Task). Learn more about this feature in our documentation here: Upload Files

Upload a single file per API request with a 100 MB size limit for each uploaded file.

https://next.liquidplanner.com/api/workspaces/<workspace id>/items/v1/<item id>/files/

Supported Methods

POST (upload file)

To upload a file to a plan item (Package, Project, Sub Folder, Task), send a multipart/form-data POST request.

πŸ“˜

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.

curl --request POST \
  --url https://next.liquidplanner.com/api/workspaces/<workspace id>/items/v1/<item id>/files/ \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer <API Token>' \
  --header 'content-type: multipart/form-data' \
  --form [email protected]

POST (move file)

Move a file from one plan item to another using a POST request.

curl --location --request POST https://next.liquidplanner.com/api/workspaces/<workspace id>/items/v1/<item id>/files/<file id>/move
--header 'Authorization: Bearer <API Token>' \
--header 'Content-Type: application/json' \
--data-raw '{

    "destinationItemId": <id of the destination plan item>
}'

GET (download file)

Download a single file at a time from a given plan item.

curl --location --request GET 'https://next.liquidplanner.com/api/workspaces/<workspace id>/items/v1/<item id>/files/<file id>/download' \
--header 'Authorization: Bearer <API Token>' \

GET (pull a list of files from an item in JSON format)

Send a GET request to pull a list of files that have been uploaded on a plan item.

curl --location --request GET 'https://next.liquidplanner.com/api/workspaces/<workspace id>/items/v1/<item id>/files' \
--header 'Authorization: Bearer <API Token>' \

Sample Response

{
  "recordLimit": 500,
  "recordCount": 1,
  "data": [
    {
      "id": 57763,
      "fileName": "SampleImageFile.png",
      "fileSizeInBytes": 8862,
      "fileUuid": "70cba0a6-0ce0-4897-9021-43d5b39d7d4f",
      "itemId": 493701,
      "createdAt": "2023-05-02T05:11:13.45856Z",
      "updatedAt": "2023-05-02T05:11:13.581Z",
      "createdById": 185,
      "updatedById": 185
    }
  ]
}

Filter Options

Apply the filter string to the endpoint URL. The filter options listed below can be used when pulling a list of files from a plan item.

Filter attributeField typeDescriptionFilter stringNote
fileNamestringPull a list of files from a plan item, filtered by file name?fileName[starts_with]=”Sample”Encode operator and value
idnumberPull a specific file from a plan item by its File ID?id[is]=”57046”Encode operator and value

DELETE

Send a DELETE request with the file id to delete the specified file from the plan item.

🚧

Once a file is deleted from the plan item, it cannot be recovered.

curl --location --request DELETE 'https://next.liquidplanner.com/api/workspaces/<workspace id>/items/v1/<item id>/files/<file id> \
--header 'Authorization: Bearer <API Token>' \
--header 'Content-Type: application/json' \
--data-raw ' '