Planfix API handbook.addRecord

From Planfix
Revision as of 14:27, 13 March 2024 by Dmitri (talk | contribs) (Created page with "Creating a directory entry. Request format: <source lang="xml"> <?xml version="1.0" encoding="UTF-8"?> <request method="handbook.addRecord"> <account></account> <sid></sid> <handbook> <id></id> </handbook> <parentKey></parentKey> <isGroup></isGroup> <name></name> <archived></archived> <customData> <customValue> <id></id> <value></value> <files> <file> <name></name> <sourceType></sourceType>...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Creating a directory entry. Request format:

<?xml version="1.0" encoding="UTF-8"?>
<request method="handbook.addRecord">
  <account></account>
  <sid></sid>
  <handbook>
    <id></id>
  </handbook>
  <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) ession key issued as a result of authentication completion
handbook.id 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
customData.customValue.id 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
file.name 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">
  <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>


Go To