Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: adding some simple notes on the RESTful API

...

Table of Contents
minLevel3

RESTful API

How do I create a node by posting a json document to a URL?

At the moment, you cannot do this. (Soon to change!) Instead, each value must be a field in the request POST. For example, suppose you have the json document:

Code Block
titlejson

  {
    "greetings":"Hello, World!",
    "multi" : ["first","second"],
    "translations" : { "en": "Hello", "zh", "你好" }
  } 

You would do a post such as:

Code Block
titlepost

curl -F"greetings=Hello, World!" -F"mult=first" -F"multi=second" -F"translations/en=Hello" -F"translations/zh=你好" http://admin:admin@localhost:8080/content/../../..

Scripts and Servlets

How do I find out why a given script or servlet is preferred to another when processing a request?

...