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
@@ -43,7 +43,7 @@ The key in the `data` object indicates the type of the value:
43
43
44
44
### Get the entire object <aid="fetching-object-get"/>
45
45
46
-
The following request returns the entrie object tree.
46
+
The following request returns the entire channel object.
47
47
48
48
<Code>
49
49
```shell
@@ -52,27 +52,24 @@ The following request returns the entrie object tree.
52
52
```
53
53
</Code>
54
54
55
-
This endpoint by default returns the compact representation of the object tree.
55
+
This endpoint returns the compact representation of the channel object.
56
56
57
57
<Code>
58
58
```json
59
59
{
60
-
"poll": {
61
-
"name": "First Poll"
62
-
"votes": {
63
-
"down": 10,
64
-
"up": 5,
65
-
}
60
+
"votes": {
61
+
"down": 10,
62
+
"up": 5,
66
63
}
67
64
}
68
65
```
69
66
</Code>
70
67
71
-
#### Get the entire object with metatdata <aid="fetching-object"/>
68
+
Each instance of an [object type](/docs/liveobjects/concepts/objects#object-types) included is the response is counted as one billable message.
72
69
73
-
By providing the `compact=false` query param the response will contain the full object representation including the
74
-
objectIds.
70
+
#### Get the entire object with metadata <aid="fetching-object"/>
75
71
72
+
You can optionally include additional object [metadata](/docs/liveobjects/concepts/objects#metadata) in the response by specifying the `compact=false` query option:
Both these requests are billed per object returned.
142
-
143
124
#### Get a subset of the object <aid="fetch-object-with-path"/>
144
125
145
-
You can return a subset of the object tree by specifying the `path` query param. For example, to return just the `poll``LiveMap` instance from the root object:
126
+
You can return a subset of the channel object by specifying the `path` query param. For example, to return just the `votes``LiveMap` instance from the root object:
For both the full object and the compact response formats cyclic references in the object tree will be included as a
237
+
For both the full object and the compact response formats cyclic references in the channel object will be included as a
279
238
reference to the object ID rather than including the same object in the response more than once.
280
239
281
-
For example, if we created a cycle in the object tree by adding a reference to the root object in the `poll``LiveMap` instance with the following operation:
240
+
For example, if we created a cycle in the channel object by adding a reference to the root object in the `votes``LiveMap` instance with the following operation:
282
241
283
242
<Code>
284
243
```shell
@@ -287,7 +246,7 @@ For example, if we created a cycle in the object tree by adding a reference to t
@@ -305,15 +264,12 @@ The response will handle the cyclic reference by including the `myRoot` key in t
305
264
<Code>
306
265
```json
307
266
{
308
-
"poll": {
267
+
"votes": {
268
+
"down": 5,
269
+
"up": 10
309
270
"myRoot": {
310
271
"objectId": "root"
311
272
},
312
-
"title": "first poll",
313
-
"votes": {
314
-
"down": 5,
315
-
"up": 10
316
-
}
317
273
}
318
274
}
319
275
```
@@ -393,13 +349,13 @@ The response includes the ID of the published operation message, the channel and
393
349
394
350
### Update an object by path <aid="updating-objects-by-path"/>
395
351
396
-
Path operations provide a convenient way to target objects based on their location in the object tree.
352
+
Path operations provide a convenient way to target objects based on their location in the channel object.
397
353
398
-
Paths are expressed relative to the structure of the object as defined by the [compact](#fetching-objects-compact) view of the object tree.
354
+
Paths are expressed relative to the structure of the object as defined by the [compact](#fetching-objects-compact) view of the channel object.
399
355
400
-
For example, given the following compact view of the object tree:
356
+
For example, given the following compact view of the channel object:
401
357
402
-
The following example increments the `LiveCounter` instance stored at the `up` key on the `votes``LiveMap`instance on the root object:
358
+
The following example increments the `LiveCounter` instance stored at the `up` key on the `votes``LiveMap` object:
403
359
404
360
<Code>
405
361
```shell
@@ -408,7 +364,7 @@ The following example increments the `LiveCounter` instance stored at the `up` k
408
364
-H "Content-Type: application/json" \
409
365
-d '{
410
366
"operation": "COUNTER_INC",
411
-
"path": "poll.votes.up",
367
+
"path": "votes.up",
412
368
"data": { "number": 1 }
413
369
}'
414
370
```
@@ -450,7 +406,7 @@ The response includes the IDs of each of the affected object instances:
450
406
```
451
407
</Code>
452
408
453
-
Wildcards can be included at the end or in the middle of paths and will match exactly one level in the object tree. For example, given the following compact view of the object tree:
409
+
Wildcards can be included at the end or in the middle of paths and will match exactly one level in the channel object. For example, given the following compact view of the channel object:
454
410
455
411
<Code>
456
412
```json
@@ -533,9 +489,9 @@ For `COUNTER_CREATE`, the `data` field should be a JSON object that contains the
533
489
```
534
490
</Code>
535
491
536
-
When you create a new object it is important that the new object is assigned to the object tree so that it is [reachable](/docs/liveobjects/concepts/object#reachability) from the root object.
492
+
When you create a new object it is important that the new object instance is assigned to the channel object so that it is [reachable](/docs/liveobjects/concepts/object#reachability).
537
493
538
-
The simplest way to do this is to use the `path` field in the request body. The path is relative to the root object and specifies where in the object tree the new object should be created.
494
+
The simplest way to do this is to use the `path` field in the request body. The path is relative to the root object and specifies where in the channel object the new object should be created.
539
495
540
496
The following example creates a new `LiveMap` instance and assigns it to the `posts``LiveMap` instance on the root object under the key `post1`:
541
497
@@ -574,8 +530,6 @@ The following example shows how to update a key and value in a `LiveMap`:
574
530
```
575
531
</Code>
576
532
577
-
Note in this example if the key `title` didn't exist it would have been created and set by this operation.
578
-
579
533
When using the `path` specifier with a `COUNTER_CREATE` or `MAP_CREATE` operation, the server constructs *two* operations which are published as a [batch](#batch-operations):
580
534
581
535
* A `MAP_CREATE` or `COUNTER_CREATE` operation used to create the new object
0 commit comments