Hi @DC_10517352,
This is Bhushan from PTC Technical Support.
Can you please check the Windchill REST Services Help Center for example to upload the contents for Documents?
PTC Document Management Domain Examples: Uploading Content for a Document
Please let me know if you are able to upload content files using given example.
Thanks,
Bhushan D
Firstly, the documentation you linked to is in conflict with the article above, which is also in conflict with the Windchill REST Services User Guide.
Updating the documentation to give a single consistent protocol format would be a good idea.
That being said, even exactly replicating the format given in the documentation doesn't change the result from an empty ContentInfos. Side note: This protocol is very unusual. It doesn't align well with the majority of API clients, and it essentially prohibits certain content in the body of the message, namely, an example on how to perform a file upload in plain text would be prohibited from being uploaded since the boundary appears to be fixed.
Stage 1 upload result:
{'@odata.context': '$metadata#CacheDescriptor', 'value': [{'FileNames': [190869890], 'FolderId': 5051523725, 'ID': None, 'MasterUrl': 'https://<serverurl>/Windchill/servlet/WindchillGW', 'ReplicaUrl': 'https://<serverurl>/Windchill/servlet/WindchillGW/wt.fv.uploadtocache.DoUploadToCache_Server/doUploadToCache_Master?mk=wt.fv.uploadtocache.DoUploadToCache_Server&VaultId=3849172&FolderId=5051523725&SSC=1&CheckSum=430077438&sT=1671106738&sign=TFE558Yx7QpHb8%2FLwWamEMyOKswnKUA7ZQcHzxPN7Mw%3D&site=https%3A%2F%2F<serverurl>%2FWindchill%2Fservlet%2FWindchillGW&AUTH_CODE=HmacSHA256&isProxy=true&delegate=wt.fv.uploadtocache.DefaultRestFormGeneratorDelegate', 'StreamIds': [239207548], 'VaultId': 3849172}], '@PTC.AppliedContainerContext.LocalTimeZone': 'America/New_York'}
Header for stage 2:
{'Authorization': 'Basic <token>', 'CSRF_NONCE': '<nonce>', 'Content-Length': 465, 'Content-Type': 'multipart/form-data; boundary=-----------------------------boundary'}
URL for stage 2:
https://<serverurl>/Windchill/servlet/WindchillGW/wt.fv.uploadtocache.DoUploadToCache_Server/doUploadToCache_Master?mk=wt.fv.uploadtocache.DoUploadToCache_Server&VaultId=3849172&FolderId=5051523725&SSC=1&CheckSum=430077438&sT=1671106738&sign=TFE558Yx7QpHb8%2FLwWamEMyOKswnKUA7ZQcHzxPN7Mw%3D&site=https%3A%2F%2F<serverurl>%2FWindchill%2Fservlet%2FWindchillGW&AUTH_CODE=HmacSHA256&isProxy=true&delegate=wt.fv.uploadtocache.DefaultRestFormGeneratorDelegate
Body for stage 2:
-----------------------------boundary Content-Disposition: form-data; name="Master_URL" https://<serverurl>/Windchill/servlet/WindchillGW -----------------------------boundary Content-Disposition: form-data; name="CacheDescriptor_array" 239207548: 190869890: 239207548 -----------------------------boundary Content-Disposition: form-data; name="190869890"; filename="<filename>.html" test text -----------------------------boundary