Skip to content

Get-NBChangeDiff

Since

v1.3.3

SYNOPSIS

Retrieves Change Diff objects from the Netbox Branching plugin.

SYNTAX

Query (Default)

Get-NBChangeDiff [-All] [-PageSize <Int32>] [-Brief] [-Fields <String[]>] [-Omit <String[]>] [-Branch_Id <UInt64>] [-Object_Type <String>] [-Action <String>] [-Limit <UInt16>] [-Offset <UInt16>] [-Raw] [-ProgressAction <ActionPreference>] [<CommonParameters>]

ById

Get-NBChangeDiff [-All] [-PageSize <Int32>] [-Brief] [-Fields <String[]>] [-Omit <String[]>] [-Id <UInt64[]>] [-Limit <UInt16>] [-Offset <UInt16>] [-Raw] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

Retrieves change diffs that show what modifications exist in a branch. Each diff shows the original data, modified data, and any conflicts.

EXAMPLES

EXAMPLE 1

Get-NBChangeDiff -Branch_Id 1 Get all changes in branch ID 1.

EXAMPLE 2

Get-NBChangeDiff -Branch_Id 1 -Action "create" Get only created objects in branch.

EXAMPLE 3

Get-NBChangeDiff -Branch_Id 1 | Where-Object { $_.conflicts } Get conflicting changes in branch.

PARAMETERS

-All

Retrieve all changes with automatic pagination.

```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:

Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```

-PageSize

Number of items per page when using -All. Default: 100.

```yaml Type: Int32 Parameter Sets: (All) Aliases:

Required: False Position: Named Default value: 100 Accept pipeline input: False Accept wildcard characters: False ```

-Brief

Return a minimal representation of objects (id, url, display, name only). Reduces response size by ~90%. Ideal for dropdowns and reference lists.

```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:

Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```

-Fields

Specify which fields to include in the response. Supports nested field selection (e.g., 'site.name', 'device_type.model').

```yaml Type: String[] Parameter Sets: (All) Aliases:

Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```

-Omit

Specify which fields to exclude from the response. Requires Netbox 4.5.0 or later.

```yaml Type: String[] Parameter Sets: (All) Aliases:

Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```

-Id

The ID of a specific change diff to retrieve.

```yaml Type: UInt64[] Parameter Sets: ById Aliases:

Required: False Position: Named Default value: None Accept pipeline input: True (ByPropertyName) Accept wildcard characters: False ```

-Branch_Id

Filter changes by branch ID.

```yaml Type: UInt64 Parameter Sets: Query Aliases:

Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```

-Object_Type

Filter by object type (e.g., 'dcim.device', 'ipam.ipaddress').

```yaml Type: String Parameter Sets: Query Aliases:

Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```

-Action

Filter by action type: create, update, delete.

```yaml Type: String Parameter Sets: Query Aliases:

Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```

-Limit

Maximum number of results to return.

```yaml Type: UInt16 Parameter Sets: (All) Aliases:

Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```

-Offset

Number of results to skip.

```yaml Type: UInt16 Parameter Sets: (All) Aliases:

Required: False Position: Named Default value: 0 Accept pipeline input: False Accept wildcard characters: False ```

-Raw

Return the raw API response.

```yaml Type: SwitchParameter Parameter Sets: (All) Aliases:

Required: False Position: Named Default value: False Accept pipeline input: False Accept wildcard characters: False ```

-ProgressAction

{{ Fill ProgressAction Description }}

```yaml Type: ActionPreference Parameter Sets: (All) Aliases: proga

Required: False Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False ```

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

[PSCustomObject] Change diff object(s).

NOTES

AddedInVersion: v1.3.3 The -Brief, -Fields, and -Omit parameters are mutually exclusive.

Common parameters

common request params
common pagination params

Get-NBBranch Merge-NBBranch