Public HAL APIs

53 views
Skip to first unread message

Icke Bins

unread,
Nov 30, 2021, 4:49:27 PM11/30/21
to HAL Discuss
Hi,

I am looking for public hal apis which support CORS and do not need authentication (or provide credentials).

Can anybody please give me some advices? I developed a HAL client and want to test several APIs.

Thx :)

mca

unread,
Nov 30, 2021, 8:13:25 PM11/30/21
to hal-d...@googlegroups.com
these are three HAL testing services that i created:


each is a slightly different version. the last one also supports the HAL-FORMS specification.  pretty sure this service resets and reboots overnight so no data lasts very long. 

you can find the source code (nodejs) for these services here: github.com/rwcbook/

let me know if you see problem, have questions/comments

cheers.

Mike Amundsen



--
You received this message because you are subscribed to the Google Groups "HAL Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hal-discuss...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hal-discuss/981785f6-d6f1-4711-a124-537a334258fcn%40googlegroups.com.

k...@toedter.com

unread,
Dec 1, 2021, 2:21:01 AM12/1/21
to HAL Discuss

Icke Bins

unread,
Dec 1, 2021, 8:19:52 AM12/1/21
to HAL Discuss
Thanky you very much! 
These examples seem to provide no HAL-FORMS, correct?

FYI: The links are all returned with http protocol, not https. My client upgrades automatically to https, since mixed content is not supported in a browser script.

On Wednesday, December 1, 2021 at 2:13:25 AM UTC+1 Mike Amundsen wrote:

Icke Bins

unread,
Dec 1, 2021, 8:23:56 AM12/1/21
to HAL Discuss
Thank you very much for the heroku examples!

I have some cors issues. I think the "Access-Control-Allow-Headers: *" is the problem, then using fetch with http patch. The browser forces the request content-type to text/plain. Explicitly listing headers may fix it.
FYI: http methods (in templates) should be UPPERCASE.


Icke Bins

unread,
Dec 1, 2021, 8:40:13 AM12/1/21
to HAL Discuss
The cors issue magically went away. No idea what the issue caused.

k...@toedter.com

unread,
Dec 1, 2021, 9:04:09 AM12/1/21
to HAL Discuss
> FYI: http methods (in templates) should be UPPERCASE.
The spec only says:  The HTTP method the client SHOULD use when the service request. Any valid HTTP method is allowed. This is a REQUIRED element. If the value is empty or is not understood by the client, the value MUST be treated as an HTTP GET.

The implementation is done by Spring HATEOAS.
If you think, lower case is incorrect, please file an issue here: https://github.com/spring-projects/spring-hateoas/issues 

mca

unread,
Dec 1, 2021, 10:48:14 AM12/1/21
to hal-d...@googlegroups.com
while there are no inline HAL-FORMS served up, the last one (rwcbook08) provides HAL-FORMS using the "Suggested Process Flow" in the HAL-FORMS spec [1]. 

and, yes, the http/https thing is a bummer. the heroku hosted service supports HTTPS but the representations are still outputting HTTP. as a test, you cah hack your client to try to force HTTPS. i'll try to get back to updating the examples to support HTTPS natively but this will have to wait until the holiday break.

cheers.




Mike Amundsen


k...@toedter.com

unread,
Dec 1, 2021, 11:36:14 AM12/1/21
to HAL Discuss
Mike, that https is not returned in your server responses (hosted at Heroku) could be related to your server implementation,
e.g. how it deals with 'X-Forwarded-Proto: https'  headers.
As an example, my Heroku services (implemented with Spring), return the https protocol correctly, see

Best Regards,

Kai



Icke Bins

unread,
Dec 1, 2021, 1:38:20 PM12/1/21
to HAL Discuss
Looks like Spring Hateoas fixed this already. I use Boot 2.6.0 and the method names are UPPERCASE.

mca

unread,
Dec 1, 2021, 1:45:51 PM12/1/21
to hal-d...@googlegroups.com
Kai:

thanks. actually, pretty sure heroku is doing just fine on returning HTTPS, but i _hard-coded_ HTTP into the URLs i generate for each representation (sigh....). 

i just need to take some time to sort it out and fix it up.

BTW - love that your app uses an ALPS reference, too! 


Mike Amundsen


Icke Bins

unread,
Dec 1, 2021, 1:47:37 PM12/1/21
to HAL Discuss
"Suggested Process Flow" in the HAL-FORMS spec [1]."

OK, found it for /task/, thx :)
On Wednesday, December 1, 2021 at 4:48:14 PM UTC+1 Mike Amundsen wrote:

mca

unread,
Dec 1, 2021, 1:52:06 PM12/1/21
to hal-d...@googlegroups.com
yep - should be there for taks, user, and notes (depending on which service you are accessing).


Mike Amundsen


Oliver Drotbohm

unread,
Dec 1, 2021, 5:41:26 PM12/1/21
to hal-d...@googlegroups.com
This has been fixed in 1.4: https://github.com/spring-projects/spring-hateoas/issues/1608
> APIs, Microservices, and Digital Transformation
> 7310 Turfway Rd. Suite 550, Florence, KY, 41042
>
> +1.859.372.6517
> https://zoom.us/j/8593726715
> http://linkedin.com/in/mamund
> http://g.mamund.com/meetme
> http://training.amundsen.com
> http://twitter.com/mamund
>
>
> On Tue, Nov 30, 2021 at 4:49 PM Icke Bins <ick.bi...@gmail.com> wrote:
> Hi,
>
> I am looking for public hal apis which support CORS and do not need authentication (or provide credentials).
>
> Can anybody please give me some advices? I developed a HAL client and want to test several APIs.
>
> Thx :)
>
> --
> You received this message because you are subscribed to the Google Groups "HAL Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hal-discuss...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/hal-discuss/981785f6-d6f1-4711-a124-537a334258fcn%40googlegroups.com.
>
> --
> You received this message because you are subscribed to the Google Groups "HAL Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to hal-discuss...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/hal-discuss/d862b276-7e1d-4108-8bf8-6ac83b7094f6n%40googlegroups.com.

signature.asc

Kai Tödter

unread,
Dec 2, 2021, 2:31:26 AM12/2/21
to HAL Discuss
Thy Oli, I updated the movies demo, now it is POST :), see https://hypermedia-movies-demo.herokuapp.com/api/movies?size=1
Reply all
Reply to author
Forward
0 new messages