Since the inception of the GEDCOM X project, we’ve known that GEDCOM X will be more than just a file format. GEDCOM X is also being developed as the standard for genealogical Web service APIs. To flesh out those API definitions, we’re starting with the notion of discovery.
The GEDCOM X APIs are to be designed to conform to RESTful architectural principles, including the principle of Hypermedia as the Engine of Application State. From the perspective of consumers of the GEDCOM X APis, this means that you don’t have to manage a big list of URLs that map to the resources in the system, because everything is “linked”. In other words, the state of the application is being driven by hypermedia.
So the only thing consumers should need to get started is the URL to the “discovery” resource, which serves as the entry point to all the other resources in the application implementing the GEDCOM X standard.
The GEDCOM X specification refers to standards that are already defined and adopted in the industry to define the discovery resource. It is defined by the host meta specification and modeled by XRD.
So here’s an example request and response for the discovery resource:
Request
GET /.well-known/host-meta Accept: application/xrd+xml
Response
HTTP/1.1 200 OK
Last-Modified: Thu, 05 Jan 2012 20:00:35 GMT
Content-Type: application/xrd+xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<XRD xmlns="http://docs.oasis-open.org/ns/xri/xrd-1.0">
<Link href="..." rel="..."/>
<Link href="..." rel="..."/>
<Link href="..." rel="..."/>
<Link href="..." rel="..."/>
</XRD>