Has anyone figured out how to do an API search for a workstation by its name? The only thing I have figured out is to iterate thru all the deviceID pages and search for the name. Which is really inefficient.
My PHP / CURL Code - (trying to figure out how to get this to PowerShell as well)
It gets even worse than that. The list of all of your devices in the background is ordered by the last check in date/time. I have been unable to pull a complete list of devices as you end up with duplicates and missing devices as the list re-orders itself as devices check in. It may be easier if you have less devices or a longer check in interval but I have 250+ pages and haven't been able to complete list since you have to wait so long between calls to avoid getting timed out.
I'd like to know where you got the information to even create this code. I've been trying to find clear information about using the WMS API with absolutely no luck. And now, it seems as if they are using something with Service Now, and I have no idea how this is supposed to work. I am seriously BEYOND FRUSTRATED with Dell and this WMS API. It seems they are intentionally making it as difficult to use as possible.
Could you tell me how you have things configured such that the X-Auth-Token is actually returned? When I attempt to run your code on our on premises server v3.3.1 with API enabled, I get the following response:
"The authentication token header is missing in the request.","MessageArgs":["POST","X-Auth-Token"],"RelatedProperties":["#/"],"Resolution":"Please sign-in with URL /wms/v1/SessionService/Sessions"
But that is the url I am using (after the "wms-api" part). It's as if something is not configured properly, but I can not tell what.
If you could help me figure out how to get this code to even return an X-Auth-Token, I would be willing to help you get it to work in Powershell, as I have an interest in that as well. But I simply can not get this code to work. I get the feeling there is some key component I am missing in the setup *on the server*, but without clearer documentation from Dell, I simply can't figure it out. I'm on WMS v3.3.1, and I have WMS API enabled. I don't have anything configured under "External App Services," but even if I do, I can't actually activate it and don't know what is supposed to be done with the API key and secret displayed, if anything. PLEASE help me understand how this feature is supposed to be used.
I was going crazy while reading the list of all my devices from WMS-API and always:
1. found duplicates which I wasn't able to explain
2.some are missing
Analyzing it, I found that there are mainly "blocks" of devices in my list which are duplicated. But each export the duplicates changed. So I would agree and confirm your root cause is the bad order after check-in time. Oh dear.
Question: Is there a way to change order of the device-list output to SystemName ?
ODell Wyzam
8 Posts
718
1
Posted August 3rd, 2022 10:00
It gets even worse than that. The list of all of your devices in the background is ordered by the last check in date/time. I have been unable to pull a complete list of devices as you end up with duplicates and missing devices as the list re-orders itself as devices check in.
It may be easier if you have less devices or a longer check in interval but I have 250+ pages and haven't been able to complete list since you have to wait so long between calls to avoid getting timed out.