Ok an update here...
With the following syntax:
"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=XWiki.Development.Resources.Version
Information.VersionInformationClass" -d "property#Name=TestABCD" -d
"property#Product=4.0"
http://localhost/xwiki/rest/wikis/xwiki/spaces/Development/spaces/Resources…
it seems that some object does created - if I go to the Version Information
webhome, click edit and select Objects, I see the following:
XWiki.Development.Resources.Version Information.VersionInformationClass
Development.Resources.Version Information.VersionInformationClass 0
And instances get added each time I run it again a new instance gets added
(0, 1, etc.). It seems there's nothing I can do with these instances except
delete them. I don't see them in the tree either.
Something else I tried is 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" -d "className=XWiki.Development.Resources.Version
Information.VersionInformationClass" -d "property#Name=TestABCD" -d
"property#Product=4.0"
http://localhost/xwiki/rest/wikis/xwiki/spaces/Development/spaces/Resources…
In this case, a new page called TestABCD appears in the hierarchy under
Version Information. But it's a regular page, not a Version Information one
like I can create with the template.
Could my issue be that my object creation does not include every property of
the class?
Or am I not understanding the concept the class objects properly?
What I'm looking for is to wind up with a page that looks the same as when I
create a new page using my Version Information template.
--
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.