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: README.md
+15-1Lines changed: 15 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -329,7 +329,7 @@ If enabled, filters are applied to the following endpoints:
329
329
-**Applied Filter:**`ITEMS_FILTER`
330
330
-**Strategy:** Validate items in body with generated CQL2 query.
331
331
332
-
#### Example GET Request Flow
332
+
#### Example Request Flow for multi-record endpoints
333
333
334
334
```mermaid
335
335
sequenceDiagram
@@ -341,6 +341,20 @@ sequenceDiagram
341
341
STAC API->>Client: Response
342
342
```
343
343
344
+
#### Example Request Flow for single-record endpoints
345
+
346
+
The Filter Extension does not apply to fetching individual records. As such, we must validate the record _after_ it is returned from the upstream API but _before_ it is returned to the user:
347
+
348
+
```mermaid
349
+
sequenceDiagram
350
+
Client->>Proxy: GET /collections/abc123
351
+
Note over Proxy: EnforceAuth checks credentials
352
+
Note over Proxy: BuildCql2Filter creates filter
353
+
Proxy->>STAC API: GET /collection/abc123
354
+
Note over Proxy: ApplyCql2Filter validates the response
355
+
STAC API->>Client: Response
356
+
```
357
+
344
358
#### Authoring Filter Generators
345
359
346
360
The `ITEMS_FILTER_CLS` configuration option can be used to specify a class that will be used to generate a CQL2 filter for the request. The class must define a `__call__` method that accepts a single argument: a dictionary containing the request context; and returns a valid `cql2-text` expression (as a `str`) or `cql2-json` expression (as a `dict`).
0 commit comments