Need Help with update value to newly created EA

Maung
New Contributor
Hello,
I am trying to add an EA's value "YES" to the existing EA's name "Decommed:" in JamfPro.
Spending hours and still not being able to figure it out! New to API/XML and learning along the way by watching the presentation from JUNCxxx.
so far this is what I have and I am sure the curl statement is not working with the error message <p>ERROR in XML file</p>
Appreciated your help.
-------------------------
#!/user/bin/sh
jamfuser="jamf_account"
jamfpw="jamf_password"
jamfURL="https://jamf_server:8443/JSSResource/computerextensionattributes/name/Decommed"
/usr/bin/curl \
 --user "$jamfuser":"$jamfpw" \
 --header "Content-Type: Text/xml" \
 --request PUT \
 --data "<value>YES</value>" \
$jamfURL
------------------------------------------
above URL "$jamfURL" has this data.

 

<computer_extension_attribute>
<id>38</id>
<name>Decommed</name>
<enabled>true</enabled>
<description>Decommissioned devices.</description>
<data_type>String</data_type>
<input_type>
<type>Text Field</type>
</input_type>
<inventory_display>Hardware</inventory_display>
</computer_extension_attribute>
 
Thank you.
0 REPLIES 0