02-11-2025 09:25 AM - edited 02-11-2025 09:26 AM
Does the APIv3 not allow to grab a list of computer GUIDs in an organization? Do I have to grab the list using APIv1 or v0 and then save the GUIDs to use them in v3?
The APIv3 reference only lists connector uninstallation under the Computers section.
https://developer.cisco.com/docs/secure-endpoint/computers/
I'm trying to create a script to uninstall secure endpoint of all computers in our environment and it doesn't seem like there's a way to do it with just v3.
Solved! Go to Solution.
02-11-2025 09:59 AM
That is correct. You would need to use the /v1/computers call and utilize that information with the v3 uninstall_request call.
Thanks,
Matt
02-11-2025 09:59 AM
That is correct. You would need to use the /v1/computers call and utilize that information with the v3 uninstall_request call.
Thanks,
Matt
02-11-2025 10:46 AM
02-11-2025 11:53 AM
Ken,
I wasn't part of the conversation for the decision, so this is speculation.
Metadata, as was used in v1, is a more encompassing term that includes data about the data such as creation date, author, etc.
Meta, used in v3, is used for summary data such as pagination details, status codes, request IDs, etc.
When creating v3, someone made the choice to switch from the legacy metadata to meta which I realize causes more work when creating a response handler. There have been discussions around converting the v0/v1 functionality to v3 but I don't have any information on priority or timeline for that effort.
I didn't really provide much of an answer for you, but hopefully that helped in some way.
-Matt
02-11-2025 12:00 PM
02-11-2025 12:06 PM
02-13-2025 07:29 AM
And that we can't use the v3 bearer token to auth to v0/v1 requests is sort of bunk too...
02-11-2025 11:21 AM
Not sure if you can assist with this or if you want me to make a separate post but I'm having troubling authenticating via APIv1. Below is my Python code. Do you know what I'm doing wrong?
I'm getting a 401 error unknown API key or Client ID. I know the API key and Client ID work since I've used them for APIv3.
api1url = 'https://api.amp.cisco.com/v1/computers'
response1 = requests.request("GET", api1url, headers={
'Content-Type': 'application/json',
'Accept-Encoding': 'gzip'},
auth=HTTPBasicAuth(client_id, client_secret), verify=False)
02-11-2025 11:36 AM
APIv1 and APIv3 have different authentication methods, so the credentials are not going to be the same. Here is a slight change to your code that works for me.
import requests
import json
CLIENT_ID = ""
API_KEY = ""
auth = (CLIENT_ID, API_KEY)
api1url = 'https://api.amp.cisco.com/v1/computers'
response1 = requests.request("GET", api1url, headers={
'Content-Type': 'application/json',
'Accept-Encoding': 'gzip'},
auth=auth, verify=False)
print(response1.json())
02-11-2025 12:20 PM
Thanks! I had to create the credentials in another area from where I created the APIv3 credentials.
02-14-2025 08:12 AM
I got a powershell version together if you didn't get yours finished.
02-14-2025 08:52 AM
mine is finished, thanks.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide