verified the API via POSTMAN and it shows 1 user (<size>1</size>
but if i VIEW the group, theres the expected value of 7.
exporting shows the information too.
not sure how this will cause issues in the future as i expect to be running this once a month.
The API, as i have tested before, is set to add users without a computer to a static computer group, but before i do it at large, i wanted to test on a small group of users to i changed it scope to a set (small) computer group instead where i find the serial, then find the username of those machines, then i add it to the smart group.
the concern here is if i do this every month, will there be issues with this?
not sure why the API is doing this, but it seems to be just an issue with displaying it - maybe its how im putting the users to the group?
here is workflow
(assume credentials are loaded/added as a variable)
VAR1 to list all users with no laptops
for each VAR1, do
VAR2 find the username
VAR3 to static group ID
VAR4 xml header
VAR5(adds user to static group)="<user_group><user_additions><user><username>$VAR2</username></user></user_additions></user_group>"
command to actually PUT info
curl -X PUT -k -u ${api_user}:${api_pass} "${jamf_url}/${VAR3}" -H "Content-Type: text/xml" -d "${VAR4}${VAR5}" -X PUT