Using REST API to delete a client

I need a solution

Hi. I need to find the clientid to delete a known client as part of an automated decommissioning workflow.

I’m finding that returning all of the clients from the server (https://localhost:8446/sepm/api/v1/computers?pageSize=100) to then search the JSON payload and grab the clientid seems really inefficient and takes a huge amount of time (I have over 2000 SEP clients)

Can anyone suggest a better way of doing this?

Thanks, 

-Matt

0

Related:

Rest API Groups multi page

I need a solution

Who can help me with this one? I need to report data from by SEPM server. Because the report function is not showing me what I need I started to word with the API using PowerShell.

I need to get at least a list form my groups wit thu number of ComputerAgents in it. Based on the example scripts provided by Symantec i’ve started to get information using this powershell command:

(Invoke-RestMethod -method get -Uri https://localhost:8446/sepm/api/v1/groups -Headers @{Authorization=’Bearer ‘+”MyKey”}).content | select-object FullPathName,numberOfPhysicalComputers

It shows me exactly what i need but because the api/v1/groups contains pages, I only get the info from the first page. How do I get the information from all pages? Hope someone can tell me.

0

Related: