-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.http
61 lines (53 loc) · 1.45 KB
/
example.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
@host = http://localhost:3333
### Create a collection
POST {{host}}/collections
Authorization: Bearer {{$dotenv SUPER_USER_KEY}}
Content-Type: application/json
{
"name": "users",
"schema": {
"type": "object",
"properties": {
"firstName": { "type": "string" },
"lastName": { "type": "string" },
"email": { "type": "string", "format": "email" },
"addresses" : {
"type": "array",
"items": {
"type": "object",
"properties" : {
"streetName": { "type": "string" },
"streetNumber": { "type": "string" },
"zipCode": { "type": "string" },
"city": { "type": "string" },
"country": { "type": "string" }
}
}
}
}
}
}
### Get all collections
GET {{host}}/collections
Authorization: Bearer {{$dotenv SUPER_USER_KEY}}
### Get collection by name
GET {{host}}/collections/users
Authorization: Bearer {{$dotenv SUPER_USER_KEY}}
### Delete collection and all associated documents
DELETE {{host}}/collections/users
Authorization: Bearer {{$dotenv SUPER_USER_KEY}}
### Set collection access
POST {{host}}/collections/users/access
Authorization: Bearer {{$dotenv SUPER_USER_KEY}}
Content-Type: application/json
{
"key": "public",
"get": true,
"post": true,
"patch": true,
"put": true,
"delete": true
}
### Delete access key
DELETE {{host}}/collections/users/access/public
Authorization: Bearer {{$dotenv SUPER_USER_KEY}}