Document toolboxDocument toolbox

Command Line Interface

This pages describes how to use a command line interface with Pathfinder.

By using the Pathfinder Linking-System the user is able to execute pathfinder commands right from a shell to e.g. automate actions like exporting reports or backing up databases.

You can use your API key here to authenticate a script or other process with Pathfinder (e.g. Pathfinder REST API or Shell Commands).

 

 

 


 

Prerequisite

In order to use pathfinder commands please first create an API key. This will allow you to login into pathfinder without the need of using your credentials (username / password) in a shell script.

 


 

Overview of all Supported Types

  • location (campus)

  • building

  • floor

  • room

  • component

  • port

  • networkpath

  • report

  • cable

  • networkmap

  • workorder

  • workorderitem

  • subnet

 


 

Overview of all Supported Commands

Command

Supported Types

Description

Examples

Command

Supported Types

Description

Examples

uid

any

opens the object with the given UID in Pathfinder

pathfinder://uid=CJcZpTXm

open

any

opens the given object in Pathfinder

pathfinder://open?type=networkpath&id=24

pathfinder://open?type=workorder&id=5

search

location, building, floor, room, component, port, networkpath, cable, subnet, workorder

search globally or restrict the scope by adding a type

pathfinder://search?value='Switch'

pathfinder://search?type=component&value='Switch'

export

location, building, floor, room, component (rack), networkpath, networkmap, workorder, report

export a report or a pdf view of an object

pathfinder://export?type=workorder&id=4&out='C:\path\to\file'

pathfinder://export?type=report&id=2&out='C:\path\to\file'

import

 

import a given set of component definitions from the online catalog

pathfinder://import?guid=id1,id2,id3

process/cancel

workorder, workorderitem

process or cancel a work order or work order item

pathfinder://process?type=workorder&id=4

pathfinder://cancel?type=workorderitem&id=6

scan

subnet

scan a subnet

pathfinder://scan?type=subnet&id=11

upgrade

 

check for updates and update

pathfinder://upgrade

backupdb

 

create a local database backup in the data folder. File based databases are not supported.

pathfinder://backupdb?out='pathfinder123.db'

copydb

 

copy the db from source to destination. Source cannot be file based if it is currently used.

pathfinder://copydb?source=1&destination=2


 

Optional Parameters

Parameter

Description

Example

Parameter

Description

Example

token=<token>

Add an API-token to login automatically

pathfinder://open?type=location&id=6&token=<token>

exitWhenDone

exit Pathfinder after executing the command

pathfinder://upgrade&exitWhenDone


 

Executing Commands

There are several ways to execute a command:

  • by opening a link in e.g. a web browser

  • by executing pathfinder.exe -link=<your action> in Windows Command Line

  • by executing start <your pathfinder-link> in Windows PowerShell

     

 


 

Example using the Windows Command Line

pathfinder.exe -link="pathfinder://open?type=location&id=6&token=<token>"

 


 

Example using Windows PowerShell

start "pathfinder://backupdb?out='pathfinder123.db'&token=<token>" Start-Sleep -s 30 start "pathfinder://export?type=report&id=2&out='C:\path\to\file'" Start-Sleep -s 1 start "pathfinder://upgrade&exitWhenDone"

 

It is advised to wait a few seconds after the execution of each command to maintain the correct order, especially after starting and before closing Pathfinder.

 

Example importing some default component definitions

pathfinder://import?guid= {E2CBFCBC-E867-452D-9EAB-3AC98754B748}, {24A0FAD0-7322-4D49-ABB0-E99638E77167}, {660CDE14-B6FD-102C-B795-001D92F3B33C}, {48D2A70B-00DD-4387-9017-4D6FF77681A3}, {0F7A2C46-0CAD-4B2C-A220-E7FE6CB86DF2}, {C2194883-4A03-4C84-87A1-5F72C6FD076C}, {58B12E85-CA48-4111-9384-9F2F9C25C7EA}

 

 

19" Rack 42U, 800x1200 (Server)
19" Rack 42U, 800x800 (Distributor)
Blind Panel 1 U
Blind Panel 2U
Blind Panel 3U
Blind Panel 4U
Cable Management Panel 1U

Example importing Component Definitions

{660C429C-B6FD-102C-B795-001D92F3B33C}

 

Example backing up standard-database to local file

 

 

 

 

Â