mirror of
https://github.com/benclaussen/NetboxPS.git
synced 2025-12-13 18:02:29 +00:00
* Update New-NetboxContactAssignment name * Update Get-NetboxAPIDefinition for new path - Add $Format parameter for json or yaml * Move Get-NetboxTag file * Update psproj * Add Set-NetboxContactRole and Assignment functions * Update New-NetboxContactAssignment Content_Type parameter values and validation * Correct variable references in ShouldProcess * Update version to 1.8.5 Fixes #51 --------- Co-authored-by: Ben Claussen <benclaussen@gmail.com>
21 lines
590 B
PowerShell
21 lines
590 B
PowerShell
|
|
function Get-NetboxAPIDefinition {
|
|
[CmdletBinding()]
|
|
param
|
|
(
|
|
[ValidateSet('json', 'yaml', IgnoreCase = $true)]
|
|
[string]$Format = 'json'
|
|
)
|
|
|
|
#$URI = "https://netbox.neonet.org/api/schema/?format=json"
|
|
|
|
$Segments = [System.Collections.ArrayList]::new(@('schema'))
|
|
|
|
$URIComponents = BuildURIComponents -URISegments $Segments -ParametersDictionary @{
|
|
'format' = $Format.ToLower()
|
|
}
|
|
|
|
$URI = BuildNewURI -Segments $URIComponents.Segments -Parameters $URIComponents.Parameters -SkipConnectedCheck
|
|
|
|
InvokeNetboxRequest -URI $URI
|
|
}
|