Skip to content

Commit 530a15e

Browse files
bluikkojeremystretch
authored andcommitted
Closes 14655: Document raw text configuration render
Also fix a missing character typo.
1 parent 1235b49 commit 530a15e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/features/configuration-rendering.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ When rendered for a specific NetBox device, the template's `device` variable wil
3939

4040
### Context Data
4141

42-
The objet for which the configuration is being rendered is made available as template context as `device` or `virtualmachine` for devices and virtual machines, respectively. Additionally, NetBox model classes can be accessed by the app or plugin in which they reside. For example:
42+
The object for which the configuration is being rendered is made available as template context as `device` or `virtualmachine` for devices and virtual machines, respectively. Additionally, NetBox model classes can be accessed by the app or plugin in which they reside. For example:
4343

4444
```
4545
There are {{ dcim.Site.objects.count() }} sites.
@@ -70,6 +70,11 @@ This request will trigger resolution of the device's preferred config template i
7070

7171
If no config template has been assigned to any of these three objects, the request will fail.
7272

73+
The configuration can be rendered as JSON or as plaintext by setting the `Accept:` HTTP header. For example:
74+
75+
* `Accept: application/json`
76+
* `Accept: text/plain`
77+
7378
### General Purpose Use
7479

7580
NetBox config templates can also be rendered without being tied to any specific device, using a separate general purpose REST API endpoint. Any data included with a POST request to this endpoint will be passed as context data for the template.

0 commit comments

Comments
 (0)