Discovering API endpoints in Buddycloud.js

44 views
Skip to first unread message

Simon Tennant

unread,
Dec 8, 2014, 8:46:24 AM12/8/14
to buddycl...@googlegroups.com
Thinking about Buddycloud.js:
Would be nice to help out a JS developer needing to know what to enter into https://github.com/buddycloud/buddycloud.js/blob/new/README.md#configure-the-api-endpoint

How can we make discovering xmpp-ftw on a websocket as predictable / discoverable (hint DNS queries in the browser don't work)?

S.

--
Simon Tennant | Founder & CEO | Buddycloud | +49 17 8545 0880

Denis Washington

unread,
Dec 8, 2014, 9:29:10 AM12/8/14
to buddycl...@googlegroups.com
Am Montag, den 08.12.2014, 14:46 +0100 schrieb Simon Tennant:
> Thinking about Buddycloud.js:
> * Discovering the REST API can be done with DNS or by using
> protocol.buddycloud.com
> Would be nice to help out a JS developer needing to know what to enter
> into https://github.com/buddycloud/buddycloud.js/blob/new/README.md#configure-the-api-endpoint
>
>
> How can we make discovering xmpp-ftw on a websocket as predictable /
> discoverable (hint DNS queries in the browser don't work)?

A common discovery mechanism in the web is to use a well-known URL [1].
For instance, a HTTP request such as

GET /.well-known/buddycloud-api HTTP/1.1
Host: example.com

could yield a JSON response such as the following:

{
"api-version": 1,
"api-root": "https://buddycloud.example.com/api/v1"
}

Regards,
Denis

[1] https://www.rfc-editor.org/rfc/rfc5785.txt



Morgaine Fowle

unread,
Mar 22, 2015, 4:07:24 PM3/22/15
to buddycl...@googlegroups.com
".host-meta" yourself (put an entry in the .host-meta json with a link of some new rel-type to the xmpp over websocket endpoint)

https://tools.ietf.org/html/rfc6415
Reply all
Reply to author
Forward
0 new messages