cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

ODATA Create Folder

nbojcetic
11-Garnet

ODATA Create Folder

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:

https://<myserver>/Windchill/servlet/odata/v5/DataAdmin/Containers('OR:wt.pdmlink.PDMLinkProduct:169546')/Folders('OR:wt.folder.Cabinet:169590')/Folders('OR:wt.folder.SubFolder:248107')/Folders

 

and the body is: (the example is from WIndchill REST Guide 2.4 page 466.

{
 "Name": "NewFolder", 
 "Description" : "Desc",
}
 
the headers are:
nbojcetic_0-1680266646500.png

 

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!

 

 

 

 

3 REPLIES 3

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

HelesicPetr
22-Sapphire I
(To:nbojcetic)

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

HelesicPetr_0-1721976275333.png

HelesicPetr_1-1721976370432.png

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.

Top Tags