I am attempting to use the JSS API to programatically manipulate the list of packages in various policies, but when I "PUT /policies/id/123" (using an appropriate policy number) I am getting unpredictable "HTTP 409 CONFLICT" errors, where the returned HTML says that there are "conflicting names". The JSS in question has various sets of identically-named policies, usually with different sites/categories/buildings, and there is no problem with creating as many identical copies of a policy using the human/web interface as I want (even with the same site, category, and building). But sometimes I can't PUT changed/updated XML for a policy, and sometimes I can just fine, seemingly randomly.
Questions:
Does the "conflicting names" refer to policy names, or might it refer somehow to other conflicting names of things inside the policy?
Should I in fact be able to PUT (& POST) policies distinguished by different IDs but with identical names?
When PUTting an update, should I pass in the entire/complete (updated) XML for the policy, or just those parts of the XML tree that I want to change? I don't know what is normal for RESTful PUT updates, if there is a norm.
Has anyone ever done anything like this? What problems did you have, if any?
Ideas?