all repos — litestore @ 1f6fee50ef790e053da1cf113c2e95ca0561b2b7

A minimalist nosql document store.

Updated docs.
h3rald h3rald@h3rald.com
Sat, 16 May 2015 21:23:31 +0200
commit

1f6fee50ef790e053da1cf113c2e95ca0561b2b7

parent

4603541ab2899aa060d97158da1a7803efe7013b

2 files changed, 54 insertions(+), 38 deletions(-)

jump to
M admin/md/api.mdadmin/md/api.md

@@ -11,10 +11,14 @@

##### Example ``` -curl -i -X OPTIONS http://127.0.0.1:9500/v1/inf +$ curl -i -X OPTIONS http://127.0.0.1:9500/v1/info HTTP/1.1 200 OK Content-Length: 0 +Access-Control-Allow-Methods: GET,OPTIONS Allow: GET,OPTIONS +Access-Control-Allow-Headers: Content-Type +Access-Control-Allow-Origin: * +Server: LiteStore/1.0.0 ``` #### GET info

@@ -23,39 +27,50 @@ Returns the following server statistics:

* Version * Size of the database on disk (in MB) +* Whether the database is read-only or not +* Log level (debug, info, warning, error, none) +* Mounted directory (if any) * Total documents * Total Tags * Number of documents per tag -##### Example Response +##### Example ``` +$ curl -i http://127.0.0.1:9500/v1/info +HTTP/1.1 200 OK +Content-Length: 965 +Content-Type: application/json +Access-Control-Allow-Headers: Content-Type +Access-Control-Allow-Origin: * +Server: LiteStore/1.0.0 + { - "version": "LiteStore v1.0", - "size": "9.71 MB", - "total_documents": 103, - "total_tags": 10, - "tags": [{ - "$dir:lib": 10 - }, { - "$dir:nimcache": 93 - }, { - "$format:binary": 46 - }, { - "$format:text": 57 - }, { - "$subtype:json": 1 - }, { - "$subtype:octet-stream": 46 - }, { - "$subtype:plain": 11 - }, { - "$subtype:x-c": 45 - }, { - "$type:application": 47 - }, { - "$type:text": 56 - }] + "version": "LiteStore v1.0.0", + "size": "5.76 MB", + "read_only": false, + "log_level": "info", + "directory": "admin", + "mount": true, + "total_documents": 68, + "total_tags": 18, + "tags": [ + { + "$dir:admin": 68 + }, + { + "$format:binary": 8 + }, + { + "$format:text": 60 + }, + { + "$subtype:css": 3 + }, + { + "$subtype:html": 2 + } + ] } ```

@@ -63,16 +78,11 @@ ### docs - LiteStore Documents

A document is the main resource type managed by LiteStore. Any LiteStore document can be represented as a JSON object exposing the following properties: -id -: The unique identifier of the document. -data -: The document contents (base64-encoded if binary). -created -: The document creation date expressed as combined date and time in UTC ([ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) compliant). -modified -: The document modification date (if applicable) expressed as combined date and time in UTC ([ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) compliant). -tags -: A list of tags associated to the document. +* id: The unique identifier of the document. +* data: The document contents (base64-encoded if binary). +* created: The document creation date expressed as combined date and time in UTC ([ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) compliant). +* modified: The document modification date (if applicable) expressed as combined date and time in UTC ([ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) compliant). +* tags: A list of tags associated to the document. #### Example Document
M admin/md/architecture.mdadmin/md/architecture.md

@@ -15,4 +15,10 @@

The Core module is then used by the two main interfaces exposed to users: * the Command-Line Interface, which can be used to run the server, import/export/delete data in bulk, and perform maintenance operations on the underlying datastore file (vacuum, optimize). -* the RESTful HTTP API, which can be used as the primary way to perform CRUD operation on documents, and manage document tags.+* the RESTful HTTP API, which can be used as the primary way to perform CRUD operation on documents, and manage document tags. + +#### Object Model + +##### Document + +##### Tag