REST in kentico

alas alas asked on March 16, 2017 21:37

How to recover a method result with REST kentico EXEMPLE :

http://localhost/rest/content/currentsite/en-us/document/my method ? or

http://localhost/rest/content/currentsite/en-us/document/mywebpart ?

Recent Answers

Peter Mogilnitski answered on March 17, 2017 01:20 (last edited on March 17, 2017 01:34)

Take a look at Managing documents using REST. Make sure that service is enabled for documents (setting->integration->REST).

Path should be /content/site/<site name>/<culture>/document/<alias path> in you case http://localhost/rest/content/currentsite/en-us/document/<Your Document Alias Path> This will give access to you document properties (i.e. properties that defined in page type, including SKU if available). You can copy alias path from general tab.

To access web parts you have to use objects instead of pages i.e. you need to access page template: /REST/cms.pagetemplate/<templateid> PageTemplateWebParts will contain xml with webparts

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.