Skip to main content
Solved

exporting the site maps from Netbrain to shared folder

  • November 16, 2022
  • 3 replies
  • 278 views

How to automate exporting the site maps from Netbrain to shared folder

 

Best answer by Carsten.Schmidt

Hi @Mahendra Reddy 

you have two posibilities: you can use a benchmark task or API call.
In the benchmark task, go to Additional operations after Benchmark -> Update Maps and activate Export to Visio.
The use of the API is explained here with sample code in Python and cURL code for Postman:
https://github.com/NetBrainAPI/NetBrain-REST-API-R10/blob/master/REST%20APIs%20Documentation/Map%20Management/Export%20Map%20API.md

Carsten

3 replies

Forum|alt.badge.img+4
  • Brainy
  • 82 replies
  • Answer
  • November 16, 2022

Hi @Mahendra Reddy 

you have two posibilities: you can use a benchmark task or API call.
In the benchmark task, go to Additional operations after Benchmark -> Update Maps and activate Export to Visio.
The use of the API is explained here with sample code in Python and cURL code for Postman:
https://github.com/NetBrainAPI/NetBrain-REST-API-R10/blob/master/REST%20APIs%20Documentation/Map%20Management/Export%20Map%20API.md

Carsten


  • Author
  • New Participant
  • 1 reply
  • November 16, 2022

Hi Carsten, 

Thanks for the quickly reply. 

We tried the first but we couldn't able to export them to shared folder. 


Forum|alt.badge.img+4

Hi

I use a Python script to export all my site maps to a directory. It works like this:
API call to log on to NB to get the token for the next API calls.
API call to set the domain.
API call to get a list of sites.
Start a loop to iterate through the sites, if site type = 2 (leaf site) then call API to export the map as Visio.
I use the loop to log out and log in to NB every 50 maps so as not to run into any timeouts. 
This way, I can export 360 maps in three hours.

Carsten