Reports on API

From Planfix
Revision as of 14:37, 2 February 2024 by Dmitri (talk | contribs)
Jump to: navigation, search

In Planfix, you can create a scheduled report and get its data through the REST API.

Getting data from a scheduled report through the REST API

  • Create a recurring report.
  • Create an authorization token for the employee you plan to send the report to. The saved report data will only be available to the employees you chose to send it to. To create a token, go to Account ManagementAccess to APIREST APICreate a new token:

P9H4r3.jpg

In the field, select the employee who will receive the scheduled report.

  • Get the list of reports through the REST API using the /report/list method and find the ID of the required report in the response (you can find the report ID in the browser address bar):

PD8lks.jpg

  • Get the list of saved versions of the selected report using the /report/{id}/save/list method:

MmPqjk.jpg

  • Get the report data by the ID of the new version using the /report/{id}/save/{saveId}/data method:

5GqS1t.jpg

Important

  • Saved report data is only available to the employees you select to send it to.
  • If the report is large, the version will have several parts (chunks). When getting report data, you must pass the chunk index to get all chunks.

Using the /report/[id]/save/list method, you can determine the number of chunks in the report.


Go To