Previous Page Arrow Next Page Arrow

14.5 Discovery Example

Consumers can discover endpoints by interrogating the registry. For example, a CRM application can discover all the ERP endpoints that implement the GCRM contract by sending a GET request to the following URL:

http://www.example.com/sdata/$system/registry/-/endpoints?where=contractName eq 'GCRM'

The registry will respond with a feed that contains one entry for every endpoint that matches the query:

200 OK
Content-Type: application/atom+xml; type=feed

<feed xmlns="http://www.w3.org/2005/Atom">
  <id>http://www.example.com/sdata/$system/registry/-/endpoints?where=contractName eq 'GCRM'</id>
  <title>endpoints</title>
  <!-- more Atom elements: link, category, ... -->
  <entry>
    <id>http://www.example.com/sdata/$system/registry/-/endpoints('1')</id>
    <title>endpoint 1</title>
    <!-- more Atom elements: link, category, ... -->
    <payload xmlns="http://schemas.sage.com/sdata/2008/1">
      <endpoint xmlns="http://schemas.sage.com/sdata/registry/2009">
        <title>Accounts 50 GCRM 1.0 demo</title>
        <!-- more -->
        <url>http://www.example.com/sdata/accounts50/gcrm/demo<url>
        <isBrowsable>true</isBrowsable>
        <aliveStamp>2009-04-02T08:32:19Z</aliveStamp>
      </endpoint>
    </payload>
  </entry>
  <!-- more entries -->
</feed>

Previous Page Arrow Next Page Arrow