acebase-server 1.19.0 → 1.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +49 -49
- package/.github/workflows/publish.yml +125 -0
- package/Dockerfile +26 -26
- package/LICENSE +21 -21
- package/bin/acebase-server.js +8 -8
- package/create-package-files.sh +25 -0
- package/dist/cjs/routes/data-exists.js +2 -2
- package/dist/cjs/routes/data-export.js +2 -2
- package/dist/cjs/routes/data-get.js +2 -2
- package/dist/cjs/routes/data-reflect.js +2 -2
- package/dist/cjs/routes/docs.js +1 -1
- package/dist/cjs/routes/meta-info.js +1 -1
- package/dist/esm/routes/data-exists.js +1 -2
- package/dist/esm/routes/data-export.js +1 -2
- package/dist/esm/routes/data-get.js +1 -1
- package/dist/esm/routes/data-reflect.js +1 -2
- package/dist/esm/routes/docs.js +1 -1
- package/dist/esm/routes/meta-info.js +1 -1
- package/package.json +6 -7
- package/release_notes.md +2 -0
- package/src/routes/auth-change-password.yaml +73 -73
- package/src/routes/auth-delete.yaml +77 -77
- package/src/routes/auth-forgot-password.yaml +49 -49
- package/src/routes/auth-reset-password.yaml +53 -53
- package/src/routes/auth-signin.yaml +129 -129
- package/src/routes/auth-signout.yaml +46 -46
- package/src/routes/auth-signup.yaml +135 -135
- package/src/routes/auth-state.yaml +28 -28
- package/src/routes/auth-update.yaml +151 -151
- package/src/routes/auth-verify-email.yaml +52 -52
- package/src/routes/data-exists.yaml +44 -44
- package/src/routes/data-export.yaml +63 -63
- package/src/routes/data-import.yaml +74 -74
- package/src/routes/data-index-create.yaml +105 -105
- package/src/routes/data-index-delete.yaml +51 -51
- package/src/routes/data-index-list.yaml +84 -84
- package/src/routes/data-query.yaml +165 -165
- package/src/routes/data-reflect.yaml +124 -124
- package/src/routes/data-schema-get.yaml +53 -53
- package/src/routes/data-schema-set.yaml +64 -64
- package/src/routes/data-schema-test.yaml +66 -66
- package/src/routes/data-schemas-list.yaml +41 -41
- package/src/routes/data-set.yaml +77 -77
- package/src/routes/data-sync-changes.yaml +66 -66
- package/src/routes/data-sync-mutations.yaml +66 -66
- package/src/routes/data-transaction-finish.yaml +82 -82
- package/src/routes/data-transaction-start.yaml +58 -58
- package/src/routes/data-update.yaml +77 -77
- package/src/routes/meta-info.yaml +40 -40
- package/src/routes/meta-ping.yaml +22 -22
- package/src/routes/meta-stats.yaml +40 -40
- package/src/routes/oauth2-init.yaml +62 -62
- package/src/routes/oauth2-refresh.yaml +64 -64
- package/src/routes/oauth2-signin.yaml +65 -65
- package/webmanager/acebase-client-browser.min.js +12 -12
- package/webmanager/index.html +271 -271
- package/webmanager/index.js +437 -437
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
/auth/{dbname}/state:
|
|
2
|
-
get:
|
|
3
|
-
tags:
|
|
4
|
-
- auth
|
|
5
|
-
summary: Get authentication state
|
|
6
|
-
description: Gets current auth state
|
|
7
|
-
parameters:
|
|
8
|
-
- name: dbname
|
|
9
|
-
in: path
|
|
10
|
-
description: name of the database
|
|
11
|
-
required: true
|
|
12
|
-
schema:
|
|
13
|
-
type: string
|
|
14
|
-
example: mydb
|
|
15
|
-
responses:
|
|
16
|
-
200:
|
|
17
|
-
description: returns whether the request was authenticated and by which user (determined by the sent Authorization header)
|
|
18
|
-
content:
|
|
19
|
-
'application/json':
|
|
20
|
-
schema:
|
|
21
|
-
type: object
|
|
22
|
-
properties:
|
|
23
|
-
signed_in:
|
|
24
|
-
type: boolean
|
|
25
|
-
example: true
|
|
26
|
-
user:
|
|
27
|
-
$ref: '#/components/schemas/User'
|
|
28
|
-
required:
|
|
1
|
+
/auth/{dbname}/state:
|
|
2
|
+
get:
|
|
3
|
+
tags:
|
|
4
|
+
- auth
|
|
5
|
+
summary: Get authentication state
|
|
6
|
+
description: Gets current auth state
|
|
7
|
+
parameters:
|
|
8
|
+
- name: dbname
|
|
9
|
+
in: path
|
|
10
|
+
description: name of the database
|
|
11
|
+
required: true
|
|
12
|
+
schema:
|
|
13
|
+
type: string
|
|
14
|
+
example: mydb
|
|
15
|
+
responses:
|
|
16
|
+
200:
|
|
17
|
+
description: returns whether the request was authenticated and by which user (determined by the sent Authorization header)
|
|
18
|
+
content:
|
|
19
|
+
'application/json':
|
|
20
|
+
schema:
|
|
21
|
+
type: object
|
|
22
|
+
properties:
|
|
23
|
+
signed_in:
|
|
24
|
+
type: boolean
|
|
25
|
+
example: true
|
|
26
|
+
user:
|
|
27
|
+
$ref: '#/components/schemas/User'
|
|
28
|
+
required:
|
|
29
29
|
- signed_in
|
|
@@ -1,152 +1,152 @@
|
|
|
1
|
-
/auth/{dbname}/update:
|
|
2
|
-
post:
|
|
3
|
-
tags:
|
|
4
|
-
- auth
|
|
5
|
-
summary: Update user details
|
|
6
|
-
description: Updates user account details
|
|
7
|
-
parameters:
|
|
8
|
-
- name: dbname
|
|
9
|
-
in: path
|
|
10
|
-
description: name of the database
|
|
11
|
-
required: true
|
|
12
|
-
schema:
|
|
13
|
-
type: string
|
|
14
|
-
example: mydb
|
|
15
|
-
requestBody:
|
|
16
|
-
description: user details to update
|
|
17
|
-
content:
|
|
18
|
-
'application/json':
|
|
19
|
-
schema:
|
|
20
|
-
type: object
|
|
21
|
-
properties:
|
|
22
|
-
uid:
|
|
23
|
-
type: string
|
|
24
|
-
description: (admin user only) to change a user's account settings, the target account `uid` must be passed with the request
|
|
25
|
-
is_disabled:
|
|
26
|
-
type: boolean
|
|
27
|
-
description: (admin user only) whether the target account should be disabled to enable/disable signin
|
|
28
|
-
email:
|
|
29
|
-
type: string
|
|
30
|
-
description: New email address
|
|
31
|
-
username:
|
|
32
|
-
type: string
|
|
33
|
-
description: New username
|
|
34
|
-
displayName:
|
|
35
|
-
type: string
|
|
36
|
-
description: Name of the user for public displaying purposes. Consider this a real name, alias or handle. (NOTE this property is equivalent to the deprecated `display_name`, both are allowed to be used from acebase-server v1.8.1)
|
|
37
|
-
display_name:
|
|
38
|
-
type: string
|
|
39
|
-
description: Name of the user for public displaying purposes. Consider this a real name, alias or handle. (NOTE this property deprecated, use `displayName` instead)
|
|
40
|
-
picture:
|
|
41
|
-
type: object
|
|
42
|
-
description: Profile picture
|
|
43
|
-
properties:
|
|
44
|
-
url:
|
|
45
|
-
type: string
|
|
46
|
-
width:
|
|
47
|
-
type: number
|
|
48
|
-
height:
|
|
49
|
-
type: number
|
|
50
|
-
example:
|
|
51
|
-
url: https://my.profile.pic/me.jpg
|
|
52
|
-
width: 500
|
|
53
|
-
height: 500
|
|
54
|
-
settings:
|
|
55
|
-
type: object
|
|
56
|
-
otherProperties: true
|
|
57
|
-
desciption: (optional) miscellanious other info to store with the user account
|
|
58
|
-
required:
|
|
59
|
-
- username
|
|
60
|
-
- email
|
|
61
|
-
- displayName
|
|
62
|
-
- password
|
|
63
|
-
responses:
|
|
64
|
-
200:
|
|
65
|
-
description: When update succeeds, it returns an object with the new user details
|
|
66
|
-
content:
|
|
67
|
-
'application/json':
|
|
68
|
-
schema:
|
|
69
|
-
type: object
|
|
70
|
-
properties:
|
|
71
|
-
user:
|
|
72
|
-
$ref: '#/components/schemas/User'
|
|
73
|
-
401:
|
|
74
|
-
description: If this is an unauthenticated request (not signed in), `"401 Unauthorized"` is returned
|
|
75
|
-
content:
|
|
76
|
-
'application/json':
|
|
77
|
-
schema:
|
|
78
|
-
type: object
|
|
79
|
-
properties:
|
|
80
|
-
code:
|
|
81
|
-
type: string
|
|
82
|
-
value: unauthenticated_update
|
|
83
|
-
message:
|
|
84
|
-
type: string
|
|
85
|
-
value: Sign in to change details
|
|
86
|
-
example:
|
|
87
|
-
code: unauthenticated_update
|
|
88
|
-
message: Sign in to change details
|
|
89
|
-
403:
|
|
90
|
-
description: If a non-admin user tries to update a user's account details, `"403 Forbidden"` is returned
|
|
91
|
-
content:
|
|
92
|
-
'application/json':
|
|
93
|
-
schema:
|
|
94
|
-
type: object
|
|
95
|
-
properties:
|
|
96
|
-
code:
|
|
97
|
-
type: string
|
|
98
|
-
value: unauthorized_update
|
|
99
|
-
message:
|
|
100
|
-
type: string
|
|
101
|
-
value: You are not authorized to perform this update. This attempt has been logged.
|
|
102
|
-
example:
|
|
103
|
-
code: unauthorized_update
|
|
104
|
-
message: You are not authorized to perform this update. This attempt has been logged.
|
|
105
|
-
404:
|
|
106
|
-
description: User account to update does not exist
|
|
107
|
-
content:
|
|
108
|
-
'application/json':
|
|
109
|
-
schema:
|
|
110
|
-
type: object
|
|
111
|
-
properties:
|
|
112
|
-
code:
|
|
113
|
-
type: string
|
|
114
|
-
value: user_not_found
|
|
115
|
-
message:
|
|
116
|
-
type: string
|
|
117
|
-
value: No user found with uid jld2cjxh0000qzrmn831i7rn
|
|
118
|
-
example:
|
|
119
|
-
code: user_not_found
|
|
120
|
-
message: No user found with uid jld2cjxh0000qzrmn831i7rn
|
|
121
|
-
422:
|
|
122
|
-
description: When the sent request details are incorrect, this "422 Unprocessable Entity" is returned
|
|
123
|
-
content:
|
|
124
|
-
'application/json':
|
|
125
|
-
schema:
|
|
126
|
-
type: object
|
|
127
|
-
properties:
|
|
128
|
-
code:
|
|
129
|
-
type: string
|
|
130
|
-
description: The exact error code
|
|
131
|
-
enum:
|
|
132
|
-
- invalid_email
|
|
133
|
-
- email_conflict
|
|
134
|
-
- invalid_username
|
|
135
|
-
- username_conflict
|
|
136
|
-
- invalid_display_name
|
|
137
|
-
- invalid_picture
|
|
138
|
-
- invalid_settings
|
|
139
|
-
example: user_not_found
|
|
140
|
-
message:
|
|
141
|
-
type: string
|
|
142
|
-
description: Description of the error
|
|
143
|
-
example: Account with email address exists already
|
|
144
|
-
example:
|
|
145
|
-
code: username_conflict
|
|
146
|
-
message: Account with username exists already
|
|
147
|
-
500:
|
|
148
|
-
description: An unenexpected error occurred on the server
|
|
149
|
-
content:
|
|
150
|
-
'application/json':
|
|
151
|
-
schema:
|
|
1
|
+
/auth/{dbname}/update:
|
|
2
|
+
post:
|
|
3
|
+
tags:
|
|
4
|
+
- auth
|
|
5
|
+
summary: Update user details
|
|
6
|
+
description: Updates user account details
|
|
7
|
+
parameters:
|
|
8
|
+
- name: dbname
|
|
9
|
+
in: path
|
|
10
|
+
description: name of the database
|
|
11
|
+
required: true
|
|
12
|
+
schema:
|
|
13
|
+
type: string
|
|
14
|
+
example: mydb
|
|
15
|
+
requestBody:
|
|
16
|
+
description: user details to update
|
|
17
|
+
content:
|
|
18
|
+
'application/json':
|
|
19
|
+
schema:
|
|
20
|
+
type: object
|
|
21
|
+
properties:
|
|
22
|
+
uid:
|
|
23
|
+
type: string
|
|
24
|
+
description: (admin user only) to change a user's account settings, the target account `uid` must be passed with the request
|
|
25
|
+
is_disabled:
|
|
26
|
+
type: boolean
|
|
27
|
+
description: (admin user only) whether the target account should be disabled to enable/disable signin
|
|
28
|
+
email:
|
|
29
|
+
type: string
|
|
30
|
+
description: New email address
|
|
31
|
+
username:
|
|
32
|
+
type: string
|
|
33
|
+
description: New username
|
|
34
|
+
displayName:
|
|
35
|
+
type: string
|
|
36
|
+
description: Name of the user for public displaying purposes. Consider this a real name, alias or handle. (NOTE this property is equivalent to the deprecated `display_name`, both are allowed to be used from acebase-server v1.8.1)
|
|
37
|
+
display_name:
|
|
38
|
+
type: string
|
|
39
|
+
description: Name of the user for public displaying purposes. Consider this a real name, alias or handle. (NOTE this property deprecated, use `displayName` instead)
|
|
40
|
+
picture:
|
|
41
|
+
type: object
|
|
42
|
+
description: Profile picture
|
|
43
|
+
properties:
|
|
44
|
+
url:
|
|
45
|
+
type: string
|
|
46
|
+
width:
|
|
47
|
+
type: number
|
|
48
|
+
height:
|
|
49
|
+
type: number
|
|
50
|
+
example:
|
|
51
|
+
url: https://my.profile.pic/me.jpg
|
|
52
|
+
width: 500
|
|
53
|
+
height: 500
|
|
54
|
+
settings:
|
|
55
|
+
type: object
|
|
56
|
+
otherProperties: true
|
|
57
|
+
desciption: (optional) miscellanious other info to store with the user account
|
|
58
|
+
required:
|
|
59
|
+
- username
|
|
60
|
+
- email
|
|
61
|
+
- displayName
|
|
62
|
+
- password
|
|
63
|
+
responses:
|
|
64
|
+
200:
|
|
65
|
+
description: When update succeeds, it returns an object with the new user details
|
|
66
|
+
content:
|
|
67
|
+
'application/json':
|
|
68
|
+
schema:
|
|
69
|
+
type: object
|
|
70
|
+
properties:
|
|
71
|
+
user:
|
|
72
|
+
$ref: '#/components/schemas/User'
|
|
73
|
+
401:
|
|
74
|
+
description: If this is an unauthenticated request (not signed in), `"401 Unauthorized"` is returned
|
|
75
|
+
content:
|
|
76
|
+
'application/json':
|
|
77
|
+
schema:
|
|
78
|
+
type: object
|
|
79
|
+
properties:
|
|
80
|
+
code:
|
|
81
|
+
type: string
|
|
82
|
+
value: unauthenticated_update
|
|
83
|
+
message:
|
|
84
|
+
type: string
|
|
85
|
+
value: Sign in to change details
|
|
86
|
+
example:
|
|
87
|
+
code: unauthenticated_update
|
|
88
|
+
message: Sign in to change details
|
|
89
|
+
403:
|
|
90
|
+
description: If a non-admin user tries to update a user's account details, `"403 Forbidden"` is returned
|
|
91
|
+
content:
|
|
92
|
+
'application/json':
|
|
93
|
+
schema:
|
|
94
|
+
type: object
|
|
95
|
+
properties:
|
|
96
|
+
code:
|
|
97
|
+
type: string
|
|
98
|
+
value: unauthorized_update
|
|
99
|
+
message:
|
|
100
|
+
type: string
|
|
101
|
+
value: You are not authorized to perform this update. This attempt has been logged.
|
|
102
|
+
example:
|
|
103
|
+
code: unauthorized_update
|
|
104
|
+
message: You are not authorized to perform this update. This attempt has been logged.
|
|
105
|
+
404:
|
|
106
|
+
description: User account to update does not exist
|
|
107
|
+
content:
|
|
108
|
+
'application/json':
|
|
109
|
+
schema:
|
|
110
|
+
type: object
|
|
111
|
+
properties:
|
|
112
|
+
code:
|
|
113
|
+
type: string
|
|
114
|
+
value: user_not_found
|
|
115
|
+
message:
|
|
116
|
+
type: string
|
|
117
|
+
value: No user found with uid jld2cjxh0000qzrmn831i7rn
|
|
118
|
+
example:
|
|
119
|
+
code: user_not_found
|
|
120
|
+
message: No user found with uid jld2cjxh0000qzrmn831i7rn
|
|
121
|
+
422:
|
|
122
|
+
description: When the sent request details are incorrect, this "422 Unprocessable Entity" is returned
|
|
123
|
+
content:
|
|
124
|
+
'application/json':
|
|
125
|
+
schema:
|
|
126
|
+
type: object
|
|
127
|
+
properties:
|
|
128
|
+
code:
|
|
129
|
+
type: string
|
|
130
|
+
description: The exact error code
|
|
131
|
+
enum:
|
|
132
|
+
- invalid_email
|
|
133
|
+
- email_conflict
|
|
134
|
+
- invalid_username
|
|
135
|
+
- username_conflict
|
|
136
|
+
- invalid_display_name
|
|
137
|
+
- invalid_picture
|
|
138
|
+
- invalid_settings
|
|
139
|
+
example: user_not_found
|
|
140
|
+
message:
|
|
141
|
+
type: string
|
|
142
|
+
description: Description of the error
|
|
143
|
+
example: Account with email address exists already
|
|
144
|
+
example:
|
|
145
|
+
code: username_conflict
|
|
146
|
+
message: Account with username exists already
|
|
147
|
+
500:
|
|
148
|
+
description: An unenexpected error occurred on the server
|
|
149
|
+
content:
|
|
150
|
+
'application/json':
|
|
151
|
+
schema:
|
|
152
152
|
$ref: '#/components/schemas/UnexpectedError'
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
/auth/{dbname}/verify_email:
|
|
2
|
-
post:
|
|
3
|
-
tags:
|
|
4
|
-
- auth
|
|
5
|
-
summary: Verifies an email address
|
|
6
|
-
description: Verifies an email address with a code sent through their email address
|
|
7
|
-
parameters:
|
|
8
|
-
- name: dbname
|
|
9
|
-
in: path
|
|
10
|
-
description: name of the database
|
|
11
|
-
required: true
|
|
12
|
-
schema:
|
|
13
|
-
type: string
|
|
14
|
-
example: mydb
|
|
15
|
-
requestBody:
|
|
16
|
-
description: verification object
|
|
17
|
-
content:
|
|
18
|
-
'application/json':
|
|
19
|
-
schema:
|
|
20
|
-
type: object
|
|
21
|
-
properties:
|
|
22
|
-
code:
|
|
23
|
-
type: string
|
|
24
|
-
description: Verification code that was sent to the user's email address
|
|
25
|
-
required:
|
|
26
|
-
- code
|
|
27
|
-
example:
|
|
28
|
-
code: ewrg235235g23gwrvsdb34g524rvqewwrv425gervqew...
|
|
29
|
-
responses:
|
|
30
|
-
200:
|
|
31
|
-
description: If the email address is successfully verified, returns the string `"OK"`
|
|
32
|
-
content:
|
|
33
|
-
'text/plain':
|
|
34
|
-
schema:
|
|
35
|
-
type: 'string'
|
|
36
|
-
value: OK
|
|
37
|
-
example: OK
|
|
38
|
-
description: The string `"OK"`
|
|
39
|
-
401:
|
|
40
|
-
description: Returns a `"401 Bad Request"` if the code sent with the request is invalid
|
|
41
|
-
content:
|
|
42
|
-
'application/json':
|
|
43
|
-
schema:
|
|
44
|
-
$ref: '#/components/schemas/Error'
|
|
45
|
-
example:
|
|
46
|
-
code: invalid_code
|
|
47
|
-
message: Invalid token
|
|
48
|
-
500:
|
|
49
|
-
description: An unexpected error occurred
|
|
50
|
-
content:
|
|
51
|
-
'application/json':
|
|
52
|
-
schema:
|
|
1
|
+
/auth/{dbname}/verify_email:
|
|
2
|
+
post:
|
|
3
|
+
tags:
|
|
4
|
+
- auth
|
|
5
|
+
summary: Verifies an email address
|
|
6
|
+
description: Verifies an email address with a code sent through their email address
|
|
7
|
+
parameters:
|
|
8
|
+
- name: dbname
|
|
9
|
+
in: path
|
|
10
|
+
description: name of the database
|
|
11
|
+
required: true
|
|
12
|
+
schema:
|
|
13
|
+
type: string
|
|
14
|
+
example: mydb
|
|
15
|
+
requestBody:
|
|
16
|
+
description: verification object
|
|
17
|
+
content:
|
|
18
|
+
'application/json':
|
|
19
|
+
schema:
|
|
20
|
+
type: object
|
|
21
|
+
properties:
|
|
22
|
+
code:
|
|
23
|
+
type: string
|
|
24
|
+
description: Verification code that was sent to the user's email address
|
|
25
|
+
required:
|
|
26
|
+
- code
|
|
27
|
+
example:
|
|
28
|
+
code: ewrg235235g23gwrvsdb34g524rvqewwrv425gervqew...
|
|
29
|
+
responses:
|
|
30
|
+
200:
|
|
31
|
+
description: If the email address is successfully verified, returns the string `"OK"`
|
|
32
|
+
content:
|
|
33
|
+
'text/plain':
|
|
34
|
+
schema:
|
|
35
|
+
type: 'string'
|
|
36
|
+
value: OK
|
|
37
|
+
example: OK
|
|
38
|
+
description: The string `"OK"`
|
|
39
|
+
401:
|
|
40
|
+
description: Returns a `"401 Bad Request"` if the code sent with the request is invalid
|
|
41
|
+
content:
|
|
42
|
+
'application/json':
|
|
43
|
+
schema:
|
|
44
|
+
$ref: '#/components/schemas/Error'
|
|
45
|
+
example:
|
|
46
|
+
code: invalid_code
|
|
47
|
+
message: Invalid token
|
|
48
|
+
500:
|
|
49
|
+
description: An unexpected error occurred
|
|
50
|
+
content:
|
|
51
|
+
'application/json':
|
|
52
|
+
schema:
|
|
53
53
|
$ref: '#/components/schemas/UnexpectedError'
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
/exists/{dbname}/{path}:
|
|
2
|
-
get:
|
|
3
|
-
tags:
|
|
4
|
-
- data
|
|
5
|
-
summary: Get existence of a path
|
|
6
|
-
description: Gets the existence of a path in the database
|
|
7
|
-
parameters:
|
|
8
|
-
- name: dbname
|
|
9
|
-
in: path
|
|
10
|
-
description: name of the database
|
|
11
|
-
required: true
|
|
12
|
-
schema:
|
|
13
|
-
type: string
|
|
14
|
-
example: mydb
|
|
15
|
-
- name: path
|
|
16
|
-
in: path
|
|
17
|
-
description: database path
|
|
18
|
-
required: true
|
|
19
|
-
schema:
|
|
20
|
-
type: string
|
|
21
|
-
example: collection/child/property
|
|
22
|
-
responses:
|
|
23
|
-
200:
|
|
24
|
-
description: returns whether the target path exists in the database
|
|
25
|
-
content:
|
|
26
|
-
'application/json':
|
|
27
|
-
schema:
|
|
28
|
-
type: object
|
|
29
|
-
properties:
|
|
30
|
-
exists:
|
|
31
|
-
type: boolean
|
|
32
|
-
example: true
|
|
33
|
-
403:
|
|
34
|
-
description: Returns a "403 Forbidden" if the signed in user is not allowed to read from the target path
|
|
35
|
-
content:
|
|
36
|
-
'application/json':
|
|
37
|
-
schema:
|
|
38
|
-
$ref: '#/components/schemas/Error'
|
|
39
|
-
500:
|
|
40
|
-
description: An unexpected error occurred
|
|
41
|
-
content:
|
|
42
|
-
'application/json':
|
|
43
|
-
schema:
|
|
44
|
-
$ref: '#/components/schemas/UnexpectedError'
|
|
1
|
+
/exists/{dbname}/{path}:
|
|
2
|
+
get:
|
|
3
|
+
tags:
|
|
4
|
+
- data
|
|
5
|
+
summary: Get existence of a path
|
|
6
|
+
description: Gets the existence of a path in the database
|
|
7
|
+
parameters:
|
|
8
|
+
- name: dbname
|
|
9
|
+
in: path
|
|
10
|
+
description: name of the database
|
|
11
|
+
required: true
|
|
12
|
+
schema:
|
|
13
|
+
type: string
|
|
14
|
+
example: mydb
|
|
15
|
+
- name: path
|
|
16
|
+
in: path
|
|
17
|
+
description: database path
|
|
18
|
+
required: true
|
|
19
|
+
schema:
|
|
20
|
+
type: string
|
|
21
|
+
example: collection/child/property
|
|
22
|
+
responses:
|
|
23
|
+
200:
|
|
24
|
+
description: returns whether the target path exists in the database
|
|
25
|
+
content:
|
|
26
|
+
'application/json':
|
|
27
|
+
schema:
|
|
28
|
+
type: object
|
|
29
|
+
properties:
|
|
30
|
+
exists:
|
|
31
|
+
type: boolean
|
|
32
|
+
example: true
|
|
33
|
+
403:
|
|
34
|
+
description: Returns a "403 Forbidden" if the signed in user is not allowed to read from the target path
|
|
35
|
+
content:
|
|
36
|
+
'application/json':
|
|
37
|
+
schema:
|
|
38
|
+
$ref: '#/components/schemas/Error'
|
|
39
|
+
500:
|
|
40
|
+
description: An unexpected error occurred
|
|
41
|
+
content:
|
|
42
|
+
'application/json':
|
|
43
|
+
schema:
|
|
44
|
+
$ref: '#/components/schemas/UnexpectedError'
|