all repos — litestore @ 20f1efa1f29fed91d9cbd13872537fb50eae5892

A minimalist nosql document store.

src/admin/md/api_info.md

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
### info (LiteStore Information)

This resource can be queried to obtain basic information and statistics on the LiteStore server.

#### OPTIONS info

Returns the allowed HTTP verbs for this resource.

##### Example

```
$ curl -i -X OPTIONS http://127.0.0.1:9500/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.3
```

#### GET info

Returns the following server statistics:

* Version
* Datastore version
* API 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)
* Additional stores (if any)
* Whether authorization is enabled or not
* Total documents
* Total tags
* Number of documents per tag

##### Example

```
$ curl -i http://127.0.0.1:9500/info
HTTP/1.1 200 OK
Content-Length: 965
Content-Type: application/json
Access-Control-Allow-Headers: Authorization, Content-Type
Access-Control-Allow-Origin: http://127.0.0.1:9500
Server: LiteStore/1.9.0

{
  "version": "LiteStore v1.9.0",
  "datastore_version": 2,
  "api_version": 7,
  "size": "6.98 MB",
  "read_only": false,
  "log_level": "warn",
  "directory": "admin",
  "mount": true,
  "additional_stores": [],
  "auth": false,
  "total_documents": 68,
  "total_tags": 18,
  "tags": [
    {
      "$dir:admin": 68
    },
    {
      "$format:binary": 8
    },
    {
      "$format:text": 60
    },
    {
      "$subtype:css": 3
    },
    {
      "$subtype:html": 2
    }
  ]
}
```