Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieving specific subsections of an object #175

Closed
1 task done
Mec-iS opened this issue Mar 16, 2018 · 3 comments
Closed
1 task done

Retrieving specific subsections of an object #175

Mec-iS opened this issue Mar 16, 2018 · 3 comments

Comments

@Mec-iS
Copy link
Contributor

Mec-iS commented Mar 16, 2018

I'm submitting a

  • feature request.

Expected Behaviour:

Should be possible to retrieve parts of an object or objects by using an endpoint like http://localhost/api/drone/1#speed, in this case the API should return something like:

{
  "@id": ".../drone/1",
  "@type": "...Drone",
  "drone:speed": 35
}
@Mec-iS Mec-iS changed the title Referencing specific subsections of an object Retrieving specific subsections of an object Mar 16, 2018
@py-ranoid
Copy link
Contributor

Could we use URL-encoded parameters instead ?
Something like http://localhost/api/drone/1?attr=speed

Because according to this answer

As such, flask drops everything after the '#'. If you want to forward these to the server, you'll have to extract them on the client and pass them to the server via a query parameter or part of the URL path.

@Mec-iS
Copy link
Contributor Author

Mec-iS commented Mar 17, 2018

In fact fragments are a client-side feature according to RFC. So should be up to the Hydra client (hydra-agent) to map #speed to ?attr=speed when dereferencing and the opposite for hydrus when referencing. But it is something that we should keep for later.

This is a part of the client-server protocol so we should remember that when designing the client. The current client we are using and that we should improve does not consider this feature.

@Mec-iS
Copy link
Contributor Author

Mec-iS commented Mar 17, 2018

Moved to HTTP-APIs/hydra-python-agent#3

@Mec-iS Mec-iS closed this as completed Mar 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants