Follow

Asset Import API

Asset management is one of the biggest challenges of information security and as a matter of fact of information technology. NormShield provides an easy to call API for importing assets for keeping asset inventory in-tact.

Asset Import API

https://nsserver/api/Import/Asset?token=[TOKEN]

Here's an example JSON HTTP POST call with example assets body;

[
  {
    type:"ip", 
    value:"10.10.13.4", 
    hostname:"sophomore.encomp.corp", 
    netbios: "WIN-NT-9426282",
    os: "Microsoft Windows Server 2008 R2 Enterprise", 
    priority: "high", 
    labels:["windows", "tomcat"],
    description: "A free text describing an asset"
  },
  {
    type:"url", 
    value:"https://www.myserver.com/gopro", 
    hostname:"", 
    netbios: "WIN-NV-33116282",
    os: "RedHat 4.5", 
    priority: "high", 
    labels:["linux", "IIS"],
    description: "Another free text describing an asset"
  }
]

The request and JSON parameter names and their explanation are shown in Table 1.

Content-Type HTTP header of the requests should be application/json

Parameter Name

Detail

token

 NormShield authentication token as GUID if connecting NormShield On-Premise version.

type

 One of ip, url, hostname or other [Default to IP]

value

 The value of the asset such as IP address, or URL [REQUIRED field]

hostname

 Host name of the asset [Optional]

netbios

 NETBIOS of the asset [Optional] 

os

 Operating system of the asset [Optional]

priority

 One of; critical, high, medium or low [Default to High]

labels

 One or more labels given to asset [Optional]

description

 A free text asset description [Optional]

Table 1 - The HTTP request and JSON parameter names for asset import API

When successful below response will be returned for each asset created;

Asset was created: 10.10.13.4
Asset was created: https://www.myserver.com/gopro

Otherwise already existing assets will be printed

Asset already exists, here is existing asset id: 153073
Asset already exists, here is existing asset id: 153074
Asset could not be created.

Other error messages are also possible, for example, empty asset values

ERR:Wrong input values
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk