Netbox Rest Inventory Task¤
task api name:
rest
Rest Task Sample Usage¤
NORFAB Netbox GrapQL Command Shell Reference¤
NorFab shell supports these command options for Netbox rest
task:
Python API Reference¤
Sends a request to the Netbox REST API.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
instance
|
str
|
The instance name to get parameters for. |
None
|
method
|
str
|
The HTTP method to use for the request (e.g., 'get', 'post'). Defaults to "get". |
'get'
|
api
|
str
|
The API endpoint to send the request to. Defaults to "". |
''
|
**kwargs
|
Additional arguments to pass to the request (e.g., params, data, json). |
{}
|
Returns:
Type | Description |
---|---|
Result
|
Union[dict, list]: The JSON response from the API, parsed into a dictionary or list. |
Raises:
Type | Description |
---|---|
HTTPError
|
If the HTTP request returned an unsuccessful status code. |
Source code in norfab\workers\netbox_worker.py
697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 |
|