It seems that Version+Information is a space, not a (terminal) page.
And indeed, you'll not be able to add objects to a space.  Nested spaces
is a new functionality from version 7.x.  You may want to read about
"Nested Spaces" in order to understand more what's a page and what's a
space in the this context.  In your case, you may try to use the
following URI

http://localhost/xwiki/rest/wikis/xwiki/spaces/Software+Development/spaces/Resources/spaces/Version+Information/pages/WebHome/objects

This WebHome should be here (I hope I'm not saying wrong things) for
retro-compatibility reasons.

In any case, I'm not mastering Nested Spaces so documentation (or
another community member more aware of the topic?) will say less crap
than me ;-)

Sincerely,

On 01/03/2016 17:17, pgregoire wrote:
> Thank you,
> so basically everything that has children is considered a space?
> 
> I tried the two following syntaxes:
> 
> -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" htt
> p://localhost/xwiki/rest/wikis/xwiki/spaces/Software+Development/spaces/Resources/*pages*/Version+Information/objects
> 
> I get this reply:
> <p>The server has not found anything matching the request URI</p>
> 
> With the following:
> http://localhost/xwiki/rest/wikis/xwiki/spaces/Software+Development/spaces/Resources/*spaces*/Version+Information/objects
> 
> I get this:
> <p>The method specified in the request is not allowed for the resource
> identified by the request URI</p>
> 
> Which would indicate that it might be the correct URI, but for some reason
> the request is not allowed?
> 
> 
> 
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/RESTful-API-to-create-a-new-object-of-custom-class-tp6965384p7598216.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
> 

-- 
Jean Simard
jean.sim...@xwiki.com
Research engineer at XWiki SAS
http://www.xwiki.com
Committer on the XWiki.org project
http://www.xwiki.org
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to