Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

wip doc

  • Loading branch information...
commit b78b6f760cd9181e7aa34d1cbf8018135f2f06b5 1 parent 8c1d44c
@ghosthack authored
Showing with 72 additions and 0 deletions.
  1. +72 −0 README.md
View
72 README.md
@@ -0,0 +1,72 @@
+
+Content API
+===========
+
+Allows storage and retrieval of elements (as JSON), rendering using templates (using json-template)
+
+
+Create element
+--------------
+
+POST /content/element/:id
+
+Content: JSON
+
+
+Create template
+---------------
+
+POST /content/template/:id
+
+Content: json-template
+
+
+Configure a default template for an element
+-------------------------------------------
+
+POST /content/view/:element/:template
+
+Update:
+
+PUT /content/view/:element/:template
+
+
+Render an element
+-----------------
+
+GET /content/render/:element
+
+GET /content/render/:element/:template
+
+Content-Type is based on "Accept" header:
+
+Accept: text/html => Content-Type: text/html
+Accept: application/json => Content-Type: application/json
+...
+
+Possible exceptions:
+404 Not found
+400 Bad request
+500 Internal server error
+
+
+Element operations
+------------------
+
+PUT /content/element/:id
+
+DELETE /content/element/:id
+
+GET /content/element/:id
+
+
+Template operations
+-------------------
+
+PUT /content/template/:id
+
+DELETE /content/template/:id
+
+GET /content/template/:id
+
+
Please sign in to comment.
Something went wrong with that request. Please try again.