The built-in REST API interface provides you with a way to visualize RESTful web
services. The API documentation is built using Swagger, where you can test API operations
and instantly view the results to help you scan your applications faster.
About this task
Learn how to use the interactive framework by following this example to import an application
inventory by using the /api/v4/Apps/ImportFile REST API.
Procedure
-
Select .
-
Click the Swagger link on the right side of the page.
You are automatically logged in to Swagger.
-
Create an asset group:
-
Expand the Asset Groups API and click
POST /api/v4/AssetGroups.
-
Replace the
"string"
parameters with a name and
description for the asset group. Keep the quotation marks.
-
Click Execute.
-
Make note of the ID in the Response Body
section; you'll need to use that ID in the next API.
-
Import an application inventory file:
-
Expand the Applications API and click
POST /api/v4/Apps/ImportFile.
In the Implementation section, there is a
sample file that you can download to get a sense of the types of
attributes to include in your file.
-
Enter the assetGroupId from step 3d in the
Value field of the
Parameters section.
-
Click Browse in the
uploadedFile section to locate your CSV file of
applications to import.
-
Click Execute.
A successful import appears as follows: