Create function to get tag information

This commit is contained in:
sheffsix 2023-03-13 17:15:18 +00:00
parent 08ec2853db
commit e40af029cc
2 changed files with 60 additions and 0 deletions

View 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
}
}

View file

@ -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": [