diff options
| author | rr- | 2016-04-21 19:25:38 +0200 |
|---|---|---|
| committer | rr- | 2016-04-21 19:27:30 +0200 |
| commit | 46ee9faf72d0e512d83ce2070aaae9604c155df3 (patch) | |
| tree | 295d2593960e6a655341edc71770db26d4438b06 /API.md | |
| parent | c2a39a0fd59a70b9533edd13ab2f6eb44588dd12 (diff) | |
server/snapshots: add snapshot lists
Diffstat (limited to 'API.md')
| -rw-r--r-- | API.md | 59 |
1 files changed, 57 insertions, 2 deletions
@@ -36,6 +36,8 @@ - Password reset - [Password reset - step 1: mail request](#password-reset---step-2-confirmation) - [Password reset - step 2: confirmation](#password-reset---step-2-confirmation) + - Snapshots + - [Listing snapshots](#listing-snapshots) 3. [Resources](#resources) @@ -604,8 +606,6 @@ data. "users": [ <user>, <user>, - <user>, - <user>, <user> ] } @@ -861,6 +861,61 @@ data. it is recommended to connect through HTTPS. +## Listing snapshots +- **Request** + + `GET /snapshots/?page=<page>&pageSize=<page-size>&query=<query>` + +- **Output** + + ```json5 + { + "query": <query>, // same as in input + "page": <page>, // same as in input + "pageSize": <page-size>, + "total": <total-count>, + "snapshots": [ + <snapshot>, + <snapshot>, + <snapshot> + ] + } + ``` + ...where `<snapshot>` is a [snapshot resource](#snapshot) and `query` + contains standard [search query](#search). + +- **Errors** + + - privileges are too low + +- **Description** + + Lists recent resource snapshots. + + **Anonymous tokens** + + Not supported. + + **Named tokens** + + | `<value>` | Description | + | ----------------- | --------------------------------------------- | + | `type` | involving given resource type | + | `id` | involving given resource id | + | `date` | created at given date | + | `time` | alias of `date` | + | `operation` | `changed`, `created` or `deleted` | + | `user` | name of the user that created given snapshot | + + **Order tokens** + + None. The snapshots are always sorted by creation time. + + **Special tokens** + + None. + + # Resources |