This shows you the differences between two versions of the page.
en:public:developer:template_system:tags:api:get_wwwfile_logs [2013/03/08 11:26] admin |
en:public:developer:template_system:tags:api:get_wwwfile_logs [2013/03/09 18:21] (current) admin [Parameters] |
||
---|---|---|---|
Line 3: | Line 3: | ||
Use this function to retrieve the logs of a template file | Use this function to retrieve the logs of a template file | ||
- | ==== RESTFUL API ==== | + | ==== Parameters ==== |
- | The ArKadia API currently supports a [[http://en.wikipedia.org/wiki/REST|RESTful]] interface, that essentially | + | Parameters are taken from tag (default) or from HTTP GET/Post |
- | means you can send an HTTP GET or POST to call exposed methods, and you'll get back an XML document | + | |
- | in return. | + | |
- | When you call this function, you'll get a response in XML that looks like this: | + | ^ Name ^ Mandatory ^ Default ^ Description ^ |
- | + | | <html><span style="color:#008000">filename</span></html> | Yes | | the filename (related to the root). Ex: /templates/maintemplates/maintemplate.html | | |
- | <code xml> | + | | <html><span style="color:#008000">output_format</span></html> | No | REST | **JSON** to retrieve response in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Format]] or **REST** to retrieve in [[en:public:developer:template_system:tags:api:REST_Response_Format|REST Format]] | |
- | <rsp stat="ok" version="1.0"> | + | | <html><span style="color:#008000">jsoncallback</span></html> | No | | Callback function to use in [[en:public:developer:template_system:tags:api:JSON_Response_Format|JSON Response Format]] | |
- | [Data in XML format - see individual method docs] | + | |
- | </rsp> | + | |
- | </code> | + | |
- | + | ||
- | If there's an error, you'll get a response with an error message about the problem. | + | |
- | + | ||
- | <code xml> | + | |
- | <rsp stat="fail"> | + | |
- | <error msg="Error Message" /> | + | |
- | <rsp> | + | |
- | </code> | + | |
- | + | ||
- | ==== HTTP Get/Post Parameters ==== | + | |
- | + | ||
- | ^ Name ^ Mandatory ^ Default ^ Description ^ | + | |
- | | <html><span style="color:#008000">Property.ID</span></html> | No | | ID of the property on with the lead will be linked | | + | |
- | | <html><span style="color:#008000">Lead.type</span></html> | Yes | | Type of lead (2=Web or 4=Telephone) | | + | |
==== Error Codes ==== | ==== Error Codes ==== | ||
^ Code ^ Description ^ | ^ Code ^ Description ^ | ||
- | | <html><span style="color:#008000">111</span></html> | One mandatory parameter is missing | | + | | <html><span style="color:#008000">1</span></html> | Insufficient rights. You must be logged as an admin to see logs | |
- | | <html><span style="color:#008000">119</span></html> | Wrong parameter values | | + | | <html><span style="color:#008000">114</span></html> | File not found | |
Line 42: | Line 23: | ||
<code html> | <code html> | ||
- | <#get_wwwfile_logs filename="/templates/maintemplates/maintemplate.html" output_format="JSON"> | + | <#get_wwwfile_logs filename="/templates/maintemplates/maintemplate.html"> |
</code> | </code> | ||
- | will output | + | will output in **REST** |
+ | |||
+ | <code xml> | ||
+ | |||
+ | <rsp stat="ok"> | ||
+ | <log> | ||
+ | <revision>7689</revision> | ||
+ | <author>nik</author> | ||
+ | <date>2/22/2013 1:10:45 PM</date> | ||
+ | </log> | ||
+ | <log> | ||
+ | <revision>7658</revision> | ||
+ | <author>www.arkadia.com</author> | ||
+ | <date>2/21/2013 9:07:25 AM</date> | ||
+ | </log> | ||
+ | </rsp> | ||
+ | |||
+ | </code> | ||
- | <code JSON> | + | And in **JSON** |
- | {"stat":"ok", | + | <code javascript> |
- | "logentry":[{"revision":"8993", | + | |
- | "author":"www.arkadia.com", | + | |
- | "date":""} | + | |
+ | { | ||
+ | "stat":"ok", | ||
+ | "logs":[ | ||
+ | { | ||
+ | "revision":"7689", | ||
+ | "author":"nik", | ||
+ | "date":"2/22/2013 1:10:45 PM" | ||
+ | }, | ||
+ | { | ||
+ | "revision":"7658", | ||
+ | "author":"www.arkadia.com", | ||
+ | "date":"2/21/2013 9:07:25 AM" | ||
+ | } | ||
+ | ] | ||
+ | } | ||
</code> | </code> |