API 409 Error PUT Extension Attribute by Serialnumber

securekindness
New Contributor II
Hi folks, looking for a bit of help. I’m trying to update a custom extension attribute called "Lifecycle Status" for Jamf Pro Classic API by its serial number. 
xml = """<extension_attributes><extension_attribute><id>67</id><name>Lifecycle Status</name><type>String</type><multi_value>false</multi_value><value>Active</value></extension_attribute></extension_attributes>"""

headers = {"Authorization": f'Bearer {token}', 'Content-Type': 'application/xml', 'Accept': 'application/xml'}

res = requests.put(url, data=xml, headers=headers)

res status from PUT is 409 error - "Conflict" : The request could not be completed due to a conflict with the current state of the resource You can get technical details http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.10

1 ACCEPTED SOLUTION

securekindness
New Contributor II

Yes indeed, thank you @sdagley ! The quotes are the problem. 

View solution in original post

3 REPLIES 3

securekindness
New Contributor II

I have confirmed that the API user has Full Admin Access. 

sdagley
Esteemed Contributor II

@securekindness That script fragment you posted has some problems: The """s should just be "s, 

f'Bearer

 looks like it's either missing text or incorrectly quoted. Please post your full script for review.

securekindness
New Contributor II

Yes indeed, thank you @sdagley ! The quotes are the problem.