Planfix API handbook.addRecord

From Planfix
Jump to: navigation, search

Creating a directory entry. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="handbook.addRecord">
    <!-- ... -->
Name Type Value Note
sid string(32) ession key issued as a result of authentication completion int directory identifier
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 field identifier
customData.customValue.value field value (for fields of the type task set, employee list, directory entry set - identifiers separated by commas in square brackets)
files root element containing the list of saved files
file saved file string name of the saved file
file.sourceType enum source type see the list of valid values in file source types, valid values are FILESYSTEM and INTERNET
file.otherFile Use an 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 the file content optional parameter
file.newversion boolean if the value is "1", when the file name matches a previously uploaded one, no error is returned, 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">
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">

Go To