Planfix API file.getListForProject: Difference between revisions
From Planfix
(Created page with "This is a function for obtaining a list of files for projects. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="file.getListForProject"> <account></account> <sid></sid> <project> <id></id> </project> <pageCurrent></pageCurrent> <pageSize></pageSize> <returnDownloadLinks></returnDownloadLinks> <signature></signature> </request> </source> {| class="wikitable" style="margin-top: 1em; width:100% " !width="150"||N...") |
No edit summary |
||
Line 15: | Line 15: | ||
</source> | </source> | ||
{| class="wikitable" style="margin-top: 1em; width:100% " | {| class="wikitable" style="margin-top: 1em; width:100% " | ||
!width="150" | !width="150"|Name !!width="200"| Type !!width="50%"| Note !! Value | ||
|- | |- | ||
|project.id ||int ||project identifier || | |project.id ||int ||project identifier || |
Latest revision as of 08:30, 12 March 2024
This is a function for obtaining a list of files for projects. Request format:
<?xml version="1.0" encoding="UTF-8"?>
<request method="file.getListForProject">
<account></account>
<sid></sid>
<project>
<id></id>
</project>
<pageCurrent></pageCurrent>
<pageSize></pageSize>
<returnDownloadLinks></returnDownloadLinks>
<signature></signature>
</request>
Name | Type | Note | Value |
---|---|---|---|
project.id | int | project identifier | |
pageCurrent | int | current page | numbering starts from 1. 0 - used to get the quantity |
pageSize | int | размер requested page size | |
returnDownloadLinks | bool | whether to return permanent download links in the response | default value is 0 |
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>
<downloadLink></downloadLink>
</file>
<file>
<!-- ... -->
</file>
<!-- ... -->
</files>
</response>
Name | Type | Note | Value |
---|---|---|---|
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 acceptable 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 | |
downloadLink | string | download link for the file |
Otherwise, an error response will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
<code></code>
</response>