mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-15 02:35:46 +00:00
Create function to get tag information
This commit is contained in:
parent
08ec2853db
commit
e40af029cc
2 changed files with 60 additions and 0 deletions
33
Functions/Extras/Get-NetboxTag.ps1
Normal file
33
Functions/Extras/Get-NetboxTag.ps1
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
|
||||
function Get-NetboxTag
|
||||
{
|
||||
[CmdletBinding()]
|
||||
[OutputType([pscustomobject])]
|
||||
param
|
||||
(
|
||||
[uint16]$Limit,
|
||||
|
||||
[uint16]$Offset,
|
||||
|
||||
[Parameter(ValueFromPipelineByPropertyName = $true)]
|
||||
[uint16]$Id,
|
||||
|
||||
[string]$Name,
|
||||
|
||||
[string]$Slug,
|
||||
|
||||
[switch]$Raw
|
||||
)
|
||||
|
||||
process
|
||||
{
|
||||
|
||||
$Segments = [System.Collections.ArrayList]::new(@('extras', 'tags'))
|
||||
|
||||
$URIComponents = BuildURIComponents -URISegments $Segments.Clone() -ParametersDictionary $PSBoundParameters
|
||||
|
||||
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters
|
||||
|
||||
InvokeNetboxRequest -URI $URI -Raw:$Raw
|
||||
}
|
||||
}
|
||||
|
|
@ -1061,6 +1061,33 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Extras",
|
||||
"item": [
|
||||
{
|
||||
"name": "Get Tags",
|
||||
"request": {
|
||||
"method": "GET",
|
||||
"header": [],
|
||||
"url": {
|
||||
"raw": "{{SCHEME}}://{{HOSTNAME}}:{{PORT}}/api/extras/tags/",
|
||||
"protocol": "{{SCHEME}}",
|
||||
"host": [
|
||||
"{{HOSTNAME}}"
|
||||
],
|
||||
"port": "{{PORT}}",
|
||||
"path": [
|
||||
"api",
|
||||
"extras",
|
||||
"tags",
|
||||
""
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Circuits",
|
||||
"item": [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue