API - Get a File
action - readfile
An existing file in PYXI can be retrieved if its record ID is known. This would be typically from having saved this ID following an Add File call, or using the record id in a file list in e.g. a complete record read.
Assuming the file ID is valid, the file content is returned as a binary string, NOT as JSON. Only if there is an error will the response be the usual JSON format, with success false and an errormsg.
Sample Request
Sample Response
Note that the response does not provide the file name or confirm the media type of the content. It is for the API caller to first determine the file type e.g. from previous knowledge of the file content or name, and to determine the file name to be presented through any UI or download mechanism.
Other API Help Pages
Introduction
IntroductionActions
Read 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 Persistent Setting 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 ExpressionDiscussion Topics
Linking Records | Automation - Automations and EventsReturn to Developer Help