Kentico CMS 7.0 Developer's Guide

Retrieved data examples

Retrieved data examples

Previous topic Next topic Mail us feedback on this topic!  

Retrieved data examples

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

In this topic, you can see examples of the same data (all cms.country objects) obtained from the REST service in various formats.

 

XML

 

In the screenshot below, you can see data of all cms.country objects retrieved in XML format and displayed in Microsoft Internet Explorer. This result was obtained using the following URL: ~/rest/cms.country

 

devguide_clip1788

 

JSON

 

The code below is an extract from data of the cms.country objects retrieved in JSON format. This result was obtained using the following URL: ~/rest/cms.country?format=json

 

{"cms_countries":

[

{"cms_country":

[

{"CountryDisplayName":"Afghanistan","CountryID":272,"CountryLastModified":"\/Date(1299419802000)\/","CountryName":"Afghanistan","CountryGUID":"12d61676-7541-4a4e-88f6-f02098b637fe"}

,{"CountryDisplayName":"Albania","CountryID":273,"CountryLastModified":"\/Date(1202723603000)\/","CountryName":"Albania","CountryGUID":"af056090-4477-4826-ad41-7ce8e8d45d3a"}

,{"CountryDisplayName":"Algeria","CountryID":274,"CountryLastModified":"\/Date(1205397300000)\/","CountryName":"Algeria","CountryGUID":"59f8718f-ff33-4376-bb18-c0d5b0d96786"}

,{"CountryDisplayName":"American Samoa","CountryID":275,"CountryLastModified":"\/Date(1205397300000)\/","CountryName":"AmericanSamoa","CountryGUID":"8a89a7b3-11ee-4cef-9770-22a88bc5e5d6"}

,{"CountryDisplayName":"Andorra","CountryID":276,"CountryLastModified":"\/Date(1205397300000)\/","CountryName":"Andorra","CountryGUID":"cbba23bb-43d5-4840-a797-a9e27f6018f4"}

,{"CountryDisplayName":"Angola","CountryID":277,"CountryLastModified":"\/Date(1314631085000)\/","CountryName":"Angola","CountryGUID":"503673e4-fc0e-40a3-9ff9-521f67680d3f"}

,{"CountryDisplayName":"Anguilla","CountryID":278,"CountryLastModified":"\/Date(1205397300000)\/","CountryName":"Anguilla","CountryGUID":"fe1c087d-6157-4f94-9745-39a49f981bfa"}

 

...

 

]

}

,{"TotalRecords":

[

{"TotalRecords":"246"}

]

}

]

}

 

RSS 2.0

 

In the screenshot below, you can see all cms.country objects retrieved in RSS 2.0 format and displayed in Microsoft Internet Explorer. This result was obtained using the following URL: ~/rest/cms.country?format=rss20

 

devguide_clip1789

 

Atom 1.0

 

In the screenshot below, you can see all cms.country objects retrieved in Atom 1.0 format and displayed in Microsoft Internet Explorer. This result was obtained using the following URL: ~/rest/cms.country?format=atom10

 

devguide_clip1790