Skip to content

Import-LMDashboard

Syntax

FilePath-GroupName

Terminal window
Import-LMDashboard -FilePath <String> -ParentGroupName <String> [-ReplaceAPITokensOnImport]
[-APIToken <Object>] [-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

FilePath-GroupId

Terminal window
Import-LMDashboard -FilePath <String> -ParentGroupId <String> [-ReplaceAPITokensOnImport] [-APIToken <Object>]
[-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

File-GroupName

Terminal window
Import-LMDashboard -File <String> -ParentGroupName <String> [-ReplaceAPITokensOnImport] [-APIToken <Object>]
[-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

File-GroupId

Terminal window
Import-LMDashboard -File <String> -ParentGroupId <String> [-ReplaceAPITokensOnImport] [-APIToken <Object>]
[-PrivateUserName <String>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

Repo-GroupName

Terminal window
Import-LMDashboard -GithubUserRepo <String> [-GithubAccessToken <String>] -ParentGroupName <String>
[-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

Repo-GroupId

Terminal window
Import-LMDashboard -GithubUserRepo <String> [-GithubAccessToken <String>] -ParentGroupId <String>
[-ReplaceAPITokensOnImport] [-APIToken <Object>] [-PrivateUserName <String>]
[-ProgressAction <ActionPreference>] [<CommonParameters>]

Description

The Import-LMDashboard function allows you to import LogicMonitor dashboards from different sources, such as local files, GitHub repositories, or LogicMonitor dashboard groups. It supports importing dashboards in JSON format.

Examples

Example 1

Terminal window
#Import dashboards from a directory
Import-LMDashboard -FilePath "C:\Dashboards" -ParentGroupId 12345 -ReplaceAPITokensOnImport -APIToken $apiToken

Example 2

Terminal window
#Import dashboards from GitHub
Import-LMDashboard -GithubUserRepo "username/repo" -ParentGroupName "MyDashboards" -ReplaceAPITokensOnImport -APIToken $apiToken

Parameters

-FilePath

Specifies the path to a local file or directory containing the JSON dashboard files to import.

Type: String
Parameter Sets: FilePath-GroupName, FilePath-GroupId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-File

Specifies a single JSON dashboard file to import.

Type: String
Parameter Sets: File-GroupName, File-GroupId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GithubUserRepo

Specifies the GitHub repository (in the format “username/repo”) from which to import JSON dashboard files.

Type: String
Parameter Sets: Repo-GroupName, Repo-GroupId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-GithubAccessToken

Specifies the GitHub access token for authenticated requests. Required for large repositories due to API rate limits.

Type: String
Parameter Sets: Repo-GroupName, Repo-GroupId
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentGroupId

The ID of the parent dashboard group where imported dashboards will be placed.

Type: String
Parameter Sets: FilePath-GroupId, File-GroupId, Repo-GroupId
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ParentGroupName

The name of the parent dashboard group where imported dashboards will be placed.

Type: String
Parameter Sets: FilePath-GroupName, File-GroupName, Repo-GroupName
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ReplaceAPITokensOnImport

Switch to replace API tokens in imported dashboards with a dynamically generated token.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-APIToken

The API token to use when replacing tokens in imported dashboards.

Type: Object
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PrivateUserName

The username of dashboard owner when creating dashboard as private.

Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Fill ProgressAction Description

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

None. You cannot pipe objects to this command.

Outputs

Returns imported dashboard objects.

Notes

You must run Connect-LMAccount before running this command.