Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hello,
can anybody have a hint of what am I doing wrong? I am trying to create subfolder in the Windchill, using Postman application but all I got is the message "The syntax of the JSON document is not valid.".
The query is POST:
and the body is: (the example is from WIndchill REST Guide 2.4 page 466.
Also, Authorization is done using wcadmin account.
I tried different data in json body but without luck.
Does anyone have a clue what is the problem?
Best regards!
Hello,
I'm facing similar issue.
Using curl function I need to add \before each " of the body (it is working for checkout)
But with a normal send it is not working.
Did you solve it
Hi @nbojcetic
Try to create the folder from a Windchill restApi documentation UI.
You can try it from the UI and you can find if the json is well formatted.
https://serverAdress.com/Windchill/netmarkets/html/wrs/doc.html
examples
"Folder@odata.bind": "Folders('OR:wt.folder.SubFolder:199456')"
"@odata.type": "#PTC.NavCriteria.WTPartStandardConfigSpec",
for the type I would try to find a type for the SubFolder. I guess it could be something like
"#PTC.Folder.SubFolder" but I don't know exactly.
PetrH
@nbojcetic , @VB_2025784 Please use the Swagger UI to run endpoints, your payload does not contain all necessary data as @HelesicPetr explained.
Also, it could be a permission issue, try to create the folder on the exact context with the same user on the UI; but I guess it's not the root cause.
Any idea how to add the service to a ThingWorX OdataConnector? I found the endpoint createContainerInContainers/v6/DataAdmin/Containers Post but create Folder isn't shown. Looking at the Swagger JSON the parameters should be what is shown below. I tried adding that to the JSON Container parameters but it is not considered valid. I am looking for a way to create folders in Windchill from ThingWorx.
"parameters" : [ {
"name" : "ContainerId",
"in" : "path",
"description" : "The identification key for the item to get",
"required" : true,
"type" : "string"
}, {
"name" : "CSRF_NONCE",
"in" : "header",
"required" : true,
"type" : "string"
}, {
"in" : "body",
"name" : "body",
"required" : true,
"schema" : {
"$ref" : "#/definitions/Create.PTC.DataAdmin.Folder"
}
} ]
You must enter the default folder ID under the product
POST /Windchill/servlet/odata/DataAdmin/Containers(<oid>)/Folders(<oid>)/Folders
Folders(<oid>) : This is the default folder ID
EX) Containers('OR:wt.pdmlink.PDMLinkProduct:131308')/Folders('OR:wt.folder.Cabinet:131359')/Folders('OR:wt.folder.SubFolder:146353')/Folders"
sample VBA CODE
Please! tell me how to create wtpart T.T . . .