1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

34 lines
1.3 KiB
Markdown
Raw Normal View History

# Export Templates
2022-08-12 16:00:04 -04:00
Export templates are used to render arbitrary data from a set of NetBox objects. For example, you might want to automatically generate a network monitoring service configuration from a list of device objects. See the [export templates documentation](../../customization/export-templates.md) for more information.
2022-08-11 16:14:06 -04:00
## Fields
2022-08-11 16:14:06 -04:00
### Name
2022-08-11 16:14:06 -04:00
The name of the export template. This will appear in the "export" dropdown list in the NetBox UI.
2022-08-11 16:14:06 -04:00
### Content Type
2022-08-11 16:14:06 -04:00
The type of NetBox object to which the export template applies.
### Data File
Template code may optionally be sourced from a remote [data file](../core/datafile.md), which is synchronized from a remote data source. When designating a data file, there is no need to specify local content for the template: It will be populated automatically from the data file.
2022-08-11 16:14:06 -04:00
### Template Code
2022-08-11 16:14:06 -04:00
Jinja2 template code for rendering the exported data.
2022-08-11 16:14:06 -04:00
### MIME Type
2022-08-11 16:14:06 -04:00
The MIME type to indicate in the response when rendering the export template (optional). Defaults to `text/plain`.
2022-08-11 16:14:06 -04:00
### File Extension
2022-08-11 16:14:06 -04:00
The file extension to append to the file name in the response (optional).
2022-08-11 16:14:06 -04:00
### As Attachment
2022-08-11 16:14:06 -04:00
If selected, the rendered content will be returned as a file attachment, rather than displayed directly in-browser (where supported).