Skip to content
Snippets Groups Projects
Commit cdf3910e authored by Yoan VALLET's avatar Yoan VALLET
Browse files

add tips section to easycozy

parent ba7ef55f
No related branches found
No related tags found
No related merge requests found
Pipeline #12465 passed
# 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.
![Bearer&cozysessid](/img/bearer_cozysessid.png)
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
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment