acebase-server 1.18.2 → 1.19.1
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/middleware/admin-only.js +2 -1
- package/dist/cjs/middleware/user.js +1 -0
- package/dist/cjs/routes/auth-delete.js +3 -2
- package/dist/cjs/routes/auth-signup.js +11 -11
- package/dist/cjs/routes/auth-update.js +2 -1
- package/dist/cjs/routes/auth.js +0 -3
- 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 +4 -4
- package/dist/cjs/routes/data-set.js +4 -3
- package/dist/cjs/routes/data-transaction.js +4 -3
- package/dist/cjs/routes/data-update.js +4 -3
- package/dist/cjs/routes/docs.js +1 -1
- package/dist/cjs/routes/meta-info.js +3 -2
- package/dist/cjs/rules.js +2 -1
- package/dist/cjs/schema/user.js +2 -1
- package/dist/cjs/server.js +12 -3
- package/dist/cjs/settings/index.js +6 -0
- package/dist/cjs/shared/admin.js +8 -0
- package/dist/cjs/websocket/index.js +2 -1
- package/dist/esm/middleware/admin-only.js +2 -1
- package/dist/esm/middleware/user.js +1 -0
- package/dist/esm/routes/auth-delete.js +3 -2
- package/dist/esm/routes/auth-signup.js +4 -4
- package/dist/esm/routes/auth-update.js +2 -1
- package/dist/esm/routes/auth.js +0 -3
- 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 +3 -3
- package/dist/esm/routes/data-set.js +2 -1
- package/dist/esm/routes/data-transaction.js +2 -1
- package/dist/esm/routes/data-update.js +2 -1
- package/dist/esm/routes/docs.js +1 -1
- package/dist/esm/routes/meta-info.js +3 -2
- package/dist/esm/rules.js +2 -1
- package/dist/esm/schema/user.js +1 -0
- package/dist/esm/server.js +12 -3
- package/dist/esm/settings/index.js +6 -0
- package/dist/esm/shared/admin.js +4 -0
- package/dist/esm/websocket/index.js +1 -1
- package/dist/types/middleware/user.d.ts +1 -0
- package/dist/types/routes/auth-update.d.ts +2 -0
- package/dist/types/rules.d.ts +1 -1
- package/dist/types/schema/user.d.ts +4 -0
- package/dist/types/settings/index.d.ts +14 -2
- package/dist/types/shared/admin.d.ts +3 -0
- package/package.json +4 -5
- package/release_notes.md +4 -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,82 +1,82 @@
|
|
|
1
|
-
/transaction/{dbname}/finish:
|
|
2
|
-
post:
|
|
3
|
-
tags:
|
|
4
|
-
- data
|
|
5
|
-
summary: Finishes a transaction on a path
|
|
6
|
-
description: Finishes a transaction on a path in the database by overwriting it with a new value. NOTE this API endpoint is also available through the websocket connection, which is the preferred method. This API endpoint is provided for clients not supporting websockets, and those that don't have a websocket connection by choice or because of network limitations.
|
|
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: transaction details and the new value to store
|
|
17
|
-
content:
|
|
18
|
-
'application/json':
|
|
19
|
-
schema:
|
|
20
|
-
type: object
|
|
21
|
-
properties:
|
|
22
|
-
id:
|
|
23
|
-
type: string
|
|
24
|
-
description: transaction id returned by the _start_ endpoint
|
|
25
|
-
example: jld2cjxh0000qzrmn831i7rn
|
|
26
|
-
path:
|
|
27
|
-
type: string
|
|
28
|
-
description: the same path used in the _start_ endpoint call
|
|
29
|
-
example: collection/child/property
|
|
30
|
-
value:
|
|
31
|
-
$ref: '#/components/schemas/SerializedValue'
|
|
32
|
-
responses:
|
|
33
|
-
200:
|
|
34
|
-
description: If successful returns the string `"done"`
|
|
35
|
-
content:
|
|
36
|
-
'text/plain':
|
|
37
|
-
headers:
|
|
38
|
-
'AceBase-Context':
|
|
39
|
-
description: Returns the context that was passed to the transaction start endpoint, augmented with an `acebase_cursor` if transaction logging is enabled on the server.
|
|
40
|
-
schema:
|
|
41
|
-
type: string
|
|
42
|
-
example: '{ "acebase_cursor": "l3lf2iwd000109mgdn0d6pqt" }'
|
|
43
|
-
schema:
|
|
44
|
-
type: string
|
|
45
|
-
value: done
|
|
46
|
-
example: done
|
|
47
|
-
description: the string `"done"`
|
|
48
|
-
400:
|
|
49
|
-
description: Returns "400 Bad Request" if the sent value is incorrect
|
|
50
|
-
content:
|
|
51
|
-
'application/json':
|
|
52
|
-
schema:
|
|
53
|
-
$ref: '#/components/schemas/Error'
|
|
54
|
-
example:
|
|
55
|
-
code: invalid_serialized_value
|
|
56
|
-
message: The sent value is not properly serialized
|
|
57
|
-
403:
|
|
58
|
-
description: Returns "403 Forbidden" if the signed in user is not allowed to write to the target path
|
|
59
|
-
content:
|
|
60
|
-
'application/json':
|
|
61
|
-
schema:
|
|
62
|
-
$ref: '#/components/schemas/Error'
|
|
63
|
-
410:
|
|
64
|
-
description: Returns "410 Gone" if the specified transaction was not found, timed out, or the path does not match with the one provided in the _start_ endpoint.
|
|
65
|
-
content:
|
|
66
|
-
'text/plain':
|
|
67
|
-
schema:
|
|
68
|
-
type: string
|
|
69
|
-
value: transaction not found
|
|
70
|
-
example: transaction not found
|
|
71
|
-
422:
|
|
72
|
-
description: Returns "422 Unprocessable Entity" if schema validation for the sent value failed.
|
|
73
|
-
content:
|
|
74
|
-
'application/json':
|
|
75
|
-
schema:
|
|
76
|
-
$ref: '#/components/schemas/SchemaValidationError'
|
|
77
|
-
500:
|
|
78
|
-
description: An unexpected error occurred
|
|
79
|
-
content:
|
|
80
|
-
'application/json':
|
|
81
|
-
schema:
|
|
82
|
-
$ref: '#/components/schemas/UnexpectedError'
|
|
1
|
+
/transaction/{dbname}/finish:
|
|
2
|
+
post:
|
|
3
|
+
tags:
|
|
4
|
+
- data
|
|
5
|
+
summary: Finishes a transaction on a path
|
|
6
|
+
description: Finishes a transaction on a path in the database by overwriting it with a new value. NOTE this API endpoint is also available through the websocket connection, which is the preferred method. This API endpoint is provided for clients not supporting websockets, and those that don't have a websocket connection by choice or because of network limitations.
|
|
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: transaction details and the new value to store
|
|
17
|
+
content:
|
|
18
|
+
'application/json':
|
|
19
|
+
schema:
|
|
20
|
+
type: object
|
|
21
|
+
properties:
|
|
22
|
+
id:
|
|
23
|
+
type: string
|
|
24
|
+
description: transaction id returned by the _start_ endpoint
|
|
25
|
+
example: jld2cjxh0000qzrmn831i7rn
|
|
26
|
+
path:
|
|
27
|
+
type: string
|
|
28
|
+
description: the same path used in the _start_ endpoint call
|
|
29
|
+
example: collection/child/property
|
|
30
|
+
value:
|
|
31
|
+
$ref: '#/components/schemas/SerializedValue'
|
|
32
|
+
responses:
|
|
33
|
+
200:
|
|
34
|
+
description: If successful returns the string `"done"`
|
|
35
|
+
content:
|
|
36
|
+
'text/plain':
|
|
37
|
+
headers:
|
|
38
|
+
'AceBase-Context':
|
|
39
|
+
description: Returns the context that was passed to the transaction start endpoint, augmented with an `acebase_cursor` if transaction logging is enabled on the server.
|
|
40
|
+
schema:
|
|
41
|
+
type: string
|
|
42
|
+
example: '{ "acebase_cursor": "l3lf2iwd000109mgdn0d6pqt" }'
|
|
43
|
+
schema:
|
|
44
|
+
type: string
|
|
45
|
+
value: done
|
|
46
|
+
example: done
|
|
47
|
+
description: the string `"done"`
|
|
48
|
+
400:
|
|
49
|
+
description: Returns "400 Bad Request" if the sent value is incorrect
|
|
50
|
+
content:
|
|
51
|
+
'application/json':
|
|
52
|
+
schema:
|
|
53
|
+
$ref: '#/components/schemas/Error'
|
|
54
|
+
example:
|
|
55
|
+
code: invalid_serialized_value
|
|
56
|
+
message: The sent value is not properly serialized
|
|
57
|
+
403:
|
|
58
|
+
description: Returns "403 Forbidden" if the signed in user is not allowed to write to the target path
|
|
59
|
+
content:
|
|
60
|
+
'application/json':
|
|
61
|
+
schema:
|
|
62
|
+
$ref: '#/components/schemas/Error'
|
|
63
|
+
410:
|
|
64
|
+
description: Returns "410 Gone" if the specified transaction was not found, timed out, or the path does not match with the one provided in the _start_ endpoint.
|
|
65
|
+
content:
|
|
66
|
+
'text/plain':
|
|
67
|
+
schema:
|
|
68
|
+
type: string
|
|
69
|
+
value: transaction not found
|
|
70
|
+
example: transaction not found
|
|
71
|
+
422:
|
|
72
|
+
description: Returns "422 Unprocessable Entity" if schema validation for the sent value failed.
|
|
73
|
+
content:
|
|
74
|
+
'application/json':
|
|
75
|
+
schema:
|
|
76
|
+
$ref: '#/components/schemas/SchemaValidationError'
|
|
77
|
+
500:
|
|
78
|
+
description: An unexpected error occurred
|
|
79
|
+
content:
|
|
80
|
+
'application/json':
|
|
81
|
+
schema:
|
|
82
|
+
$ref: '#/components/schemas/UnexpectedError'
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
/transaction/{dbname}/start:
|
|
2
|
-
post:
|
|
3
|
-
tags:
|
|
4
|
-
- data
|
|
5
|
-
summary: Starts a transaction on a path
|
|
6
|
-
description: Starts a transaction on a path in the database by returning its current value, locking it until the _finish_ endpoint is called. NOTE this API endpoint is also available through the websocket connection, which is the preferred method. This API endpoint is provided for clients not supporting websockets, and those that don't have a websocket connection by choice or because of network limitations.
|
|
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: AceBase-Context
|
|
16
|
-
in: header
|
|
17
|
-
description: Contextual info about the database operation (must be valid JSON). This info is included in event notifications sent to clients watching data at this or child paths
|
|
18
|
-
schema:
|
|
19
|
-
type: string
|
|
20
|
-
example: {}
|
|
21
|
-
requestBody:
|
|
22
|
-
description: path to start the transaction on
|
|
23
|
-
content:
|
|
24
|
-
'application/json':
|
|
25
|
-
schema:
|
|
26
|
-
type: object
|
|
27
|
-
properties:
|
|
28
|
-
path:
|
|
29
|
-
type: string
|
|
30
|
-
description: database path
|
|
31
|
-
example:
|
|
32
|
-
path: collection/child/property
|
|
33
|
-
responses:
|
|
34
|
-
200:
|
|
35
|
-
description: returns an object with the transaction id, and the current (serialized) value of the given path
|
|
36
|
-
content:
|
|
37
|
-
'application/json':
|
|
38
|
-
schema:
|
|
39
|
-
type: object
|
|
40
|
-
properties:
|
|
41
|
-
id:
|
|
42
|
-
type: string
|
|
43
|
-
description: transaction id
|
|
44
|
-
example: jld2cjxh0000qzrmn831i7rn
|
|
45
|
-
value:
|
|
46
|
-
$ref: '#/components/schemas/SerializedValue'
|
|
47
|
-
403:
|
|
48
|
-
description: Returns a "403 Forbidden" if the signed in user is not allowed to write to the target path
|
|
49
|
-
content:
|
|
50
|
-
'application/json':
|
|
51
|
-
schema:
|
|
52
|
-
$ref: '#/components/schemas/Error'
|
|
53
|
-
500:
|
|
54
|
-
description: An unexpected error occurred
|
|
55
|
-
content:
|
|
56
|
-
'application/json':
|
|
57
|
-
schema:
|
|
58
|
-
$ref: '#/components/schemas/UnexpectedError'
|
|
1
|
+
/transaction/{dbname}/start:
|
|
2
|
+
post:
|
|
3
|
+
tags:
|
|
4
|
+
- data
|
|
5
|
+
summary: Starts a transaction on a path
|
|
6
|
+
description: Starts a transaction on a path in the database by returning its current value, locking it until the _finish_ endpoint is called. NOTE this API endpoint is also available through the websocket connection, which is the preferred method. This API endpoint is provided for clients not supporting websockets, and those that don't have a websocket connection by choice or because of network limitations.
|
|
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: AceBase-Context
|
|
16
|
+
in: header
|
|
17
|
+
description: Contextual info about the database operation (must be valid JSON). This info is included in event notifications sent to clients watching data at this or child paths
|
|
18
|
+
schema:
|
|
19
|
+
type: string
|
|
20
|
+
example: {}
|
|
21
|
+
requestBody:
|
|
22
|
+
description: path to start the transaction on
|
|
23
|
+
content:
|
|
24
|
+
'application/json':
|
|
25
|
+
schema:
|
|
26
|
+
type: object
|
|
27
|
+
properties:
|
|
28
|
+
path:
|
|
29
|
+
type: string
|
|
30
|
+
description: database path
|
|
31
|
+
example:
|
|
32
|
+
path: collection/child/property
|
|
33
|
+
responses:
|
|
34
|
+
200:
|
|
35
|
+
description: returns an object with the transaction id, and the current (serialized) value of the given path
|
|
36
|
+
content:
|
|
37
|
+
'application/json':
|
|
38
|
+
schema:
|
|
39
|
+
type: object
|
|
40
|
+
properties:
|
|
41
|
+
id:
|
|
42
|
+
type: string
|
|
43
|
+
description: transaction id
|
|
44
|
+
example: jld2cjxh0000qzrmn831i7rn
|
|
45
|
+
value:
|
|
46
|
+
$ref: '#/components/schemas/SerializedValue'
|
|
47
|
+
403:
|
|
48
|
+
description: Returns a "403 Forbidden" if the signed in user is not allowed to write to the target path
|
|
49
|
+
content:
|
|
50
|
+
'application/json':
|
|
51
|
+
schema:
|
|
52
|
+
$ref: '#/components/schemas/Error'
|
|
53
|
+
500:
|
|
54
|
+
description: An unexpected error occurred
|
|
55
|
+
content:
|
|
56
|
+
'application/json':
|
|
57
|
+
schema:
|
|
58
|
+
$ref: '#/components/schemas/UnexpectedError'
|
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
/data/{dbname}/{path}:
|
|
2
|
-
post:
|
|
3
|
-
tags:
|
|
4
|
-
- data
|
|
5
|
-
summary: Update the value of a path
|
|
6
|
-
description: Updates the stored value of a path in the database. If the value is an object, only the given properties are overwritten
|
|
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
|
-
- name: AceBase-Context
|
|
23
|
-
in: header
|
|
24
|
-
description: Contextual info about the database operation (must be valid JSON). This info is included in event notifications sent to clients watching data at this or child paths
|
|
25
|
-
schema:
|
|
26
|
-
type: string
|
|
27
|
-
example: '{}'
|
|
28
|
-
requestBody:
|
|
29
|
-
description: serialized value to store in the database
|
|
30
|
-
content:
|
|
31
|
-
'application/json':
|
|
32
|
-
schema:
|
|
33
|
-
$ref: '#/components/schemas/SerializedValue'
|
|
34
|
-
responses:
|
|
35
|
-
200:
|
|
36
|
-
description: Returns "200 OK" when the database operation succeeded
|
|
37
|
-
content:
|
|
38
|
-
'application/json':
|
|
39
|
-
headers:
|
|
40
|
-
'AceBase-Context':
|
|
41
|
-
description: Returns contextual information, such as the `acebase_cursor` if transaction logging is enabled on the server.
|
|
42
|
-
schema:
|
|
43
|
-
type: string
|
|
44
|
-
example: '{ "acebase_cursor": "l3lf2iwd000109mgdn0d6pqt" }'
|
|
45
|
-
schema:
|
|
46
|
-
type: object
|
|
47
|
-
properties:
|
|
48
|
-
success:
|
|
49
|
-
type: boolean
|
|
50
|
-
example: true
|
|
51
|
-
400:
|
|
52
|
-
description: Returns "400 Bad Request" if the sent value is incorrect
|
|
53
|
-
content:
|
|
54
|
-
'application/json':
|
|
55
|
-
schema:
|
|
56
|
-
$ref: '#/components/schemas/Error'
|
|
57
|
-
example:
|
|
58
|
-
code: invalid_serialized_value
|
|
59
|
-
message: The sent value is not properly serialized
|
|
60
|
-
403:
|
|
61
|
-
description: Returns "403 Forbidden" if the signed in user is not allowed to write to the target path
|
|
62
|
-
content:
|
|
63
|
-
'application/json':
|
|
64
|
-
schema:
|
|
65
|
-
$ref: '#/components/schemas/RuleValidationError'
|
|
66
|
-
422:
|
|
67
|
-
description: Returns "422 Unprocessable Entity" if schema validation for the sent value failed.
|
|
68
|
-
content:
|
|
69
|
-
'application/json':
|
|
70
|
-
schema:
|
|
71
|
-
$ref: '#/components/schemas/SchemaValidationError'
|
|
72
|
-
500:
|
|
73
|
-
description: An unexpected error occurred
|
|
74
|
-
content:
|
|
75
|
-
'application/json':
|
|
76
|
-
schema:
|
|
77
|
-
$ref: '#/components/schemas/UnexpectedError'
|
|
1
|
+
/data/{dbname}/{path}:
|
|
2
|
+
post:
|
|
3
|
+
tags:
|
|
4
|
+
- data
|
|
5
|
+
summary: Update the value of a path
|
|
6
|
+
description: Updates the stored value of a path in the database. If the value is an object, only the given properties are overwritten
|
|
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
|
+
- name: AceBase-Context
|
|
23
|
+
in: header
|
|
24
|
+
description: Contextual info about the database operation (must be valid JSON). This info is included in event notifications sent to clients watching data at this or child paths
|
|
25
|
+
schema:
|
|
26
|
+
type: string
|
|
27
|
+
example: '{}'
|
|
28
|
+
requestBody:
|
|
29
|
+
description: serialized value to store in the database
|
|
30
|
+
content:
|
|
31
|
+
'application/json':
|
|
32
|
+
schema:
|
|
33
|
+
$ref: '#/components/schemas/SerializedValue'
|
|
34
|
+
responses:
|
|
35
|
+
200:
|
|
36
|
+
description: Returns "200 OK" when the database operation succeeded
|
|
37
|
+
content:
|
|
38
|
+
'application/json':
|
|
39
|
+
headers:
|
|
40
|
+
'AceBase-Context':
|
|
41
|
+
description: Returns contextual information, such as the `acebase_cursor` if transaction logging is enabled on the server.
|
|
42
|
+
schema:
|
|
43
|
+
type: string
|
|
44
|
+
example: '{ "acebase_cursor": "l3lf2iwd000109mgdn0d6pqt" }'
|
|
45
|
+
schema:
|
|
46
|
+
type: object
|
|
47
|
+
properties:
|
|
48
|
+
success:
|
|
49
|
+
type: boolean
|
|
50
|
+
example: true
|
|
51
|
+
400:
|
|
52
|
+
description: Returns "400 Bad Request" if the sent value is incorrect
|
|
53
|
+
content:
|
|
54
|
+
'application/json':
|
|
55
|
+
schema:
|
|
56
|
+
$ref: '#/components/schemas/Error'
|
|
57
|
+
example:
|
|
58
|
+
code: invalid_serialized_value
|
|
59
|
+
message: The sent value is not properly serialized
|
|
60
|
+
403:
|
|
61
|
+
description: Returns "403 Forbidden" if the signed in user is not allowed to write to the target path
|
|
62
|
+
content:
|
|
63
|
+
'application/json':
|
|
64
|
+
schema:
|
|
65
|
+
$ref: '#/components/schemas/RuleValidationError'
|
|
66
|
+
422:
|
|
67
|
+
description: Returns "422 Unprocessable Entity" if schema validation for the sent value failed.
|
|
68
|
+
content:
|
|
69
|
+
'application/json':
|
|
70
|
+
schema:
|
|
71
|
+
$ref: '#/components/schemas/SchemaValidationError'
|
|
72
|
+
500:
|
|
73
|
+
description: An unexpected error occurred
|
|
74
|
+
content:
|
|
75
|
+
'application/json':
|
|
76
|
+
schema:
|
|
77
|
+
$ref: '#/components/schemas/UnexpectedError'
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/info/{dbname}:
|
|
2
|
-
get:
|
|
3
|
-
tags:
|
|
4
|
-
- metadata
|
|
5
|
-
summary: Get server info
|
|
6
|
-
description: Returns info about the server, such as version, current date/time and process id. When signed in as the admin user, info about the platform, cpu, memory, and network will also be included
|
|
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 server information
|
|
18
|
-
content:
|
|
19
|
-
'application/json':
|
|
20
|
-
schema:
|
|
21
|
-
type: object
|
|
22
|
-
properties:
|
|
23
|
-
version:
|
|
24
|
-
type: string
|
|
25
|
-
example: 1.10.0
|
|
26
|
-
summary: server version number
|
|
27
|
-
time:
|
|
28
|
-
type: number
|
|
29
|
-
example: 868
|
|
30
|
-
summary: unix timestamp (ms since Jan 1, 1970)
|
|
31
|
-
process:
|
|
32
|
-
type: integer
|
|
33
|
-
example: 465
|
|
34
|
-
summary: process number
|
|
35
|
-
500:
|
|
36
|
-
description: Returns the server error
|
|
37
|
-
content:
|
|
38
|
-
'text/plain':
|
|
39
|
-
schema:
|
|
40
|
-
type: string
|
|
1
|
+
/info/{dbname}:
|
|
2
|
+
get:
|
|
3
|
+
tags:
|
|
4
|
+
- metadata
|
|
5
|
+
summary: Get server info
|
|
6
|
+
description: Returns info about the server, such as version, current date/time and process id. When signed in as the admin user, info about the platform, cpu, memory, and network will also be included
|
|
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 server information
|
|
18
|
+
content:
|
|
19
|
+
'application/json':
|
|
20
|
+
schema:
|
|
21
|
+
type: object
|
|
22
|
+
properties:
|
|
23
|
+
version:
|
|
24
|
+
type: string
|
|
25
|
+
example: 1.10.0
|
|
26
|
+
summary: server version number
|
|
27
|
+
time:
|
|
28
|
+
type: number
|
|
29
|
+
example: 868
|
|
30
|
+
summary: unix timestamp (ms since Jan 1, 1970)
|
|
31
|
+
process:
|
|
32
|
+
type: integer
|
|
33
|
+
example: 465
|
|
34
|
+
summary: process number
|
|
35
|
+
500:
|
|
36
|
+
description: Returns the server error
|
|
37
|
+
content:
|
|
38
|
+
'text/plain':
|
|
39
|
+
schema:
|
|
40
|
+
type: string
|
|
41
41
|
example: Some error message
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/ping/{dbname}:
|
|
2
|
-
get:
|
|
3
|
-
tags:
|
|
4
|
-
- metadata
|
|
5
|
-
summary: Ping the server
|
|
6
|
-
description: Ping endpoint to test connectivity with the server. Returns `"pong"`
|
|
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 the string `"pong"`
|
|
18
|
-
content:
|
|
19
|
-
'text/plain':
|
|
20
|
-
schema:
|
|
21
|
-
type: string
|
|
22
|
-
value: pong
|
|
1
|
+
/ping/{dbname}:
|
|
2
|
+
get:
|
|
3
|
+
tags:
|
|
4
|
+
- metadata
|
|
5
|
+
summary: Ping the server
|
|
6
|
+
description: Ping endpoint to test connectivity with the server. Returns `"pong"`
|
|
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 the string `"pong"`
|
|
18
|
+
content:
|
|
19
|
+
'text/plain':
|
|
20
|
+
schema:
|
|
21
|
+
type: string
|
|
22
|
+
value: pong
|
|
23
23
|
example: pong
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/stats/{dbname}:
|
|
2
|
-
get:
|
|
3
|
-
tags:
|
|
4
|
-
- metadata
|
|
5
|
-
summary: Get basic database statistics
|
|
6
|
-
description: Returns basic statistics about 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
|
-
responses:
|
|
16
|
-
200:
|
|
17
|
-
description: Returns basic database statistics
|
|
18
|
-
content:
|
|
19
|
-
'application/json':
|
|
20
|
-
schema:
|
|
21
|
-
type: object
|
|
22
|
-
properties:
|
|
23
|
-
writes:
|
|
24
|
-
type: integer
|
|
25
|
-
example: 154
|
|
26
|
-
reads:
|
|
27
|
-
type: integer
|
|
28
|
-
example: 868
|
|
29
|
-
bytesRead:
|
|
30
|
-
type: integer
|
|
31
|
-
example: 78480
|
|
32
|
-
bytesWritten:
|
|
33
|
-
type: integer
|
|
34
|
-
example: 12560
|
|
35
|
-
500:
|
|
36
|
-
description: Returns the server error
|
|
37
|
-
content:
|
|
38
|
-
'text/plain':
|
|
39
|
-
schema:
|
|
40
|
-
type: string
|
|
1
|
+
/stats/{dbname}:
|
|
2
|
+
get:
|
|
3
|
+
tags:
|
|
4
|
+
- metadata
|
|
5
|
+
summary: Get basic database statistics
|
|
6
|
+
description: Returns basic statistics about 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
|
+
responses:
|
|
16
|
+
200:
|
|
17
|
+
description: Returns basic database statistics
|
|
18
|
+
content:
|
|
19
|
+
'application/json':
|
|
20
|
+
schema:
|
|
21
|
+
type: object
|
|
22
|
+
properties:
|
|
23
|
+
writes:
|
|
24
|
+
type: integer
|
|
25
|
+
example: 154
|
|
26
|
+
reads:
|
|
27
|
+
type: integer
|
|
28
|
+
example: 868
|
|
29
|
+
bytesRead:
|
|
30
|
+
type: integer
|
|
31
|
+
example: 78480
|
|
32
|
+
bytesWritten:
|
|
33
|
+
type: integer
|
|
34
|
+
example: 12560
|
|
35
|
+
500:
|
|
36
|
+
description: Returns the server error
|
|
37
|
+
content:
|
|
38
|
+
'text/plain':
|
|
39
|
+
schema:
|
|
40
|
+
type: string
|
|
41
41
|
example: Some error message
|