You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/technical/api/db/_index.en.md
+28-28
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ menu:
9
9
10
10
{{< toc-en >}}
11
11
12
-
# Retrieve objects
12
+
##Retrieve objects
13
13
GET /api/v1/db/<objecttype>/<mask>/<id>?token=<token>[&version=<version>[&schemaversion=<schemaversion>]][&format=<format>][&skip_reverse_nested=<skip_reverse_nested>]
14
14
Object by object ID (`<objecttype>._id` field). One object in the resulting array.
15
15
@@ -22,7 +22,7 @@ Object by system object ID (`_system_object_id` field). One object in the result
22
22
GET /api/v1/db/<objecttype>/<mask>/list?token=<token>[&limit=<limit>][&offset=<offset>][&version=<version>[&schemaversion=<schemaversion>]][&format=<format>][&skip_reverse_nested=<skip_reverse_nested>]
23
23
List of objects, sorted ascending by object IDs (length of array controlled by parameters `limit` and `offset`). Multiple objects in the resulting array.
24
24
25
-
## Path parameters
25
+
###Path parameters
26
26
27
27
|||
28
28
|---|---|
@@ -40,24 +40,24 @@ If the given `mask` does not exist in the schema for the given object version, a
40
40
41
41
If no schema for the given object `version` is found, an [Old Schema Missing](/en/technical/errors) error is returned.
42
42
43
-
## Query String
43
+
###Query String
44
44
45
45
|||
46
46
|---|---|
47
47
|`token`| Session token acquired with [/api/v1/session](/en/technical/api/session)|
48
48
49
-
## Output
49
+
###Output
50
50
51
51
Array of [objects](/en/technical/types/object) in the requested format.
52
52
53
-
## Permissions
53
+
###Permissions
54
54
55
55
The user needs the "read" right for the requested object and the "mask" right for the given mask
56
56
(see [rights management](/en/technical/rightsmanagement)).
57
57
58
58
In order to use the "\_all\_fields" mask, the user needs any of the following system rights: "system.root", "system.datamodel.development", "system.datamodel.commit".
59
59
60
-
## HTTP status codes
60
+
###HTTP status codes
61
61
62
62
|||
63
63
|---|---|
@@ -73,19 +73,19 @@ In order to use the "\_all\_fields" mask, the user needs any of the following sy
73
73
| 400 |[Old Mask Missing](/en/technical/errors): the given `mask` does not exist in the given `schemaversion`|
74
74
| 500 |[Server error](/en/technical/errors): internal server error |
75
75
76
-
# Retrieve all versions of objects
76
+
##Retrieve all versions of objects
77
77
78
78
GET /api/v1/db/<objecttype>/_all_fields?token=<token>&all_versions=true[&limit=<limit>][&offset=<offset>]
79
79
80
80
Returns all versions of all objects of this type, not filtered by any mask.
81
81
82
-
## Path parameters
82
+
###Path parameters
83
83
84
84
|||
85
85
|---|---|
86
86
|`objecttype`| Object type (string) |
87
87
88
-
## Query String
88
+
###Query String
89
89
90
90
|||
91
91
|---|---|
@@ -94,7 +94,7 @@ Returns all versions of all objects of this type, not filtered by any mask.
94
94
|`limit`| limit of objects (not versions) returned, defaults to `1000`|
95
95
|`offset`| offset of first object to retrieve, defaults to `0`|
96
96
97
-
## Output
97
+
###Output
98
98
99
99
Array of [objects](/en/technical/types/object) as above, ordered by object ID and version number. These differences to the single-version output exist:
100
100
@@ -105,15 +105,15 @@ Array of [objects](/en/technical/types/object) as above, ordered by object ID an
105
105
* the `_owner` field is simplified, no names but only ID of user or group is included (format and `_basetype` marker are kept compatible)
106
106
* there is no changelog
107
107
108
-
## Permissions
108
+
###Permissions
109
109
110
110
The system right `system.root` is required to use this request.
111
111
112
-
## HTTP status codes
112
+
###HTTP status codes
113
113
114
114
See single-version object retrieval for possible HTTP status codes.
Creates or updates objects for the given `objecttype`.
@@ -137,13 +137,13 @@ The objects will be created and inserted in the collection. The owner of the obj
137
137
138
138
Notice: POST for masks with mask filters is not allowed.
139
139
140
-
## Path parameters
140
+
###Path parameters
141
141
142
142
|||
143
143
|---|---|
144
144
|`objecttype`| Object type (string) |
145
145
146
-
## Query String
146
+
###Query String
147
147
148
148
|||
149
149
|---|---|
@@ -160,7 +160,7 @@ Notice: POST for masks with mask filters is not allowed.
160
160
|`base_fields_only`| If set to "1", use "base fields only" mode |
161
161
|`progress_uuid`| If this variable is set, API_PROGRESS events will be generated during the operation, the `progress_uuid` can then be used to match the events to the operation |
162
162
163
-
## Input
163
+
###Input
164
164
165
165
Array of [objects](/en/technical/types/object). The following restrictions apply:
166
166
@@ -173,7 +173,7 @@ Array of [objects](/en/technical/types/object). The following restrictions apply
173
173
174
174
> `_id` and `_id_parent` can be set using a lookup feature, which selects the object using a reference column. More information about this feature can be found in the [Lookups for IDs](/en/technical/datamanagement/lookups/) documentation.
175
175
176
-
### Creation or regular update
176
+
####Creation or regular update
177
177
178
178
The object is updated as a whole. That means that if the user only wants to change the value of a certain field,
179
179
all other fields must be sent with their current values. Exceptions to this rule are:
@@ -184,7 +184,7 @@ all other fields must be sent with their current values. Exceptions to this rule
184
184
When creating an object, the owner must be the user that creates it. If `_owner` is left out, Easydb will fill this value.
185
185
When using the `collection` parameter, the owner is automatically set to the owner of the collection.
186
186
187
-
### Group edit
187
+
####Group edit
188
188
189
189
In group edit mode, only the given fields will be updated. Special instructions can be specified for lists:
190
190
@@ -234,11 +234,11 @@ have the following values:
234
234
235
235
The mode **acl_remove_all** can be specified without `_acl` (if specified, it will be ignored).
236
236
237
-
## Output
237
+
###Output
238
238
239
239
If the request is a group edit or "base fields only", the response body will be empty. Otherwise, it is an array of [objects](/en/technical/types/object) in the requested format.
240
240
241
-
## Permissions
241
+
###Permissions
242
242
243
243
The user needs the following rights at the beginning of the operation (see [rights management](/en/technical/rightsmanagement)):
244
244
@@ -273,13 +273,13 @@ before they are inserted. Furthermore, they must be grantable. Otherwise, an err
273
273
274
274
The root pool is never allowed.
275
275
276
-
## Example
276
+
###Example
277
277
278
278
279
279
{{< include_json "./post.json" >}}
280
280
281
281
282
-
## HTTP status codes
282
+
###HTTP status codes
283
283
284
284
|||
285
285
|---|---|
@@ -317,7 +317,7 @@ The root pool is never allowed.
0 commit comments