Automatically add workspace to @path query (continue)
(MGNLREST-644)
|
|
| Status: | Completed |
| Project: | Magnolia REST Framework |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Sub-task | Priority: | Neutral |
| Reporter: | Canh Nguyen | Assignee: | Javier Benito |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Template: | |
| Date of First Response: | |
| Sprint: | DevX 33 |
| Team: |
| Comments |
| Comment by Javier Benito [ 15/Mar/23 ] |
|
Having this restEndpoint configuration in piqa.yaml file: $type: deliveryEndpoint_v2 includeSystemProperties: true bypassWorkspaceAcls: true depth: 5 workspace: norsuGenres And three content objects: curl "http://localhost:8080/container/.rest/delivery/piqa/@nodes" | jq . % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 465 0 465 0 0 12632 0 --:--:-- --:--:-- --:--:-- 14090 { "total": 3, "limit": 10, "offset": 0, "results": [ { "@metadata": { "@id": "43707168-d03e-450c-86df-cebd1c91b502", "@name": "test1", "@path": "/test1", "mgnl:lastModified": 1678878164 }, "name": "test1" }, { "@metadata": { "@id": "18dd624b-7eb0-47ab-986a-af23576f4a97", "@name": "test2", "@path": "/test2", "mgnl:lastModified": 1678878171 }, "name": "test2" }, { "@metadata": { "@id": "866f8fb5-5ac9-4c65-8534-9606ebba3386", "@name": "test3", "@path": "/test3", "mgnl:lastModified": 1678878176 }, "name": "test3" } ] } When we try filtering with "in" operator: curl "http://localhost:8080/container/.rest/delivery/piqa?path%5Bin%5D=/test1" | jq . % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 185 0 185 0 0 4559 0 --:--:-- --:--:-- --:--:-- 5285 { "total": 1, "limit": 10, "offset": 0, "results": [ { "@metadata": { "@id": "43707168-d03e-450c-86df-cebd1c91b502", "@name": "test1", "@path": "/test1", "mgnl:lastModified": 1678878164 }, "name": "test1" } ] } and also, if we try "not-in" operator: curl "http://localhost:8080/container/.rest/delivery/piqa?path%5Bnot-in%5D=/test1" | jq . % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 325 0 325 0 0 3386 0 --:--:-- --:--:-- --:--:-- 3571 { "total": 2, "limit": 10, "offset": 0, "results": [ { "@metadata": { "@id": "18dd624b-7eb0-47ab-986a-af23576f4a97", "@name": "test2", "@path": "/test2", "mgnl:lastModified": 1678878171 }, "name": "test2" }, { "@metadata": { "@id": "866f8fb5-5ac9-4c65-8534-9606ebba3386", "@name": "test3", "@path": "/test3", "mgnl:lastModified": 1678878176 }, "name": "test3" } ] } |