如何使用REST API检索在Zoho中输入的最后一条记录

时间:2016-07-24 19:47:10

标签: php rest zoho

从帮助部分REST API (View Records)我能够从我的php脚本中检索以JSON格式输入到我的Zoho表单中的所有记录。他们在那里有一个我模仿的样品请求。

但是,这会返回整个记录集,但我只想检索最后输入的一个并在我的代码中使用它。我根本没有找到任何办法。随着我的数据集的增长,下载所有记录的整个JSON文件将会出现问题。

更新:这是来自HTML的检索数据集的请求。

    <form method="GET" action="http://creator.zoho.com/api/json/my_application_name/view/my_report_name">
    <input type="hidden" name ="authtoken" value="****">
    <input type="hidden" name ="zc_ownername" value="ownername">
    <input type="hidden" name ="scope" id="scope" value="creatorapi">
    <input type="submit" value="View Records">
</form>

由于

1 个答案:

答案 0 :(得分:0)

您可能需要尝试设置条件并使用日期值,最好还是使用&#39;限制&#39;并将值设置为1:

<input type="hidden" name="criteria" value="(StartDate == zoho.currentdate")">
<!-- below was tested and works -->
<input type="hidden" name="limit" value="1">