- From: Sindre Njøsen <sind_nj@hotmail.com>
- Date: Thu, 5 Mar 2015 14:20:00 +0100
- To: Nandana Mihindukulasooriya <nmihindu@fi.upm.es>, "public-hydra@w3.org" <public-hydra@w3.org>, "lie.braathen@gmail.com" <lie.braathen@gmail.com>
- Message-ID: <DUB120-W10465D555A32AA05BC300C841F0@phx.gbl>
Thank you Kristoffer and Nandana! The fix was to simply add: header('Link: <http://sindrenj.no/hydraservice/vocab>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation"'); in the PHP-code. From: nmihindu@fi.upm.es Date: Thu, 5 Mar 2015 14:07:05 +0100 To: public-hydra@w3.org Subject: Re: Can't get Hydra-console to work Hi Sindre, I just started playing with Hydra, so this is not an expert answer just a beginners comment. Based on what I've read, you need to send a link relation header pointing to your API [1] so that it can be discovered, isn't it? For example, if I do a GET on http://www.markus-lanthaler.com/hydra/api-demo/, the response has the following header. Link: <http://www.markus-lanthaler.com/hydra/api-demo/vocab>; rel="http://www.w3.org/ns/hydra/core#apiDocumentation" But when I do a GET on http://sindrenj.no/hydraservice you don't return that header. That could be a reason for failing to load the documentation. Best Regards,Nandana [1] http://www.hydra-cg.com/spec/latest/core/#discovering-a-hydra-powered-web-api On Thu, Mar 5, 2015 at 1:18 PM, Sindre Njøsen <sind_nj@hotmail.com> wrote: Hello! I've been working on the hydra-vocabulary for a while but my problem is that I have never managed to get the Hydra Console to work with my services. I always get problems such as "Documentation cant be loaded..". I have therefore uploaded a very simple example which I believe is correct according to the Hydra spec and Lanthalers "Hydra Core Vocabulary demo" to demonstrate my problems. You can visit the service by using this link: http://sindrenj.no/hydraservice/. And browse it using this console: http://sindrenj.no/hydraconsole. I get the following problems: - If I navigate the service using the browser to the entrypoint of the service(http://sindrenj.no/hydraservice/), then I get this error on the right hand side of the browser: "Documentation: Loading documentation failed." And if I click on any links, nothing happens. (I would expect an "Invoke an Operation"-messagebox to appear). - If I navigate to the "Apidocumentation"(http://sindrenj.no/hydraservice/vocab) then the "Dropdown-menu" works but only "ApiDocumentation" is visible in the list(I would expect all the hydra-classes to be visible). - If I navigate to http://sindrenj.no/hydraservice/users then "Collection" is visible in the menu but no information related to the class other than "IRI" is visible. (Would expect "Member" to be visible). Does anybody know what I'm doing wrong? Or are these problems related to bugs? Any help would be much appreciated! :) Regards Sindre Njøsen
Received on Thursday, 5 March 2015 13:20:29 UTC