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…
"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…
--
View this message in context:
http://xwiki.475771.n2.nabble.com/RESTful-API-to-create-a-new-object-of-cus…
Sent from the XWiki- Users mailing list archive at
Nabble.com.