mirror of
https://github.com/netbox-community/netbox.git
synced 2025-09-06 14:23:36 -06:00
Add note about namespacing webhook data
This commit is contained in:
parent
fb9f053257
commit
c9067ec4bb
@ -43,6 +43,18 @@ The resulting webhook payload will look like the following:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
!!! note "Consider namespacing webhook data"
|
||||||
|
The data returned from all webhook callbacks will be compiled into a single `context` dictionary. Any existing keys within this dictionary will be overwritten by subsequent callbacks which include those keys. To avoid collisions with webhook data provided by other plugins, consider namespacing your plugin's data within a nested dictionary as such:
|
||||||
|
|
||||||
|
```python
|
||||||
|
return {
|
||||||
|
'my_plugin': {
|
||||||
|
'foo': 123,
|
||||||
|
'bar': 456,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
### Callback Function Arguments
|
### Callback Function Arguments
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
|
Loading…
Reference in New Issue
Block a user