Planfix API handbook.updateRecord: Difference between revisions
From Planfix
(Created page with "Modifying a directory entry. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="handbook.updateRecord"> <account></account> <sid></sid> <handbook> <id></id> </handbook> <key></key> <parentKey></parentKey> <isGroup></isGroup> <name></name> <archived></archived> <customData> <customValue> <id></id> <value></value> <files> <file> <name></name> <sourceType></sou...") |
No edit summary |
||
Line 64: | Line 64: | ||
|file.name ||string ||name of the saved file || | |file.name ||string ||name of the saved file || | ||
|- | |- | ||
|file.sourceType | |file.sourceType || enum|| source type || see the list of available values in [[Planfix API file source types|file source types]], available values FILESYSTEM and INTERNET | ||
|- | |- | ||
|file.otherFile || ||Use an already existing file ||used when sourceType: INTERNET | |file.otherFile || ||Use an already existing file ||used when sourceType: INTERNET |
Revision as of 15:09, 13 March 2024
Modifying a directory entry. Request format:
<?xml version="1.0" encoding="UTF-8"?>
<request method="handbook.updateRecord">
<account></account>
<sid></sid>
<handbook>
<id></id>
</handbook>
<key></key>
<parentKey></parentKey>
<isGroup></isGroup>
<name></name>
<archived></archived>
<customData>
<customValue>
<id></id>
<value></value>
<files>
<file>
<name></name>
<sourceType></sourceType>
<otherFile>
<url></url>
</otherFile>
<body></body>
<description></description>
<newversion></newversion>
</file>
</files>
</customValue>
<!-- ... -->
</customData>
<signature></signature>
</request>
Name | Type | Value | Note |
---|---|---|---|
sid | string(32) | session key | issued as a result of authentication completion |
handbook.id | int | directory identifier | |
key | int | entry identifier | in the list of directory entries, it is in theID column |
parentKey | int | entry group identifier | optional parameter |
isGroup | bool | is the entry a group | |
name | string | name, if the entry is a group | |
archived | bool | is the entry archived | |
customData | field values | ||
customData.customValue.id | field identifier | ||
customData.customValue.value | field value | (for fields of type task set, employee list, directory entry set - identifiers separated by commas in square brackets) | |
files | root element containing the list of saved files | For the Files field type | |
file | saved file | ||
file.name | string | name of the saved file | |
file.sourceType | enum | source type | see the list of available values in file source types, available values FILESYSTEM and INTERNET |
file.otherFile | Use an already existing file | used when sourceType: INTERNET | |
file.otherFile.url | string | URL of the file on the Internet | used only when sourceType=INTERNET |
file.body | string | file body encoded in base64 | used when sourceType=FILESYSTEM |
file.description | string | brief description of file contents | optional parameter |
file.newversion | boolean | if the value is "1", when the file name matches a previously uploaded one, no error is issued, but the file is uploaded as a new version of the existing one | optional parameter |
Response when the request is successfully executed:
<?xml version="1.0" encoding="UTF-8"?>
<response status="ok">
<key></key>
</response>
Name | Type | Value | Note |
---|---|---|---|
key | int | record identifier |
Otherwise, a response with an error will be returned:
<?xml version="1.0" encoding="UTF-8"?>
<response status="error">
<code></code>
</response>
Note
Working with a file type field customValue.value - contains a list of identifiers of files previously attached, separated by commas. All previously attached files, the identifiers of which will be missing - will be deleted.