From cdf3910e9857d4d7e5cddd0c707c5a3225ce5e6c Mon Sep 17 00:00:00 2001 From: Yoan VALLET <ext.sopra.yvallet@grandlyon.com> Date: Fri, 12 Mar 2021 11:35:33 +0100 Subject: [PATCH] add tips section to easycozy --- docs/easycozy/tips.md | 38 ++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 1 + 2 files changed, 39 insertions(+) create mode 100644 docs/easycozy/tips.md diff --git a/docs/easycozy/tips.md b/docs/easycozy/tips.md new file mode 100644 index 0000000..251eb29 --- /dev/null +++ b/docs/easycozy/tips.md @@ -0,0 +1,38 @@ +# Tips + +## Query data from an instance + +For maintenance reason, we sometime need to check data on a specific instance. For that we use postman to send get / post / delete data. +All posibility are described in the [data section of Cozy documentation](https://docs.cozy.io/en/cozy-stack/data-system/). + +**Example** + +The example will describ how to query userChallenge data from an instance. +First, you need to be able to connect to the instance in order to retrive the bearer and the cozysessid. + + + +Then use postman to query the data: +``` +Verb: GET +Request: https://ecolyotest.cozy.self-data.alpha.grandlyon.com/data/com.grandlyon.ecolyo.userchallenge/_all_docs?include_docs=true +Header: + Accept: application/json + content-type: application/json + Authorization: Bearer xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx + Cookie: cozysessid=AAAAAxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +``` + +The result will then be retrieve by postman: +``` +{ + "total_rows": 1, + "offset": 0, + "rows": [ + { + "id": "a353b985c0c5f09229b0acd6b2f37f1b", + "key": "a353b985c0c5f09229b0acd6b2f37f1b", + ... + ] +} +``` \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index 8a68278..c9c50c6 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -27,6 +27,7 @@ nav: - Easy Cozy: - Scripts: easycozy/scripts.md - Commands: easycozy/commands.md + - Tips: easycozy/tips.md - Ecolyo: - Introduction: ecolyo/index.md - Getting started: -- GitLab