REST API: Working with files: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
Line 9: Line 9:
*[[#Attach and update |Attach and update]]
*[[#Attach and update |Attach and update]]
*[[#Get a list of files |Get list of files]]
*[[#Get a list of files |Get list of files]]
== Attach and update ==
== Attach and update ==
You can use the API to attach or update files that you have previously uploaded:
You can use the API to attach or update files that you have previously uploaded:
Line 16: Line 15:
*[[#Projects|Projects]]
*[[#Projects|Projects]]


=== Task ===
=== '''Task''' ===
*Files are only attached or updated in the task description.
*Files are only attached or updated in the task description.
*Attach files to the description when creating a task:
*Attach files to the description when creating a task:
Line 46: Line 45:
*If the files field is not passed, files are not updated.
*If the files field is not passed, files are not updated.


=== Project ===
=== '''Project''' ===
*Files are only attached or updated in project documents.
*Files are only attached or updated in project documents.
*Attach files during project creation:
*Attach files during project creation:
Line 67: Line 66:
*[[#Project|Project]]
*[[#Project|Project]]


=== Task ===
=== '''Task''' ===
The method has a parameter onlyFromDescription, which allows you to retrieve files only from the task description:
The method has a parameter onlyFromDescription, which allows you to retrieve files only from the task description:


https://p.pfx.so/pf/tu/IpVMnG.png
https://p.pfx.so/pf/tu/IpVMnG.png


=== Contact ===
=== '''Contact''' ===
The method has an onlyFromDescription parameter, which you can use to retrieve files from the contact description only:
The method has an onlyFromDescription parameter, which you can use to retrieve files from the contact description only:


https://p.pfx.so/pf/eh/PlMgOD.png
https://p.pfx.so/pf/eh/PlMgOD.png


=== Project ===
=== '''Project''' ===


The method has the parameters pageSize and offset for page navigation through the list:
The method has the parameters pageSize and offset for page navigation through the list:


https://p.pfx.so/pf/oa/EmFu1e.png
https://p.pfx.so/pf/oa/EmFu1e.png


== Go to ==
== Go to ==
*[[REST API]]
*[[REST API]]
*[[API]]
*[[API]]

Revision as of 13:27, 3 December 2025

The REST API of Planfix supports working with files

Attach and update

You can use the API to attach or update files that you have previously uploaded:

Task

  • Files are only attached or updated in the task description.
  • Attach files to the description when creating a task:

8jd89h.png

  • Update files in the task description:

dTxTaM.png

Important:

  • Files are replaced with those passed in the files parameter.
  • If an empty field is passed, files are detached from the task and deleted if not used elsewhere.
  • If the files field is not passed, files are not updated.

Contact

  • Files are only attached or updated in the contact description.
  • Attach files to the description when creating a contact:

zRF6IB.png

  • Update files in the contact description:

dejkxz.png

Important:

  • Files are replaced with those passed in the files parameter.
  • If an empty field is passed, files are detached from the contact and deleted if not used elsewhere.
  • If the files field is not passed, files are not updated.

Project

  • Files are only attached or updated in project documents.
  • Attach files during project creation:

EKGUPU.png

  • Update files in the project:

fsElGe.png

Important:

  • Files are replaced with those passed in the files parameter.
  • If an empty field is passed, the files are removed from the project and deleted if not used elsewhere.
  • If the files field is not transferred, the files are not updated.

Get a list of files

You can obtain a list of files via API:

Task

The method has a parameter onlyFromDescription, which allows you to retrieve files only from the task description:

IpVMnG.png

Contact

The method has an onlyFromDescription parameter, which you can use to retrieve files from the contact description only:

PlMgOD.png

Project

The method has the parameters pageSize and offset for page navigation through the list:

EmFu1e.png


Go to