C3 AI Console Reference: c3DL
Download the argument object as a file.
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
content | Type, Type instance, or object | Mandatory | The Type or object to download |
contentType | string | Optional | The media type |
filename | string | Optional | The name of the file to download |
Examples
Download the list of smart bulbs persisted in the database:
JavaScript
// Downloads a file named 'smartbulb.json'
c3DL(SmartBulb.fetch(), "application/json", "smartbulb.json")