Hello folks -
I have successfully used the v2 API against TWC to download model elements and to change them via the commits POST endpoint. However, when I consult the v2 API cookbook on creating new model elements, it tells me to delete any references to model identity (DataIdentity, @id). All well and good since there is no ID on the server yet. However, when I do this I get jackson XML errors saying that a key cannot be found in my JSON. When I keep the keys but leave the fields blank, I get null errors. Here is what I am trying to POST via requests when I get the errors.
commit_body = {
"@type": "Commit",
"description": "Add new element.",
"change": [
{
"@type": "DataVersion",
"payload": {
"@type": "PartUsage",
"declaredName": "Test Part"
}
}
]
}
This, as a change, is successful:
commit_body = {
"@type": "Commit",
"description": "Change element name.",
"change": [
{
"@id": "some uuid4 id",
"@type": "DataVersion",
"payload": {
"@type": "PartUsage",
"declaredName": "Test Part"
},
"identity": {
"@id": "some uuid4 id",
"@type": "DataIdentity"
}
}
]
}
Is there a field that is being expected to tell the API that the element has no ID since it is being created?
