Skip to main content

Overview

This document provides guidance on how to use the Swagger UI for a no-code solution to moving computers to computer groups.

 

Introduction

For those who want to be able to bulk move computers in EPM SaaS, there is no GUI-provided way to do so. That said, we do provide the API method to assign computers to a group ID either as a one-off or in bulk via a CSV.

 

As support will not provide break/fix support on troubleshooting code choices. The guidance here is based on using the Swagger UI provided with EPM - available with BeyondInsight on-prem, and EPM SaaS. Remember, with great API power comes with great API risks: Test. Test. Take snapshots of where things were for faster roll-back (e.g. download CVE of computers pre-change). Test before bulk moving production. Please.

 

If the API isn’t returning the anticipated data or if the documentation is followed with challenging results? Yes, contact support. Want help structuring your code? No, that is outside the scope of support.

 

Materials

You’ll need a few things to bulk move computers.

  1. API Access

    1. Please see https://docs.beyondtrust.com/epm-wm/docs/configure-api-settings

  2. Computer IDs and Group IDs

Please disable or remove API access once the work has completed to reduce an exposure to unanticipated changes.

 

API Methods

The two main methods for API moves are AssignComputers and AssignComputersByCsv.

 

AssignComputers

The AssignComputers takes the id of the group to move to as the parameter, and the body takes the computerId field to assign computers. There are other methods of filtering, or selecting computers, but comptuerId is used here as it is guaranteed to be unique to the computer you want to reassign.

 

AssignComputersByCsv

The AssignComputersByCsv takes the id of the group to move to as the parameter, and the body contains a csv file. The difference is that Id needs to be used for the column header for computerIds. This is further detailed in KB0020236

https://beyondtrustcorp.service-now.com/csm?id=kb_article_view&sysparm_article=KB0020236

 

Collecting IDs

Collecting the IDs of the computer group and the computers can be done in the webGUI.

 

Computer Group ID

  1. Select Computer Groups

  2. Select the three ellipses to View Group Details

  3. In Properties, you’ll find the information for Group ID

  4. This is the URL parameter of ID to use.

Screenshot of EPM SaaS webGUI to highlight location of Group ID in Group Details

Computer IDs

An alternative to looking for Computer IDs from API is to download a csv from the webGUI.

  1. Select Computers

  2. Filter for the computers you wish to move

  3. Select Columns → Select Computer ID to visually see the ID’s to be moved

  4. Optional: download CSV of this filtered result to gather the ID’s in a column with the header of Id. This is the same format needed by the AssignComputersByCsv method.

 

Swagger URL

The swagger URL is provided in the API documentation to determine your specific instance is below.

https://docs.beyondtrust.com/epm-wm/docs/api#access-api-documentation

  1. Access the Swagger UI

  2. Authenticate to the Swagger UI

  3. TEST! PLEASE! Before performing the full bulk action.

 

API Reference Documentation

The API Reference documentation provides a nice feature to understand the API methods available along with their functionality.

https://docs.beyondtrust.com/epm-wm/reference

there is technically a way in the GUI to move computers around in groups I thought. Isn’t that what this does ​@tclowater?

If this is the correct thought that I’m following, sure its can be a bit tedious pending on how many machines you have in your environment, but you can use the filter by name, select the device, rinse and repeat, however, your method makes it far more efficient ;) 

 


Hey ​@MikeK  - absolutely, this is possible in the GUI! This advice is more when I’m seeing requests to move 1000’s of machines at once. In which case, if that takes 30 seconds per machine and you don’t get tired, that’s still about 8.5 hours of manual effort per 1000 machines.

 

This is to help alleviate that manual effort challenge without resorting to creative uses of MDM partial reinstall methods - which, please no. There have been some downsides to creativity.


@tclowater I figured that might be the case 😃 I previously had to manage 55k machines and I know moving them around really sucked. While the current GUI method is inefficient, it still does exist. I was just reading through your initial post and saw you called out there was no GUI method 😃 so I had to pick on you a little bit. 


I have submitted T2EPM-I-2022 in the ideas portal to allow us to do bulk moves using the newly released move functionality in management rules. While I know I can do it via the API, I’d love to perform these functions inside the console. I’d love to hear other’s feedback, and possibly get an upvote in the ideas portal. Link to idea: https://beyondtrust-public.ideas.aha.io/ideas/T2EPM-I-2022

 


Reply