I have successfully uploaded a geometry to Autodesk Forge via the model derivative API. What I'm trying to do is overwrite the existing geometry with different data and have the new geometry displayed when reloading the viewer.
I have deleted the manifest via the DELETE :urn/manifest endpoint (doc: https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-manifest-DELETE/). After deleting the manifest translating the new geometry works fine but after all the old geometry is still displayed in the viewer. This is the case even if I delete the old geometry prior to uploading the new one.
This is the supposed solution for the issue: https://forums.autodesk.com/t5/view-and-data-api/bucket-object-has-overwritten-how-to-register-again/m-p/5428709/highlight/true
But setting the parameter x-ads-force to true in the HTTP header does not work for me.
This is my code for requesting the translation via the POST job endpoint of the model derivative API (https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/job-POST/):
import requests
url = self.api.base_url + "/modelderivative/v2/designdata/job"
header = {
'Content-Type': 'application/json; charset=utf-8',
'x-ads-force': 'true', # this is supposed to solve the issue
'Authorization': 'Bearer ' + access_token,
}
#prepare data
data = {
"input": {
"urn": base64_urn.decode()
},
"output": {
"formats": [
{
"type": "svf",
"views": ["2d", "3d"]
}]
}
}
#make request
r = requests.post(url, headers=header, data=json.dumps(data))