Planfix API file.getListForUser

From Planfix
Revision as of 09:47, 12 March 2024 by Dmitri (talk | contribs) (Created page with "Function to obtain a list of files uploaded by the user. This function is accessible with admin rights to get a list of files for each user or a list of your files. <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="file.getListForUser"> <account></account> <sid></sid> <user> <id></id> </user> <pageCurrent></pageCurrent> <pageSize></pageSize> <signature></signature> </request> </source> {| class="wikitable" style="margin-top: 1e...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Function to obtain a list of files uploaded by the user. This function is accessible with admin rights to get a list of files for each user or a list of your files.

<?xml version="1.0" encoding="UTF-8"?>
<request method="file.getListForUser">
  <account></account>
  <sid></sid>
  <user>
    <id></id>
  </user>
  <pageCurrent></pageCurrent>
  <pageSize></pageSize>
  <signature></signature>
</request>
Name Type Value Note
user.id int user identifier
pageCurrent int current page numbering from 1. 0 - used to get the quantity
pageSize int requested page size
signature string(32) signature

Result of successful function execution:

<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
  <files count="count" totalCount="totalCount">
    <file>
      <id></id>
      <name></name>
      <version></version>
      <description></description>
      <date></date>
      <sourceType></sourceType>
      <size></size>
      <task>
        <id></id>
        <title></title>
      </task>
      <project>
        <id></id>
        <title></title>
      </project>
      <user>
        <id></id>
        <name></name>
      </user>
    </file>
    <file>
      <!-- ... -->
    </file>
    <!-- ... -->
  </files>
</response>
Name Type Value Note
files
files count int number of files returned by the request
files totalCount int number of files satisfying the request
file node describing the file
id int file identifier
name string file name
version int version
description string description
date DateTime file upload date
sourceType enum file types see the list of valid values in file types
size int size in kilobytes
task within which task it was uploaded
task.id int task identifier
task.title string task name
project within which project the file was uploaded
project.id int project identifier
project.title string project name
user user who uploaded the file
user.id int user identifier
user.name string user name


Otherwise, an error response will be returned:

<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
  <code></code>
</response>


Перейти