Skip to content

Import Tags via API

Using vScope’s API for importing tags or IP targets is an advanced feature. If you’re new to REST APIs, consider seeking assistance from a colleague experienced in this area. In this guide, I’ll demonstrate how to import manual tags into vScope using an XLSX file and the Postman tool.


Getting Started with Postman

Download and Install Postman

Postman is a free tool that simplifies API requests. Start by downloading and installing Postman. Ensure your computer can access vScope so that Postman can connect to the vScope Server.

Postman API client splash image


Preparing the Excel File

In this example, we will import a tag named "Your Manual Tag" for servers. If you don’t have an XLSX file prepared, you can export one with server names from vScope. Note the resource type in the top left corner.

API example screenshot demonstrating tag import steps, illustrating required endpoint, parameters, and response for smooth integration.

Open the file in Excel, add the desired tag (e.g., "Your Manual Tag"), and save it.

Preparing excel file


Creating an API Token in vScope

To allow Postman to communicate with vScope, create an API token:

  1. Navigate to vScope > Settings > API Tokens > +Add Token.
  2. Choose a user authorized to access the target resource and set the token’s active duration.

Creating an API token in vScope

After creating, the token will appear in the list and is ready for use in Postman.

Managing api tokens in vScope


Configuring Postman

  1. Open Postman and set the request method to POST.
  2. Enter your vScope URL followed by /rest/action/bulktag/xlsx.

For example: https://vscope.example.com/rest/action/bulktag/xlsx


Adding the API Token

To authorize the request:

  1. Add the API token as a query parameter: ?token=[your_vscope_token].

Adding token param to postman


Specifying Information for Tag Import

Define parameters in the request URL to specify what you want vScope to do with the XLSX data.

Example URL structure with parameters: https://vscope.example.com/rest/action/bulktag/xlsx?token=1b644eddc79a5f5&resourceType=All%20Machines&matchColumn=Name&matchTag=Name&valueColumn=Your%20Manual%20Tag&apply=false

Explanation of Parameters

  • resourceType = All Machines
    Specifies the resource type to match (e.g., All Machines in our example).

  • matchColumn = Name
    Defines the column in the Excel sheet with values to match rows in vScope (e.g., Name).

  • matchTag = Name
    Specifies which tag in vScope to match with the values in matchColumn.

  • valueColumn = Your Manual Tag
    Points to the column in the sheet with values to be added as tags in vScope.

  • apply = false
    Use false for testing; set to true to commit the changes after verifying.


Setting Content-Type Header

Go to the Headers section in Postman and set:

  • Key: Content-Type
  • Value: application/octet-stream

Adding content type in postman


Uploading the XLSX File in Postman

  1. Go to Body.
  2. Select binary.
  3. Click Select File and upload your XLSX file.

Upload xlxs file to Postman


Testing and Importing Tags to vScope

With apply=false, click Send to test the request. The response will indicate how many rows are ready to be updated. If the count matches, set apply=true to proceed with the import.

Test apply import of tags