Finally made it!
So - first of all I messed up my class name while trying stuff out, I didn't
need the XWiki. prefix in there.
Second, I first create the page with a PUT command, then I make it into an
instance of my class (or rather create an object of that class under it and
somehow it does the math) with a POST.

So I have the following:

"C:\Program Files\cURL\bin\curl.exe" -u admin:admin -X PUT ^
-H "Content-type: application/x-www-form-urlencoded" -H "Accept:
application/xml" ^
http://localhost/xwiki/rest/wikis/xwiki/spaces/Development/spaces/Resources/spaces/Version+Information/pages/TestABCD
  

"C:\Program Files\cURL\bin\curl.exe" -u admin:admin -X POST ^
-H "Content-type: application/x-www-form-urlencoded" -H "Accept:
application/xml" ^
-d "className=Development.Resources.Version
Information.VersionInformationClass" ^
-d "property#Name=TestABCD" ^
http://localhost/xwiki/rest/wikis/xwiki/spaces/Development/spaces/Resources/spaces/Version+Information/pages/TestABCD/objects




--
View this message in context: 
http://xwiki.475771.n2.nabble.com/RESTful-API-to-create-a-new-object-of-custom-class-tp6965384p7598319.html
Sent from the XWiki- Users mailing list archive at Nabble.com.
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to