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/developers/api-reference/events-api/index.md
+93-96Lines changed: 93 additions & 96 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -89,9 +89,11 @@ To minimize the impact, prior to switching to Asset-free Events, it is recommend
89
89
90
90
Event records in DataTrails are assigned UUIDs at creation time and referred to in all future API calls by a their unique identity in the format: `events/<event-id>`
91
91
92
-
#### Fetch Events by Identity
92
+
## Fetch Events by Identity
93
93
94
-
- Replace the `<event-id>` below, using the event-id from the created event above: `"identity": "events/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"`:
94
+
- Replace the `<event-id>` below, using the event-id from the created event above.
Use `top` and `skip` alongside `x-total-count` response header to navigate results. If sum of `skip` and number of results in response is less than the count of all results (this will be returned in`x-total-count` response header) there is more results to retrieve, to get next set of results sImply re-issue `/search` request with skip increased by number of results in current response.
180
-
181
-
- To fetch all Event records, simply create search document and save to a file `search.json`:
Use `top` and `skip` alongside `x-total-count` response header to navigate results.
197
+
If sum of `skip` and number of results in response is less than the count of all results (`x-total-count` in the response header) there are more results to retrieve.
198
+
To get the next set of results, re-issue the `/search` request with `skip` increased by number of results in current response.
202
199
203
-
If `x-total-count` response header has value greater than 10 (as indicated by value of `top`in`search.json`) modify `search.json` to the following:
200
+
If `x-total-count` response header has value greater than 2 (as indicated by value of `top` in `search.json`) modify `search.json` to the following:
204
201
205
202
```bash
206
203
cat > /tmp/search.json <<EOF
207
204
{
208
205
"filter": "",
209
-
"top": 10,
210
-
"skip": 10,
206
+
"top": 2,
207
+
"skip": 2
211
208
EOF
212
209
```
213
210
214
-
and `POST` to the same endpoint again to retrieve second page of results, and repeat this process until`skip` + number or results in response is equal `x-total-count`.
- Post to the `/events/search/` endpoint to retrieve another page of results, repeating this process until `skip` + number or results in the response is equal to `x-total-count`.
0 commit comments