Previous Page Arrow Next Page Arrow

14.2 Contract Resource

The contract resource allow a service consumer to discover which contracts and which versions of contracts are available. The list of contracts can be queried with a GET request on the following URL:

http://www.example.com/sdata/$system/registry/-/contracts

This request will return an SData feed with one entry for each available contract version. Each entry will contain an XML payload describing a specific version of a contract, typically:

<contract xmlns="http://schemas.sage.com/sdata/registry/2009">
  <name>GCRM</name>
  <version>1.0</version>
  <title>Global CRM Contract Version 1.0</title>
  <description>This contract enables integration with CRM applications...</description>
  <namespace>http://schemas.sage.com/GCRM/2009/1<namespace>
  <baseNamespace>http://schemas.sage.com/GCRM</baseNamespace>
</contract>

The following table describes the elements of this XML payload:

Element Example Value Description
name GCRM The official name of the contract
version 1.0 The version of the contract
title Global CRM Contract Version 1.0 A user friendly name for the contract version
description This contract enables ... A description of the contract version
namespace http://schemas.sage.com/GCRM/2009/1 The exact namespace of the specific contract version
baseNamespace http://schemas.sage.com/GCRM The namespace base URL which is shared by all versions of this contract

The registry service MUST support basic queries on its contracts URL  (see query conformance levels in Query Language section). So, for example, a consumer should be able to get the list of all the versions of the GCRM contract with a GET request on:

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

Previous Page Arrow Next Page Arrow