- From: Maxime Veber via GitHub <sysbot+gh@w3.org>
- Date: Wed, 28 Mar 2018 16:09:47 +0000
- To: public-hydra-logs@w3.org
Nek- has just created a new issue for https://github.com/HydraCG/Specifications:
== Filter enumeration ==
Hello,
Imagine the following call (inspired by [filtering events](https://github.com/HydraCG/Specifications/blob/master/drafts/use-cases/8.filtering-events.md)):
```http
GET /api/events
```
```http
HTTP 200 OK
```
```javascript
{
"@context": "/api/context.jsonld",
"@id": "/api/events",
"@type": "PartialCollection",
"manages": {
"property": "rdf:type",
"object": "schema:Event"
},
"totalItems": 150000,
"members": [
{
"@id": "/api/events/1",
"eventName": "Event 1",
"eventDescription": "Some event 1",
"startDate": "2017-04-19",
"endDate": "2017-04-19",
"manager": "/api/managers/8"
},
{
"@id": "/api/events/2",
"eventName": "Event 2",
"eventDescription": "Some event 2",
"startDate": "2017-04-19",
"endDate": "2017-04-19",
"manager": "/api/managers/34"
},
{
"@id": "/api/events/3",
"eventName": "Event 3",
"eventDescription": "Some event 3",
"startDate": "2017-04-19",
"endDate": "2017-04-19",
"manager": "/api/managers/9"
},
{
"@id": "/api/events/4",
"eventName": "Event 4",
"eventDescription": "Some event 4",
"startDate": "2017-04-19",
"endDate": "2017-04-19",
"manager": "/api/managers/12"
},
{
"@id": "/api/events/4",
"eventName": "Event 1",
"eventDescription": "Some event 1",
"startDate": "2017-04-19",
"endDate": "2017-04-19",
"manager": "/api/managers/50"
}
],
// Pagination markup missing, let's imagine it's here :)
"search": {
"@type": "IriTemplate",
"template": "http://example.com/api/events{?eventName}",
"variableRepresentation": "BasicRepresentation",
"mapping": [
{
"@type": "IriTemplateMapping",
"variable": "manager",
"property": "???",
"required": false
}
]
}
}
```
How can the client be aware of what manager he can ask for ? Considering it may be many kind of manager and he can't access to the endpoint `/api/managers` for security reasons (let's imagine not all manager are public or related to events).
Please view or discuss this issue at https://github.com/HydraCG/Specifications/issues/161 using your GitHub account
Received on Wednesday, 28 March 2018 16:09:49 UTC