API – Add a File
action – addfile
Files of almost any sort can be stored against a record. The API call to add a file requires that the file be presented as a base64-encoded data URI e.g. ‘data://;base64,[encoded data]’ where [encoded data] is a base64-encode of the binary contents of the file. This syntax is chosen as it allows for any binary file content to be uploaded to PYXI using a standard JSON API call, rather than introducing a more complex mechanism to reliably receive binary data.
The resulting file will be created in the ‘root’ file directory of the record specified, or alternatively in a sub-folder of the root if ‘folder’ is specified as an alpha-numeric folder name. Please note that multi-level nested sub-folders are not supported by this call.
The record id of the file is returned in recordid.
Other API Help Pages
ActionsRead a Record | Update a Record | Add a Record | List Records | Evaluate a Template | Execute an Action Script | Apply a Blueprint | Get a Blueprint | Add a File | Get a File | Get/Set a Config Value | Get Category Values | Get Group Memberships of a User | Get Members of a Group | Load Data | Get Metadata for a Record Type | Get Metadata on Calculation Functions | Trigger an Event | Get Usage Statistics | Validate a Calculation | Validate a Filter Expression
Discussion TopicsLinking Records | Automation – Rules and Events
Return to Developer Help