Netbox Rest Inventory Task¤
Rest Task Sample Usage¤
NORFAB Netbox GrapQL Command Shell Reference¤
NorFab shell supports these command options for Netbox rest
task:
Python API Reference¤
Method to query Netbox REST API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instance
|
str
|
Netbox instance name |
None
|
method
|
str
|
requests method name e.g. get, post, put etc. |
'get'
|
api
|
str
|
api url to query e.g. "extras" or "dcim/interfaces" etc. |
''
|
kwargs
|
any additional requests method's arguments |
{}
|
Returns:
Type | Description |
---|---|
Union[dict, list]
|
REST API Query result |
Raises:
Type | Description |
---|---|
Exception
|
If REST API query fails |
Source code in norfab\workers\netbox_worker.py
490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 |
|