Hi, wonder if you can give me some pointers on using the rest service to create documents using json.
I have setup the rest service on the ver 6 of kentico we have running, and have successfully got get and update working against a custom document, but creating new documents has left me a bit confused. The Kentico 6 documentation just has 1 example in xml;
POST http://localhost/CMS/rest/content/site/CorporateSite/en-us/document/Home HTTP/1.1
User-Agent: Fiddler
Authorization: Basic <enter Base64-encoded <username>:<password> here>
Host: localhost
Content-Type: text\xml
Content-Length:165
<CMS_MenuItem>
<NodeClassID><enter class ID here></NodeClassID>
<DocumentName>Services</DocumentName>
<DocumentPageTemplateID><enter template ID here></DocumentPageTemplateID>
</CMS_MenuItem>
So I'm trying to do something similar, and whatever I try seems to give me an event log error saying :
TreeNode.NewInstance]: Class name not defined!
I've tried sending without any wrapper json:
{
"NodeClassID": 2143,
"DocumentPageTemplateID": 256
"DocumentName": "Lees Test Org",
"ClassName": "customtable.Organisation",
"Name": "Lees Test Org",
}
and then with variations of the wrappers that come back in the queries (wrapped in "cms_documents" array then "customtable_Organisation" array, or the "data" array from a post request I saw that I think was to do with the object service), without much success.
Is there something else I need to be sending to get it to create documents successfully?
TIA,
Lee.