---
title: "Lansweeper import"
canonical: "https://help.starhive.com/space/DOC/533266433/Lansweeper%20import"
format: markdown
---
## About

This import allows you to import data from Lansweeper into Starhive so you can enrich your discovered assets with other assets and supporting data like owners, vendors, locations, and compliance controls into a centralised database for more insight.

![Landsweeper tutorial.mp4](media://3fffaf42-62e6-44a4-a782-df213aae1f11)

## Step 1 - setup your Starhive Types

Decide which Lansweeper Asset Types and which fields on those assets you want to import into Starhive. We recommend only bringing in the asset fields you use frequently. You can have a link from Starhive to the asset in Lansweeper for more rarely needed information. 

Once you have decided, you need to build out a Starhive Types to receive your Lansweeper data. You need to:

1. Create Starhive Types for each Lansweeper Asset Type
2. Populate each Starhive Types with attributes that can receive the data stored in the Lansweeper fields
3. Add any additional attributes you might need to your Starhive Types

<u>[Follow these instructions to create Types and Attributes](https://starhive.com/blog/getting-started-with-starhive-database)</u>. 

![Sapce config for Lansweeper import.png](media://741e95cc-60c6-44a6-8bec-418e50375182)

##   
Step 2 - configure your Lansweeper import source

1. In Starhive, go to Imports > Lansweeper
2. Enter a sensible name for your import
3. Find your Lansweeper Data API token by following the instructions here: [https://developer.lansweeper.com/docs/data-api/get-started/quickstart](https://developer.lansweeper.com/docs/data-api/get-started/quickstart)
4. Click ‘Create Source’ and Starhive will scan the schema of your Lansweeper workspace.   
*Note, Starhive will scan the schema each time you edit the source so if you change something in Lansweeper (e.g. adding a new custom field), it will be reflected in Starhive*

## Step 3 - configure your Lansweeper import streams

1. Click ‘create connection’
2. Choose which Lansweeper data stream you want to import
3. Next select which Starhive type you want to import the Lansweeper data stream into
4. Now you need to map Lansweeper fields into the Starhive Type attributes
  1. If you map a Lansweeper field to a Starhive attribute of type Object reference you need to give it a Reference identifier.   
For example, ‘assetCustomer_manufacturer’ will have the value ‘Apple’. This is the value of the ‘Name’ attribute in the Manufacturer object type in Starhive.
  2. Not every Starhive attribute needs a value (unless you configured it to be mandatory). If you do not which to update it from Lansweeper, keep it ‘Not mapped’
  3. If you are importing Lansweeper data into an Object reference attribute in Starhive, you need to set a ‘Reference identifier’ to say which attribute of the referenced object Lansweeper is importing.   
*For example, assetCustom_manufacturer is equal to the Name attributeof the Manufacturer object in Starhive. *
5. When done, click Create Connection
6. Setup all the streams you need in the same way

## Step 4 - run your Lansweeper import


1. Click the sync icon to run your import.
2. The checkboxes decide which streams are imported
3. You can decide to run your import manually or on a schedule. To set a schedule:
  1. Click the three dots in the top right of the Import connection.
  2. Choose ‘Scheduled’ instead of ‘Manual’
  3. Choose your time scale
  4. Click Save. Starhive will now run the import automatically on your chosen schedule


> ℹ️ **Handling relationships between objects imported from Lansweeper**
> ℹ️ 
> ℹ️ Starhive’s integration with Lansweeper will automatically order the import of streams when there are dependencies between the destination Starhive Types.
> ℹ️ 
> ℹ️ For example, if you have OS and Server Types in Starhive that are related to each other by a Reference attribute linking Server objects to an OS object. 
> ℹ️ 
> ℹ️ If these Types are populated by Lansweeper imports, the OS objects need to be imported first so that the Sever objects have something to link to. 
> ℹ️ 
> ℹ️ ![image-20251124-133256.png](media://cb768620-8b78-4624-bbc7-3a2d7b22db7e)

## Error handling and status explanations

If you receive errors on import, [please see the documentation here to debug](https://help.starhive.com/space/DOC/286621697/Import#Error-report).