-
Notifications
You must be signed in to change notification settings - Fork 0
/
library.http
97 lines (81 loc) · 1.94 KB
/
library.http
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
GET http://admin:1234@localhost:5984/_session"
###
POST http://admin:1234@localhost:5984/_users/org.couchdb.user%3Arazi
{
"username": "razi",
"password": "1234",
"first_name": "Mohammed",
"last_name": "Razi",
"email": "[email protected]",
"phone": "44029999",
"role": "reader",
"roles": [
"reader"
],
"active": false,
"type": "user",
"name": "razi",
"_id": "org.couchdb.user:razi"
}
###
OPTIONS https://library.smileupps.com/_session
###
GET https://admin:[email protected]/_session
###
POST https://library.smileupps.com/library/_index
content-type: application/json
###
POST https://library.smileupps.com/_session
###
GET https://admin:[email protected]/_session
###
GET http://admin:1234@localhost:5984/_session
###
PUT http://admin:1234@localhost:5984/_users
{ "_id": "org.couchdb.user:reader1",
"name": "reader1",
"type": "user",
"roles": [
"reader"
],
"password": "plaintext_password"
}
###
PUT http://admin:1234@localhost:5984/_users
{
"username": "razi",
"password": "hcg-0001",
"first_name": "Mohammed",
"last_name": "razi",
"email": "[email protected]",
"phone": "123456",
"role": "reader",
"roles": [
"reader"
],
"active": false,
"type": "user",
"name": "razi",
"_id": "org.couchdb.user:razi"
}
####
POST http://admin:1234@localhost:5984/_users/org.couchdb.user:razi
{
"username": "razi",
"password": "1234",
"first_name": "Mohammed",
"last_name": "Razi",
"email": "[email protected]",
"phone": "44029999",
"role": "reader",
"active": false,
"type": "user",
"name": "razi",
"_id": "org.couchdb.user:razi"
}
###
GET http://admin:1234@localhost:5984/_users/_all_docs?include_docs=true
###
http://www.greenacorn-websolutions.com/couchdb/export-import-a-database-with-couchdb.php
curl -X GET http://admin:[email protected]:5984/library/_all_docs\?include_docs\=true > /Users/razikallayi/Desktop/library.json
curl -X GET http://admin:[email protected]:5984/_users/_all_docs\?include_docs\=true > /Users/razikallayi/Desktop/_users.json