Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
-gytis-
Engaged Sweeper

We would like  to generate a hyperlink to an asset page on on-prem system like:

 

 

https://lansweeper.company.local/asset.aspx?AssetID=8717

 

 

while we get asset information through Lansweeper API.
We can't find out the way how to get that AssetID number from Graph API response. Is it possible and how?

Maybe it is possible to generate a hyperlink by using other fields like asset type and serial number?

We are aware that we can get the asset hyperlink redirecting to Lansweeper cloud instance, but we need a hyperlink specifically to on-prem.

1 ACCEPTED SOLUTION
Jacob_H
Lansweeper Employee
Lansweeper Employee

Unfortunately you can't get the assetID - its a different key in cloud/sites vs on-prem.  however, you could use the quicksearch.aspx and querystring as a workaround:  https://yourserver.whatever.local:82/quicksearch.aspx?q=SERIALNUMBERHERE  that will pull up the asset page if there's an asset with the serial number.  you can put whatever you want in that querystring just like you're searching in the search bar for on-prem.  I Hope that helps!

View solution in original post

4 REPLIES 4
Tim_N
Lansweeper Employee
Lansweeper Employee

Hello @-gytis- 

You sample you provided is accurate but is missing the port number. In my sample below, you can see port 82 is being used -- this is the default HTTPS port used by Lansweeper.

https://server.mylab.lab.local:82/asset.aspx?AssetID=496 

See if adding that port number works for you. 

 

Tim N.
Lansweeper Employee
-gytis-
Engaged Sweeper

Hi Tim,

thank you for the response.
However the question was not about accessing the on-prem lansweeper instance, we can access successfully both instances.

We just can't find a way how to generate on-prem url (actually how to get the dynamical part: AssetId), when the asset information is received from Lansweeper API. We are struggling to find assetid value in getAssetResources API response.

Regards
Gytis

Jacob_H
Lansweeper Employee
Lansweeper Employee

Unfortunately you can't get the assetID - its a different key in cloud/sites vs on-prem.  however, you could use the quicksearch.aspx and querystring as a workaround:  https://yourserver.whatever.local:82/quicksearch.aspx?q=SERIALNUMBERHERE  that will pull up the asset page if there's an asset with the serial number.  you can put whatever you want in that querystring just like you're searching in the search bar for on-prem.  I Hope that helps!

Many thanks Jakob! Not exactly what we were looking for, but it is definitely helpful.

General Discussions

Find answers to technical questions about Lansweeper.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now