- From: Melvin Carvalho <melvincarvalho@gmail.com>
- Date: Wed, 29 Oct 2014 23:07:24 +0100
- To: Ruben Verborgh <ruben.verborgh@ugent.be>
- Cc: public-hydra@w3.org
- Message-ID: <CAKaEYh+s=7DqVRQxLcdiDULdwdLeqq2C6Vc3xVWvFh0Uy1CRyw@mail.gmail.com>
On 29 October 2014 21:13, Ruben Verborgh <ruben.verborgh@ugent.be> wrote: > Hi Melvin, > > > Thanks Ruben. How about discovery. Does hydra tell you *where* to find > an API, from a website root? > > Hypermedia. Just follow a link. > > And if you ask me, the website *is* the API :-) > It's time we stop treating humans and machines so differently; > give machines the right hypermedia controls, and they can use the > website/API. > Sure! > > > VOID does this as /.well-known/void is registered already with IANA > > I've never understood the need for .well-known. > Humans don't need it, right? > We land on a random page and just follow links to get where we want. > The same can work for machines. > There's 3 ways to do discovery: 1. Follow your nose 2. Well known locations 3. Search Just about using the right tool for the right job. In an ideal world everything would be 5 star linked data, and (1) would be dominant. But we have some work to go before that is true. I only mentioned well known / void for practical reasons, because it already exists and is standardized. If there's a better way I'm open to it. > > > Is there any equivalent in hydra? > > A machine starts with a URL of some resource in the API. > It GETs a machine-readable representation of that resource. > Inside that resource, there will be links, which a machine can follow. > Got it, trying to work out how it would look. My use case is: <user> <predicate> <payment_processor> . User I can do. Predicate im not sure on. Payment Processor I think would probably be the root domain, meaning more follow your nose to the API. Or I could direct to the API but there's several so I wonder how to mark it up efficiently, I cant have a dozen triples per user very easily. > > You could also be very explicit and add > </docs/> a ApiDocumentation. > > But honestly, I think a link or form works better. > > If you want to see such a hypermedia API at work, > take a look at > http://data.linkeddatafragments.org/dbpedia2014?predicate=dc%3Arights. > This is a random resources from a hypermedia API. > Try to get a representation both with your browser and with curl. > You'll see that in all cases, you'll get links to reach all of the API. > Thanks very helpful. Still slightly unsure what triples would work best for discovery of *where* the APIs live, but I think I'm making progress! > > Best, > > Ruben
Received on Wednesday, 29 October 2014 22:07:53 UTC