REST (an abbreviation of Representational State Transfer) is a set of communications protocols used for accessing and manipulating data over the internet. The user requests a resource (data) via a URL and a representation of the resource is returned (e.g. an XML document). There is a set of defined rules on how data in REST requests can be structured, e.g. as XML or JSON and what can be done to the data, enabling it to be retrieved, saved / created, updated and deleted. For REST calls in iVectorConnect, users will only ever be retrieving data.
For more detail about REST and RESTful requests, see this entry in our glossary.
If extended content is supported in your system, the REST architectural style is used to allow you to access the data set up in your system via simple URLs. For example you can get lists of properties, airports, languages and so on in XML format by going to the URLs detailed below.
Content is available through the following URL
http://[YourURL].ivectorconnect.co.uk
via the following REST data retrieval calls:
For example, to find out all object types that can be retrieved through rest calls you might visit http://testtravel.ivectorconnect.co.uk/cms/list
The following query string modifiers can be used with all the above requests
?cmswebsiteid=id
?languageid=id
?modifiedsince=date
Use to retrieve content specific to a particular website
Use to retrieve content for a specific language
Use to retrieve only records modified since the specified date
For example, to find out all object types that can be retrieved through REST calls, you might visit http://demo.ivectorconnect.co.uk/cms/list.
URL
http://demo.ivectorconnect.co.uk/cms/list
Response
<ObjectTypes>
<ObjectType>BookingSettings</ObjectType>
<ObjectType>CMS_ImageRotatorImages</ObjectType>
<ObjectType>Extra</ObjectType>
<ObjectType>Property</ObjectType>
</ObjectTypes>
URL
http://demo.ivectorconnect.co.uk/cms/property/1
Response
<Property/>
URL
http://demo.ivectorconnect.co.uk/cms/property/215,216,3455
Response
<Property>
<Property/>
<Property/>
<Property/>
</Property>
URL
http://demo.ivectorconnect.co.uk/cms/property/all
Response
<Property>
<Property/>
<Property/>
<Property/>
<Property/>
<Property/>
<Property/>
<Property/>
</Property>
URL
http://demo.ivectorconnect.co.uk/cms/property/list
Response
<PropertyList>
<PropertyID>1</PropertyID>
<PropertyID>2</PropertyID>
</PropertyList>
URL
http://demo.ivectorconnect.co.uk/cms/url
Response
<URLContent>
<ObjectType>Property</ObjectType>
<ID>1745</ID>
<URL/>
<ContentXML/>
</URLContent>
Highlighted functionality is not in the main code branch yet.