所有调用都必须包含REST API密钥,可以通过单击页面开头的“ API密钥” 按钮找到该REST。
可以 JSON 或 XML 格式接收服务器响应 strong>,具体取决于您的请求。
下面我们显示带有每个请求的服务器响应的表。 URL将显示为 /apps.json ,这意味着您必须在程序中使用链接https://QuintaDB.ru /apps.json 调用该方法。 请注意,所有呼叫必须使用 https 协议,并且您必须检查服务器的SSL证书的有效性。
这些的数据库属性可以使用REST API来获得。
的唯一数据库ID
name标题
created_at当数据库被创建的时间
updated_at时值数据库已更新
记录的数量在数据库
entities_count数据库中的表数
properties_count在数据库中的列数
complex_app这是一个复杂的应用程序,即启用了数据缓存的应用程式。返回true或false
complex_app_with_fresh_data这是一个复杂的应用程序,数据缓存是否新鲜。返回true或false
获取所有数据库
你的API密钥
page数据库显示20页。即 页面可以是1..5
JSON
方法GET
URL/apps.json
请求正文{"page":1,"rest_api_key":"API_KEY"}
答案: 返回所有数据库
{"databases":[
{"id" : "aOWO_dVXHdHie1WeGFE8k2"
"name" : "Database Name 1",
"created_at" : "2021-08-16T05:42:40-05:00",
"updated_at" : "2021-08-16T05:42:40-05:00",
"dtypes_count" : 0,
"entities_count" : 1,
"properties_count": 0
},
{"id" : "aOWO3eVXHdHie1WeGFE8k2"
"name" : "Database Name 2",
"created_at" : "2021-04-29T01:26:22-05:00",
"updated_at" : "2021-08-16T00:47:56-05:00",
"dtypes_count" : 768,
"entities_count" : 6,
"properties_count": 240
} ]}
XML
方法GET
URL/apps.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<page>1</page>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<databases type="array">
<database>
<id>aOWO_dVXHdHie1WeGFE8k2</id>
<name>Database name 1</name>
<created-at type="datetime">2021-08-16T05:42:40-05:00</created-at>
<updated-at type="datetime">2021-08-16T05:42:40-05:00</updated-at>
<dtypes-count type="integer">0</dtypes-count>
<entities-count type="integer">1</entities-count>
<properties-count type="integer">0</properties-count>
</database>
<database>
<id>aOWO3eVXHdHie1WeGFE8k2</id>
<name>Database Name 2</name>
<created-at type="datetime">2021-04-29T01:26:22-05:00</created-at>
<updated-at type="datetime">2021-08-16T00:47:56-05:00</updated-at>
<dtypes-count type="integer">768</dtypes-count>
<entities-count type="integer">6</entities-count>
<properties-count type="integer">240</properties-count>
</database>
</databases>
获取的ID数据的基础
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
JSON
方法GET
URL/apps/APP_ID.json
请求正文{"rest_api_key":"API_KEY"}
答案: 关于数据库返回的信息
{"database":{
"id" : "aOWO_dVXHdHie1WeGFE8k2"
"name" : "Database Name 1",
"created_at" : "2011-08-16T05:42:40-05:00",
"updated_at" : "2011-08-16T05:42:40-05:00",
"dtypes_count" : 0,
"entities_count" : 1,
"properties_count": 0,
"complex_app?" : true,
"complex_app_with_fresh_data?" : false
}
}
XML
方法GET
URL/apps/APP_ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<database>
<id>aOWO_dVXHdHie1WeGFE8k2</id>
<name>Database name 1</name>
<created-at type="datetime">2011-08-16T05:42:40-05:00</created-at>
<updated-at type="datetime">2011-08-16T05:42:40-05:00</updated-at>
<dtypes-count type="integer">0</dtypes-count>
<entities-count type="integer">1</entities-count>
<properties-count type="integer">0</properties-count>
</database>
获取数据库的名称
你的API密钥
标题你需要知道可以通过查询获取所有数据库获得数据库名的名称。
JSON
方法GET
URL/apps/search.json
请求正文{"rest_api_key":"API_KEY", "name":"Database Name 1"}
答案: 关于数据库返回的信息
{"database":{
"id" : "aOWO_dVXHdHie1WeGFE8k2"
"name" : "Database Name 1",
"created_at" : "2021-08-16T05:42:40-05:00",
"updated_at" : "2021-08-16T05:42:40-05:00",
"dtypes_count" : 0,
"entities_count" : 1,
"properties_count": 0,
"complex_app?" : true,
"complex_app_with_fresh_data?" : false
}
}
XML
方法GET
URL/apps/search.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<name>Database Name 1</name>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<database>
<id>aOWO_dVXHdHie1WeGFE8k2</id>
<name>Database name 1</name>
<created-at type="datetime">2021-08-16T05:42:40-05:00</created-at>
<updated-at type="datetime">2021-08-16T05:42:40-05:00</updated-at>
<dtypes-count type="integer">0</dtypes-count>
<entities-count type="integer">1</entities-count>
<properties-count type="integer">0</properties-count>
</database>
更新数据库
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
name数据库的新名称
JSON
方法PUT
URL/apps/APP_ID.json
请求正文{"rest_api_key":"API_KEY",
"name":"New database name"}
{"database":{
"id" : "aOWO_dVXHdHie1WeGFE8k2"
"name" : "New database name",
"created_at" : "2021-08-16T05:42:40-05:00",
"updated_at" : "2021-08-16T05:42:40-05:00",
"dtypes_count" : 0,
"entities_count" : 1,
"properties_count": 0,
"complex_app?" : true,
"complex_app_with_fresh_data?" : false
}
}
XML
方法PUT
URL/apps/APP_ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<name>New database name</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<database>
<id>aOWO_dVXHdHie1WeGFE8k2</id>
<name>New database name</name>
<created-at type="datetime">2021-08-16T05:42:40-05:00</created-at>
<updated-at type="datetime">2021-08-16T05:42:40-05:00</updated-at>
<dtypes-count type="integer">0</dtypes-count>
<entities-count type="integer">1</entities-count>
<properties-count type="integer">0</properties-count>
</database>
删除数据库
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
JSON
方法DELETE
URL/apps/APP_ID.json
请求正文{"rest_api_key":"API_KEY"}
答案
{"databases":[{
"id" : "aOWO_dVXHdHie1WeGFE8k2"
"name" : "Database Name 1",
"created_at" : "2011-08-16T05:42:40-05:00",
"updated_at" : "2011-08-16T05:42:40-05:00",
"dtypes_count" : 0,
"entities_count" : 1,
"properties_count": 0
},
{"id" : "aOWO3eVXHdHie1WeGFE8k2"
"name" : "Database Name 2",
"created_at" : "2011-04-29T01:26:22-05:00",
"updated_at" : "2011-08-16T00:47:56-05:00",
"dtypes_count" : 768,
"entities_count" : 6,
"properties_count": 240
} ]}
XML
方法DELETE
URL/apps/APP_ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<databases type="array">
<database>
<id>aOWO_dVXHdHie1WeGFE8k2</id>
<name>Database name 1</name>
<created-at type="datetime">2011-08-16T05:42:40-05:00</created-at>
<updated-at type="datetime">2011-08-16T05:42:40-05:00</updated-at>
<dtypes-count type="integer">0</dtypes-count>
<entities-count type="integer">1</entities-count>
<properties-count type="integer">0</properties-count>
</database>
<database>
<id>aOWO3eVXHdHie1WeGFE8k2</id>
<name>Database Name 2</name>
<created-at type="datetime">2011-04-29T01:26:22-05:00</created-at>
<updated-at type="datetime">2011-08-16T00:47:56-05:00</updated-at>
<dtypes-count type="integer">768</dtypes-count>
<entities-count type="integer">6</entities-count>
<properties-count type="integer">240</properties-count>
</database>
</databases>
新建应用程式
你的API密钥
database_name该应用程式的名称
form_name表格的名称。没有形式不能创建一个数据库。因为在没有形式的数据库没有任何意义。
JSON
方法POST
URL/apps.json
请求正文{"rest_api_key":"API_KEY", database_name: "Database 1", form_name: "Form 1"}
答案: 关于数据库返回的信息
{"database":
{"id" : "aOWO_dVXHdHie1WeGFE8k2"
"name" : "Database Name 1",
"created_at" : "2011-08-16T05:42:40-05:00",
"updated_at" : "2011-08-16T05:42:40-05:00",
"dtypes_count" : 0,
"entities_count" : 1,
"properties_count": 0
}
}
XML
方法POST
URL/apps.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<database_name>Database 1</database_name>
<form_name>Form 1</form_name>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<database>
<id>aOWO_dVXHdHie1WeGFE8k2</id>
<name>Database name 1</name>
<created-at type="datetime">2011-08-16T05:42:40-05:00</created-at>
<updated-at type="datetime">2011-08-16T05:42:40-05:00</updated-at>
<dtypes-count type="integer">0</dtypes-count>
<entities-count type="integer">1</entities-count>
<properties-count type="integer">0</properties-count>
</database>
这样属性表单可使用REST API是poluchiny。
形式的唯一标识符
name标题
desc说明
post_action收件人的电子邮件通知列表
URL转换。在这个页面上,用户将通过网络形式被重定向
position位置形态。示出了形式接收相对于其他数据库形式的顺序
sort_by字段Id上排序记录形式
asctrue或false。这意味着升序或降序排序记录
per_page有多少项每页显示
allow_deletetrue或false。如果为true,Web用户将能够从综合数据库中删除记录
allow_databasetrue或false。如果为true,网络用户将能够查看数据库中的集成数据库中的所有记录
send_emailstrue或false。发送或没有新条目的电子邮件通知添加到数据库中
new_widget哈希设置表单控件
records_widget哈希数据库设置窗口小部件
settings哈希设置形式
records_count记录数的形式
获得所有形式
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
JSON
方法GET
URL/apps/APP_ID/entities.json
请求正文{rest_api_key":"API_KEY"}
答案: 让所有的数据库形式
{"forms":[
{
"id" : "aOWO_dVXHdHie1WeGFE8k2",
"app_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Form Name 1",
"desc" : "Form description",
"post_action" : "email@email.com",
"position" : 0,
"sort_by" : null,
"asc" : false,
"per_page" : 10,
"allow_delete" : false,
"new_widget" : null,
"records_widget" : null,
"target_page" : null,
"allow_database" : true,
"send_emails" : true,
"settings" : null
},
{
"id" : "aOWO_dVXHdHie1WeGFE8k2",
"app_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Form Name 1",
"desc" : "Form description",
"post_action" : "email@email.com",
"position" : 0,
"sort_by" : null,
"asc" : false,
"per_page" : 10,
"allow_delete" : false,
"new_widget" : null,
"records_widget" : null,
"target_page" : null,
"allow_database" : true,
"send_emails" : true,
"settings" : null
} ]}
XML
方法GET
URL/apps/APP_ID/entities.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<forms type="array">
<form>
<id>c7zH3cKWrnqQvbrG8Nd3C7</id>
<app-id>akFSkDDdncMyoKjGnWFmoE</app-id>
<name>Form1</name>
<desc nil="true"></desc>
<post-action>igor.petrushenko@gmail.com</post-action>
<position type="integer">0</position>
<sort-by nil="true"></sort-by>
<asc type="boolean">false</asc>
<per-page type="integer">10</per-page>
<allow-delete type="boolean">false</allow-delete>
<new-widget nil="true"></new-widget>
<records-widget nil="true"></records-widget>
<target-page nil="true"></target-page>
<allow-database type="boolean">true</allow-database>
<send-emails type="boolean">true</send-emails>
<settings nil="true"></settings>
</form>
<form>
<id>aszH3cKWrnqQvbrG8Nd3C7</id>
<app-id>ddFSkDDdncMyoKjGnWFmoE</app-id>
<name>Form2</name>
<desc nil="true"></desc>
<post-action>igor.petrushenko@gmail.com</post-action>
<position type="integer">0</position>
<sort-by nil="true"></sort-by>
<asc type="boolean">false</asc>
<per-page type="integer">10</per-page>
<allow-delete type="boolean">false</allow-delete>
<new-widget nil="true"></new-widget>
<records-widget nil="true"></records-widget>
<target-page nil="true"></target-page>
<allow-database type="boolean">true</allow-database>
<send-emails type="boolean">true</send-emails>
<settings nil="true"></settings>
</form>
</forms>
由ID获取形状
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
JSON
方法GET
URL/apps/APP_ID/entities/ID.json
请求正文{"rest_api_key":"API_KEY"}
答案: 返回表格上的信息
{"form":
{"id" : "aOWO_dVXHdHie1WeGFE8k2",
"app_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Form Name 1",
"desc" : "Form description",
"post_action" : "email@email.com",
"position" : 0,
"sort_by" : null,
"asc" : false,
"per_page" : 10,
"allow_delete" : false,
"new_widget" : null,
"records_widget" : null,
"target_page" : null,
"allow_database" : true,
"send_emails" : true,
"settings" : null
}
}
XML
方法GET
URL/apps/APP_ID/entities/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<form>
<id>c7zH3cKWrnqQvbrG8Nd3C7</id>
<app-id>akFSkDDdncMyoKjGnWFmoE</app-id>
<name>Form1</name>
<desc nil="true"></desc>
<post-action>igor.petrushenko@gmail.com</post-action>
<position type="integer">0</position>
<sort-by nil="true"></sort-by>
<asc type="boolean">false</asc>
<per-page type="integer">10</per-page>
<allow-delete type="boolean">false</allow-delete>
<new-widget nil="true"></new-widget>
<records-widget nil="true"></records-widget>
<target-page nil="true"></target-page>
<allow-database type="boolean">true</allow-database>
<send-emails type="boolean">true</send-emails>
<settings nil="true"></settings>
</form>
获得形状按标题
你的API密钥
database_name你需要知道可以通过查询获取所有数据库获得数据库名的名称。
form_name你要知道,可致电获取所有的形式来获得他的形象的名字。
JSON
方法GET
URL/apps/search/entities/search.json
请求正文{"rest_api_key":"API_KEY", "database_name": "Database 21", "form_name": "Form Name 1"}
答案: 返回表格上的信息
{"form":
{"id" : "aOWO_dVXHdHie1WeGFE8k2",
"app_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Form Name 1",
"desc" : "Form description",
"post_action" : "email@email.com",
"position" : 0,
"sort_by" : null,
"asc" : false,
"per_page" : 10,
"allow_delete" : false,
"new_widget" : null,
"records_widget" : null,
"target_page" : null,
"allow_database" : true,
"send_emails" : true,
"settings" : null
}
}
XML
方法GET
URL/apps/search/entities/search.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<database_name>Database 21</database_name>
<form_name>Form1</form_name>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<form>
<id>c7zH3cKWrnqQvbrG8Nd3C7</id>
<app-id>akFSkDDdncMyoKjGnWFmoE</app-id>
<name>Form1</name>
<desc nil="true"></desc>
<post-action>igor.petrushenko@gmail.com</post-action>
<position type="integer">0</position>
<sort-by nil="true"></sort-by>
<asc type="boolean">false</asc>
<per-page type="integer">10</per-page>
<allow-delete type="boolean">false</allow-delete>
<new-widget nil="true"></new-widget>
<records-widget nil="true"></records-widget>
<target-page nil="true"></target-page>
<allow-database type="boolean">true</allow-database>
<send-emails type="boolean">true</send-emails>
<settings nil="true"></settings>
</form>
更新形式
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
name形式的新名称。查看所有可用的选项这里
JSON
方法PUT
URL/apps/APP_ID/entities/ID.json
请求正文{"rest_api_key":"API_KEY",
"name":"New form name"}
{"form":
{
"id" : "aOWO_dVXHdHie1WeGFE8k2",
"app_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "New form name",
"desc" : "Form description",
"post_action" : "email@email.com",
"position" : 0,
"sort_by" : null,
"asc" : false,
"per_page" : 10,
"allow_delete" : false,
"new_widget" : null,
"records_widget" : null,
"target_page" : null,
"allow_database" : true,
"send_emails" : true,
"settings" : null
}
}
XML
方法PUT
URL/apps/APP_ID/entities/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<name>New form name</name>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<form>
<id>c7zH3cKWrnqQvbrG8Nd3C7</id>
<app-id>akFSkDDdncMyoKjGnWFmoE</app-id>
<name>New form name</name>
<desc nil="true"></desc>
<post-action>igor.petrushenko@gmail.com</post-action>
<position type="integer">0</position>
<sort-by nil="true"></sort-by>
<asc type="boolean">false</asc>
<per-page type="integer">10</per-page>
<allow-delete type="boolean">false</allow-delete>
<new-widget nil="true"></new-widget>
<records-widget nil="true"></records-widget>
<target-page nil="true"></target-page>
<allow-database type="boolean">true</allow-database>
<send-emails type="boolean">true</send-emails>
<settings nil="true"></settings>
</form>
删除形式
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ID您必须知道要删除的表单的标识符。你可以找到ID 收到所有表格. 知道您需要替换的表单标识符ID 在 URL, 例如: /apps/APP_ID/entities/ID.json 在 /apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2.json
JSON
方法DELETE
URL/apps/APP_ID/entities/ID.json
请求正文{"rest_api_key":"API_KEY"}
答案
{"forms":[{"id" : "aOWO_dVXHdHie1WeGFE8k2",
"app_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Form Name 1",
"desc" : "Form description",
"post_action" : "email@email.com",
"position" : 0,
"sort_by" : null,
"asc" : false,
"per_page" : 10,
"allow_delete" : false,
"new_widget" : null,
"records_widget" : null,
"target_page" : null,
"allow_database" : true,
"send_emails" : true,
"settings" : null
},
{ "id" : "aOWO_dVXHdHie1WeGFE8k2",
"app_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Form Name 1",
"desc" : "Form description",
"post_action" : "email@email.com",
"position" : 0,
"sort_by" : null,
"asc" : false,
"per_page" : 10,
"allow_delete" : false,
"new_widget" : null,
"records_widget" : null,
"target_page" : null,
"allow_database" : true,
"send_emails" : true,
"settings" : null
} ]}
XML
方法DELETE
URL/apps/APP_ID/entities/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<forms type="array">
<form>
<id>c7zH3cKWrnqQvbrG8Nd3C7</id>
<app-id>akFSkDDdncMyoKjGnWFmoE</app-id>
<name>Form1</name>
<desc nil="true"></desc>
<post-action>igor.petrushenko@gmail.com</post-action>
<position type="integer">0</position>
<sort-by nil="true"></sort-by>
<asc type="boolean">false</asc>
<per-page type="integer">10</per-page>
<allow-delete type="boolean">false</allow-delete>
<new-widget nil="true"></new-widget>
<records-widget nil="true"></records-widget>
<target-page nil="true"></target-page>
<allow-database type="boolean">true</allow-database>
<send-emails type="boolean">true</send-emails>
<settings nil="true"></settings>
</form>
<form>
<id>aszH3cKWrnqQvbrG8Nd3C7</id>
<app-id>ddFSkDDdncMyoKjGnWFmoE</app-id>
<name>Form2</name>
<desc nil="true"></desc>
<post-action>igor.petrushenko@gmail.com</post-action>
<position type="integer">0</position>
<sort-by nil="true"></sort-by>
<asc type="boolean">false</asc>
<per-page type="integer">10</per-page>
<allow-delete type="boolean">false</allow-delete>
<new-widget nil="true"></new-widget>
<records-widget nil="true"></records-widget>
<target-page nil="true"></target-page>
<allow-database type="boolean">true</allow-database>
<send-emails type="boolean">true</send-emails>
<settings nil="true"></settings>
</form>
</forms>
创建窗体
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
name窗体名称
JSON
方法POST
URL/apps/APP_ID/entities.json
请求正文{"rest_api_key":"API_KEY", name: "New form"}
答案: 返回表格上的信息
{"form":
{
"id" : "aOWO_dVXHdHie1WeGFE8k2",
"app_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "New form",
"desc" : "Form description",
"post_action" : "email@email.com",
"position" : 0,
"sort_by" : null,
"asc" : false,
"per_page" : 10,
"allow_delete" : false,
"new_widget" : null,
"records_widget" : null,
"target_page" : null,
"allow_database" : true,
"send_emails" : true,
"settings" : null
}
}
XML
方法POST
URL/apps/APP_ID/entities.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<name>New form</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<form>
<id>c7zH3cKWrnqQvbrG8Nd3C7</id>
<app-id>akFSkDDdncMyoKjGnWFmoE</app-id>
<name>New form</name>
<desc nil="true"></desc>
<post-action>igor.petrushenko@gmail.com</post-action>
<position type="integer">0</position>
<sort-by nil="true"></sort-by>
<asc type="boolean">false</asc>
<per-page type="integer">10</per-page>
<allow-delete type="boolean">false</allow-delete>
<new-widget nil="true"></new-widget>
<records-widget nil="true"></records-widget>
<target-page nil="true"></target-page>
<allow-database type="boolean">true</allow-database>
<send-emails type="boolean">true</send-emails>
<settings nil="true"></settings>
</form>
这样字段属性可以通过REST API来获得。
唯一标识符字段
entity_id字段Id形式
name标题
type_name字段类型。可能是: string, text, integer, float, select, radio button, check box, date, dob, datetime, file, image, boolean, language, states, table, country, time_zone, note, divider, formula, autoincrement, login, password, signature, linked_column, rel, subform
说明
default该字段的默认值
validate_options验证选项
position位置域
visibletrue或false。它指示列是否在综合数据库可见
size字段大小
cols列字段类型表
rows行字段类型表
获取表单字段
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ENTITY_ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
JSON
方法GET
URL/apps/APP_ID/entities/ENTITY_ID/properties.json
请求正文{rest_api_key":"API_KEY"}
答案: 让所有的领域
{"fields":[
{"id" : "aOWO_dVXHdHie1WeGFE8k2",
"entity_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Field Name 1",
"desc" : "Field description",
"type_name" : "string",
"default" : "default value",
"validate_options" : "",
"position" : 0,
"visible" : true,
"size": 50,
"cols": 43,
"rows": 10
},
{"id" : "1i2i4VXHdHie1WeGFE8k2" ,
"entity_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Field Name 1",
"desc" : "Field description",
"type_name" : "string",
"default" : "default value",
"validate_options" : "",
"position" : 0,
"visible" : true,
"size": 50,
"cols": 43,
"rows": 10
}
]}
XML
方法GET
URL/apps/APP_ID/entities/ENTITY_ID/properties.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<fields type="array">
<field>
<id>clrSoltHDdQyozW5NcLrGd</id>
<entity-id>dcOSk2W6bdJOoPsCo8jmoE</entity-id>
<name>test</name>
<desc nil="true"></desc>
<type-name>string</type-name>
<default></default>
<validate-options></validate-options>
<position type="integer">0</position>
<visible type="boolean">true</visible>
<size type="integer">50</size>
<cols type="integer">43</cols>
<rows type="integer">10</rows>
</field>
<field>
<id>ddUHDhCgzeW6HkW4NdG3vE</id>
<entity-id>dcOSk2W6bdJOoPsCo8jmoE</entity-id>
<name>test2</name>
<desc nil="true"></desc>
<type-name>select</type-name>
<default>1slct2slct3slct4slct5</default>
<validate-options></validate-options>
<position type="integer">1</position>
<visible type="boolean">true</visible>
<size type="integer">50</size>
<cols type="integer">43</cols>
<rows type="integer">10</rows>
</field>
</fields>
获取字段
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ENTITY_ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
ID您必须知道字段ID。你可以找到身份证收到所有表格字段。知道字段标识符后,您需要替换URL中的ID,例如: /apps/APP_ID/entities/ENTITY_ID/properties/ID.json 在 /apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties/asdasddVXHdHie1WeGFE8k2.json
JSON
方法GET
URL/apps/APP_ID/entities/ENTITY_ID/properties/ID.json
请求正文{"rest_api_key":"API_KEY"}
答案
{"field":
{
"id" : "aOWO_dVXHdHie1WeGFE8k2",
"entity_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Field Name 1",
"desc" : "Field description",
"type_name" : "string",
"default" : "default value",
"validate_options" : "",
"position" : 0,
"visible" : true,
"size": 50,
"cols": 43,
"rows": 10
}
}
XML
方法GET
URL/apps/APP_ID/entities/ENTITY_ID/properties/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<field>
<id>clrSoltHDdQyozW5NcLrGd</id>
<entity-id>dcOSk2W6bdJOoPsCo8jmoE</entity-id>
<name>test</name>
<desc nil="true"></desc>
<type-name>string</type-name>
<default></default>
<validate-options></validate-options>
<position type="integer">0</position>
<visible type="boolean">true</visible>
<size type="integer">50</size>
<cols type="integer">43</cols>
<rows type="integer">10</rows>
</field>
获取有关字段名称
你的API密钥
database_name你需要知道可以通过查询获取所有数据库获得数据库名的名称。
form_name你要知道,可致电获取所有的形式来获得他的形象的名字。
field_name你要知道它可以通过一个电话来获得字段的让所有的领域的名字。
JSON
方法GET
URL/apps/search/entities/search/properties/search.json
请求正文{"rest_api_key":"API_KEY", "database_name": "Database 21", "form_name": "Form Name 1", "field_name": "Field Name 1"}
答案
{"field":
{"id" : "aOWO_dVXHdHie1WeGFE8k2",
"entity_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Field Name 1",
"desc" : "Field description",
"type_name" : "string",
"default" : "default value",
"validate_options" : "",
"position" : 0,
"visible" : true,
"size": 50,
"cols": 43,
"rows": 10
}
}
XML
方法GET
URL/apps/search/entities/search/properties/search.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<database_name>Database 21</database_name>
<form_name>Form1</form_name>
<field_name>test</field_name>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<field>
<id>clrSoltHDdQyozW5NcLrGd</id>
<entity-id>dcOSk2W6bdJOoPsCo8jmoE</entity-id>
<name>test</name>
<desc nil="true"></desc>
<type-name>string</type-name>
<default></default>
<validate-options></validate-options>
<position type="integer">0</position>
<visible type="boolean">true</visible>
<size type="integer">50</size>
<cols type="integer">43</cols>
<rows type="integer">10</rows>
</field>
运行动作
你的API密钥
DTYPE_ID您必须知道您的记录标识符。您可以使用 Fetch All Records 调用找到 ID。
ACTION_PROPERTY_ID您必须知道您的字段标识符。您可以使用 Fetch All Form Fields 调用找到 ID。
JSON
方法GET
URL/actions/ACTION_PROPERTY_ID.json
请求正文{"rest_api_key":"API_KEY", "dtype_id": "DTYPE_ID"}
答案
{\"success\":\"Done\"}
XML
方法GET
URL/actions/ACTION_PROPERTY_ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<dtype_id>DTYPE_ID</dtype_id>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<success>Done</success>
运行动作
你的API密钥
ACTION_PROPERTY_ID您必须知道您的字段标识符。您可以使用 Fetch All Form Fields 调用找到 ID。
dtype_ids您必须知道您的记录标识符。您可以使用 Fetch All Records 调用找到 ID。
json_dtype_ids您必须知道您的记录标识符。您可以使用 Fetch All Records 调用找到 ID。
run_by_all_table_or_report以下参数可用于运行表格或报告中的所有操作:run_by_all_table_or_report=true。
view要得到记录,你应该知道的报告ID。 (不一定)
JSON
方法GET
URL/actions/ACTION_PROPERTY_ID.json
请求正文{"rest_api_key":"API_KEY", "dtype_ids": ["ID1","ID2"...]}
{"rest_api_key":"API_KEY", "json_dtype_ids": "[\"ID1\",\"ID2\"...]"}
{"rest_api_key":"API_KEY", "run_by_all_table_or_report": true}
答案
{\"success\":\"Done\"}
XML
方法GET
URL/actions/ACTION_PROPERTY_ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<dtype_ids>"ID1","ID2"...</dtype_ids>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<json_dtype_ids>"[\"ID1\",\"ID2\"...]"</json_dtype_ids>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<run_by_all_table_or_report>true</run_by_all_table_or_report>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<success>Done</success>
更新域
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ENTITY_ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
ID您必须知道字段ID。你可以找到身份证收到所有表格字段。知道字段标识符后,您需要替换URL中的ID,例如: /apps/APP_ID/entities/ENTITY_ID/properties/ID.json 在 /apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties/asdasddVXHdHie1WeGFE8k2.json
name新的字段名称。可以找到所有可用的属性。在这里
JSON
方法PUT
URL/apps/APP_ID/entities/ENTITY_ID/properties/ID.json
请求正文{"rest_api_key":"API_KEY",
"name":"New field name"}
{"field":
{"id" : "aOWO_dVXHdHie1WeGFE8k2",
"entity_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Field Name 1",
"desc" : "Field description",
"type_name" : "string",
"default" : "default value",
"validate_options" : "",
"position" : 0,
"visible" : true,
"size": 50,
"cols": 43,
"rows": 10
}
}
XML
方法PUT
URL/apps/APP_ID/entities/ENTITY_ID/properties/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<name>New field name</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<field>
<id>clrSoltHDdQyozW5NcLrGd</id>
<entity-id>dcOSk2W6bdJOoPsCo8jmoE</entity-id>
<name>test</name>
<desc nil="true"></desc>
<type-name>string</type-name>
<default></default>
<validate-options></validate-options>
<position type="integer">0</position>
<visible type="boolean">true</visible>
<size type="integer">50</size>
<cols type="integer">43</cols>
<rows type="integer">10</rows>
</field>
删除字段
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ENTITY_ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
ID您必须知道字段ID。你可以找到身份证收到所有表格字段。知道字段标识符后,您需要替换URL中的ID,例如: /apps/APP_ID/entities/ENTITY_ID/properties/ID.json 在 /apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties/asdasddVXHdHie1WeGFE8k2.json
JSON
方法DELETE
URL/apps/APP_ID/entities/ENTITY_ID/properties/ID.json
请求正文{"rest_api_key":"API_KEY"}
答案
{"fields":[
{"id" : "aOWO_dVXHdHie1WeGFE8k2",
"entity_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Field Name 1",
"desc" : "Field description",
"type_name" : "string",
"default" : "default value",
"validate_options" : "",
"position" : 0,
"visible" : true,
"size": 50,
"cols": 43,
"rows": 10
},
{"id" : "1i2i4VXHdHie1WeGFE8k2" ,
"entity_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Field Name 1",
"desc" : "Field description",
"type_name" : "string",
"default" : "default value",
"validate_options" : "",
"position" : 0,
"visible" : true,
"size": 50,
"cols": 43,
"rows": 10
}
]}
XML
方法DELETE
URL/apps/APP_ID/entities/ENTITY_ID/properties/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<fields type="array">
<field>
<id>clrSoltHDdQyozW5NcLrGd</id>
<entity-id>dcOSk2W6bdJOoPsCo8jmoE</entity-id>
<name>test</name>
<desc nil="true"></desc>
<type-name>string</type-name>
<default></default>
<validate-options></validate-options>
<position type="integer">0</position>
<visible type="boolean">true</visible>
<size type="integer">50</size>
<cols type="integer">43</cols>
<rows type="integer">10</rows>
</field>
<field>
<id>ddUHDhCgzeW6HkW4NdG3vE</id>
<entity-id>dcOSk2W6bdJOoPsCo8jmoE</entity-id>
<name>test2</name>
<desc nil="true"></desc>
<type-name>select</type-name>
<default>1slct2slct3slct4slct5</default>
<validate-options></validate-options>
<position type="integer">1</position>
<visible type="boolean">true</visible>
<size type="integer">50</size>
<cols type="integer">43</cols>
<rows type="integer">10</rows>
</field>
</fields>
创建一个字段
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ENTITY_ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
name字段名称
type_name字段类型。可能是: string, text, integer, float, select, radio button, check box, date, dob, datetime, file, image, boolean, language, states, table, country, time_zone, note, divider, formula, autoincrement, login, password, rel, linked_column, signature, subform
JSON
方法POST
URL/apps/APP_ID/entities/ENTITY_ID/properties.json
请求正文{"rest_api_key":"API_KEY", name: "Field name 1", type_name: "string"}
答案: 返回表格上的信息
{"field":
{"id" : "aOWO_dVXHdHie1WeGFE8k2",
"entity_id" : "aOWO3eVXHdHie1WeGFE8k2",
"name" : "Field Name 1",
"desc" : "Field description",
"type_name" : "string",
"default" : "default value",
"validate_options" : "",
"position" : 0,
"visible" : true,
"size": 50,
"cols": 43,
"rows": 10
}
}
XML
方法POST
URL/apps/APP_ID/entities/ENTITY_ID/properties.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<name>Form field 1</name>
<type-name>string</type-name>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<field>
<id>clrSoltHDdQyozW5NcLrGd</id>
<entity-id>dcOSk2W6bdJOoPsCo8jmoE</entity-id>
<name>test</name>
<desc nil="true"></desc>
<type-name>string</type-name>
<default></default>
<validate-options></validate-options>
<position type="integer">0</position>
<visible type="boolean">true</visible>
<size type="integer">50</size>
<cols type="integer">43</cols>
<rows type="integer">10</rows>
</field>
</field>
在栏中获取金额
你的API密钥
ENTITY_ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
ID您必须知道字段ID。你可以找到身份证收到所有表格字段。知道字段标识符后,您需要替换URL中的ID,例如: /apps/APP_ID/entities/ENTITY_ID/properties/ID.json 在 /apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties/asdasddVXHdHie1WeGFE8k2.json
view要得到记录,你应该知道的报告ID。 (不一定)
JSON
方法GET
URL/search/sum/ENTITY_ID/ID.json
请求正文{"rest_api_key":"API_KEY",
view: "ImWO3eVXHdHie1WeGFE8k2"}
{total: 3}
XML
方法GET
URL/search/sum/ENTITY_ID/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<view>ImWO3eVXHdHie1WeGFE8k2</view>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<total>
3
</total>
这样记录属性可以通过获得 REST API。
创纪录的唯一标识符。
app_idID应用程式
entity_idID条目形式。
values创纪录的哈希值。其中键是在 id字段下,并且该值 - 字段”的值
json_values记录值哈希。其中键是 字段 id,值是该字段值。类似于 values_hash,但采用 JSON 格式
rel_values关系记录的哈希值。其中关键是在 id字段,和值 - 标识符相关的记录
哈希值的子窗体记录。其中键是在 id字段下,并且该值 - 的标识符子窗体记录的阵列。
approved如果适度是启用的数据库,这个属性指示于一体的综合数据库的条目doustupna是否。
created_at时间是创建记录。
updated_at当记录的最后更新的时间。
获取记录
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ENTITY_ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
view要得到记录,你应该知道的报告ID。 (不一定)
page记录页号从1到的记录/ per_page 的数量”。
name_value使用参数获取以下形式的记录:“字段名称”:“值”,“字段ID”:“字段名称”
fetch_all对于付费帐户的所有者,可以使用以下参数:fetch_all=true。
要获取特定数量的帖子,请使用 per_page 参数。
不同计划per_page的最大条目数限制:
FREE - 200
STANDARD - 500
PROFESSIONAL - 1000
ENTERPRISE - 2000
STANDARD EXPRESS - 4000
PROFESSIONAL EXPRESS - 8000
ENTERPRISE EXPRESS - 15000
请求正文
{"rest_api_key":"API_KEY", "page": 1, "name_value": 1, "view": 'EaWQZdIXfahOqWvcvwrGTP', "fetch_all": true, "per_page": 2000}
JSON
方法GET
URL/apps/APP_ID/dtypes/entity/ENTITY_ID.json
请求正文{"rest_api_key":"API_KEY", "page": 1, "name_value": 1, "view": 'EaWQZdIXfahOqWvcvwrGTP'}
答案
{"records":[
{
"id":"bYWQnuBajdBOkAW4BdMmki",
"app_id":"ddIbpcNSncW5xcHxpdHCoW",
"entity_id":"aEWQZdIXfahOqWvcvwrGTP",
"values":{"value name 1":"2",
"aNW4nkW5bdUjldO8oKuSku":"value name 1",
"value name 2":"aaa",
"aMW4HKWR9bnOoGWQbpWQS4":"value name 2",
"value name 3":"ddd",
"cMW6pcTSjbWOFdTCkBtmkN":"value name 3"},
"approved":false,
"created_at":"2011-09-17T10:40:40-05:00",
"updated_at":"2011-09-17T10:40:40-05:00"
},
{
"id":"bYWQnuBajdBOkAW4BdMmki",
"app_id":"ddIbpcNSncW5xcHxpdHCoW",
"entity_id":"aEWQZdIXfahOqWvcvwrGTP",
"values":{"value name 1":"2",
"aNW4nkW5bdUjldO8oKuSku":"value name 1",
"value name 2":"aaa",
"aMW4HKWR9bnOoGWQbpWQS4":"value name 2",
"value name 3":"ddd",
"cMW6pcTSjbWOFdTCkBtmkN":"value name 3"},
"approved":false,
"created_at":"2011-09-17T10:40:40-05:00",
"updated_at":"2011-09-17T10:40:40-05:00"
}
]
}
XML
方法GET
URL/apps/APP_ID/dtypes/entity/ENTITY_ID.json
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<view>EaWQZdIXfahOqWvcvwrGTP</view>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<records type="array">
<record>
<id>bYWQnuBajdBOkAW4BdMmki</id>
<app-id>ddIbpcNSncW5xcHxpdHCoW</app-id>
<entity-id>aEWQZdIXfahOqWvcvwrGTP</entity-id>
<values>
<aNW4nkW5bdUjldO8oKuSku>2</aNW4nkW5bdUjldO8oKuSku>
<aMW4HKWR9bnOoGWQbpWQS4>aaa</aMW4HKWR9bnOoGWQbpWQS4>
<cMW6pcTSjbWOFdTCkBtmkN>ddd</cMW6pcTSjbWOFdTCkBtmkN>
</values>
<approved type="boolean">false</approved>
<created-at type="datetime">2011-09-17T10:40:40-05:00</created-at>
<updated-at type="datetime">2011-09-17T10:40:40-05:00</updated-at>
</record>
<record>
<id>dcQSkdWO1odA5HAmkYWOix</id>
<app-id>ddIbpcNSncW5xcHxpdHCoW</app-id>
<entity-id>aEWQZdIXfahOqWvcvwrGTP</entity-id>
<values>
<aNW4nkW5bdUjldO8oKuSku>1</aNW4nkW5bdUjldO8oKuSku>
<aMW4HKWR9bnOoGWQbpWQS4>test</aMW4HKWR9bnOoGWQbpWQS4>
<cMW6pcTSjbWOFdTCkBtmkN>test2</cMW6pcTSjbWOFdTCkBtmkN>
</values>
<approved type="boolean">false</approved>
<created-at type="datetime">2011-09-17T04:28:10-05:00</created-at>
<updated-at type="datetime">2011-09-17T04:28:10-05:00</updated-at>
</record>
</records>
获取记录
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ID您必须知道记录ID. ID可以找到 收到所有记录. 知道您需要替换的表单标识符ID 在 URL 例如: /apps/APP_ID/dtypes/ID.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/dtypes/asd987asdasd97asd.json
name_value使用参数获取以下形式的记录:“字段名称”:“值”,“字段ID”:“字段名称”
JSON
方法GET
URL/apps/APP_ID/dtypes/ID.json
请求正文{"rest_api_key":"API_KEY", "name_value": 1}
答案
{"record":
{
"id":"bYWQnuBajdBOkAW4BdMmki",
"app_id":"ddIbpcNSncW5xcHxpdHCoW",
"entity_id":"aEWQZdIXfahOqWvcvwrGTP",
"values":{"value name 1":"2",
"aNW4nkW5bdUjldO8oKuSku":"value name 1",
"value name 2":"aaa",
"aMW4HKWR9bnOoGWQbpWQS4":"value name 2",
"value name 3":"ddd",
"cMW6pcTSjbWOFdTCkBtmkN":"value name 3"},
"approved":false,
"created_at":"2011-09-17T10:40:40-05:00",
"updated_at":"2011-09-17T10:40:40-05:00"
}
}
XML
方法GET
URL/apps/APP_ID/dtypes/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<record>
<id>bYWQnuBajdBOkAW4BdMmki</id>
<app-id>ddIbpcNSncW5xcHxpdHCoW</app-id>
<entity-id>aEWQZdIXfahOqWvcvwrGTP</entity-id>
<values>
<aNW4nkW5bdUjldO8oKuSku>2</aNW4nkW5bdUjldO8oKuSku>
<aMW4HKWR9bnOoGWQbpWQS4>aaa</aMW4HKWR9bnOoGWQbpWQS4>
<cMW6pcTSjbWOFdTCkBtmkN>ddd</cMW6pcTSjbWOFdTCkBtmkN>
</values>
<approved type="boolean">false</approved>
<created-at type="datetime">2011-09-17T10:40:40-05:00</created-at>
<updated-at type="datetime">2011-09-17T10:40:40-05:00</updated-at>
</record>
更新记录
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ID您必须知道记录ID. ID可以找到 收到所有记录. 知道您需要替换的表单标识符ID 在 URL 例如: /apps/APP_ID/dtypes/ID.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/dtypes/asd987asdasd97asd.json
values散列条目值,其中关键是表单字段的标识符
json_values如果您使用jQuery,Ruby或其他编程语言,请在'values'参数中将记录的值作为编码的哈希值传递。但是,如果您的框架不允许您执行此操作,则可以将记录值作为JSON字符串发送,例如: "{"aNW4nkW5bdUjldO8oKuSku":"2", "aMW4HKWR9bnOoGWQbpWQS4":"aaa"}". 但是然后使用参数名称'json_values'。
subforms_values / subforms_json_values要创建或更新子表单,类似地,使用选项'subforms_values' 或 'json_subforms_values'.
格式如下:
"{property1_id: {entity_id: subform1_id, subform1_record1_id: {subform1_field1_id: "2", subform1_field2_id: "aaa"}, subform1_record2_id: {subform1_field1_id: "3", subform1_field2_id: "bb"}}, property2_id: {entity_id: subform2_id, subform2_record1_id: {subform2_field1_id: "4", subform2_field2_id: "bb"}, subform2_record2_id: {subform2_field1_id: "5", subform2_field2_id: "dd"}}}" .
其中property1_id和property2_id是主表中具有Subform类型的字段的ID。
subform1_id, subform2_id - 由property1_id和property2_id字段指向的表单的ID。
subform1_record1_id и subform1_record2_id - 这是新的或现有的子表单条目的ID。
subform1_field1_id, subform1_field2_id - 字段ID的格式为subform1_id。
subform2_field1_id, subform2_field2_id - 字段ID的格式为subform2_id。
所有ID都是22个字符的URL安全base64,可以从其他API调用中获取它们,也可以为新条目的ID独立创建它们。
JSON
方法PUT
URL/apps/APP_ID/dtypes/ID.json
请求正文{"rest_api_key":"API_KEY", "values": {"aNW4nkW5bdUjldO8oKuSku" : 3, "aMW4HKWR9bnOoGWQbpWQS4" : "b", "cMW6pcTSjbWOFdTCkBtmkN" : "c"}}
答案
{"record":
{
"id":"bYWQnuBajdBOkAW4BdMmki",
"app_id":"ddIbpcNSncW5xcHxpdHCoW",
"entity_id":"aEWQZdIXfahOqWvcvwrGTP",
"values":{"aNW4nkW5bdUjldO8oKuSku":"3",
"aMW4HKWR9bnOoGWQbpWQS4":"b",
"cMW6pcTSjbWOFdTCkBtmkN":"c"},
"approved":false,
"created_at":"2011-09-17T10:40:40-05:00",
"updated_at":"2011-09-17T10:40:40-05:00"
}
}
XML
方法PUT
URL/apps/APP_ID/dtypes/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<values>{"aNW4nkW5bdUjldO8oKuSku"=>3, "aMW4HKWR9bnOoGWQbpWQS4"=>"b", "cMW6pcTSjbWOFdTCkBtmkN"=>"c"}</values>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<record>
<id>bYWQnuBajdBOkAW4BdMmki</id>
<app-id>ddIbpcNSncW5xcHxpdHCoW</app-id>
<entity-id>aEWQZdIXfahOqWvcvwrGTP</entity-id>
<values>
<aNW4nkW5bdUjldO8oKuSku>3</aNW4nkW5bdUjldO8oKuSku>
<aMW4HKWR9bnOoGWQbpWQS4>b</aMW4HKWR9bnOoGWQbpWQS4>
<cMW6pcTSjbWOFdTCkBtmkN>c</cMW6pcTSjbWOFdTCkBtmkN>
</values>
<approved type="boolean">false</approved>
<created-at type="datetime">2011-09-17T10:40:40-05:00</created-at>
<updated-at type="datetime">2011-09-17T10:40:40-05:00</updated-at>
</record>
更新多个记录
你的API密钥
confirm_action在表格或报表中运行更新需要以下参数:confirm_action: update。
ENTITY_ID您必须知道字段的表单标识符才能更新字段设置。您可以使用 Fetch All Forms 调用找到 ENTITY_ID。
APP_ID您必须知道您的数据库标识符才能获取数据库信息。您可以使用 Fetch All Databases 调用找到 ID。
dtype_ids您必须知道您的记录标识符。您可以使用 Fetch All Records 调用找到 ID。
json_dtype_ids您必须知道您的记录标识符。您可以使用 Fetch All Records 调用找到 ID。
update_id您必须知道您的字段标识符。您可以使用 Fetch All Form Fields 调用找到 ID。
update_term记录的新值
view要得到记录,你应该知道的报告ID。 (不一定)
JSON
方法POST
URL/dtypes/confirm_action/APP_ID/ENTITY_ID.json
请求正文{rest_api_key: "YOUR_KEY",
confirm_action: "update",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
json_dtype_ids: "[\"ID1\",\"ID2\"...]",
update_id: "UPDATE_ID",
update_term: "UPDATE_TERM"}
{rest_api_key: "YOUR_KEY",
confirm_action: "update",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
dtype_ids: ["ID1","ID2"...],
update_id: "UPDATE_ID",
update_term: "UPDATE_TERM"}
{\"success\":\"Done\"}
XML
方法POST
URL/dtypes/confirm_action/APP_ID/ENTITY_ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<confirm_action>update</confirm_action>
<entity_id>ENTITY_ID</entity_id>
<app_id>APP_ID</app_id>
<dtype_ids>"ID1","ID2"...</dtype_ids>
<update_id>UPDATE_ID</update_id>
<update_term>UPDATE_TERM</update_term>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<confirm_action>update</confirm_action>
<entity_id>ENTITY_ID</entity_id>
<app_id>APP_ID</app_id>
<json_dtype_ids>"[\"ID1\",\"ID2\"...]"</json_dtype_ids>
<update_id>UPDATE_ID</update_id>
<update_term>UPDATE_TERM</update_term>
</api_call_params>
答案
<?xml version="1.0" encoding="UTF-8"?>
<success>Done</success>
更新所有记录
你的API密钥
confirm_action运行表或报告中所有记录的更新需要以下参数:confirm_action: update_all。
ENTITY_ID您必须知道字段的表单标识符才能更新字段设置。您可以使用 Fetch All Forms 调用找到 ENTITY_ID。
APP_ID您必须知道您的数据库标识符才能获取数据库信息。您可以使用 Fetch All Databases 调用找到 ID。
update_id您必须知道您的字段标识符。您可以使用 Fetch All Form Fields 调用找到 ID。
update_term记录的新值
view要得到记录,你应该知道的报告ID。 (不一定)
JSON
方法POST
URL/dtypes/confirm_action/APP_ID/ENTITY_ID.json
请求正文{rest_api_key: "YOUR_KEY",
confirm_action: "update_all",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
update_id: "UPDATE_ID",
update_term: "UPDATE_TERM"}
{\"success\":\"Done\"}
XML
方法POST
URL/dtypes/confirm_action/APP_ID/ENTITY_ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<confirm_action>update_all</confirm_action>
<entity_id>ENTITY_ID</entity_id>
<app_id>APP_ID</app_id>
<update_id>UPDATE_ID</update_id>
<update_term>UPDATE_TERM</update_term>
</api_call_params>
答案
<?xml version="1.0" encoding="UTF-8"?>
<success>Done</success>
刷新数据的单元格
你的API密钥
PROPERTY_ID您必须知道字段ID。你可以找到身份证收到所有表格字段。知道字段标识符后,您需要替换URL中的ID,例如: /apps/APP_ID/entities/ENTITY_ID/properties/ID.json 在 /apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties/asdasddVXHdHie1WeGFE8k2.json
DTYPE_ID您必须知道记录ID. ID可以找到 收到所有记录. 知道您需要替换的表单标识符ID 在 URL 例如: /apps/APP_ID/dtypes/ID.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/dtypes/asd987asdasd97asd.json
val所述单元数据的新值
JSON
方法PATCH/PUT/POST
URL/cell_values/DTYPE_ID/update_cell_value/PROPERTY_ID.json
请求正文{"rest_api_key":"API_KEY", "property_id": "aNW4nkW5bdUjldO8oKuSku", "dtype_id": "cMW6pcTSjbWOFdTCkBtmkN", "val": "John Smith"}
答案
{"new_value": "John Smith"}
XML
方法PATCH/PUT/POST
URL/cell_values/DTYPE_ID/update_cell_value/PROPERTY_ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<val>John Smith</val>
<rest_api_key>API_KEY</rest_api_key>
<dtype-id>cMW6pcTSjbWOFdTCkBtmkN</dtype-id>
<property-id>aNW4nkW5bdUjldO8oKuSku</property-id>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<new_value>
John Smith
</new_value>
删除条目
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ID您必须知道记录ID. ID可以找到 收到所有记录. 知道您需要替换的表单标识符ID 在 URL 例如: /apps/APP_ID/dtypes/ID.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/dtypes/asd987asdasd97asd.json
JSON
方法DELETE
URL/apps/APP_ID/dtypes/ID.json
请求正文{"rest_api_key":"API_KEY"}
答案
{"record":
{
"id":"bYWQnuBajdBOkAW4BdMmki",
"app_id":"ddIbpcNSncW5xcHxpdHCoW",
"entity_id":"aEWQZdIXfahOqWvcvwrGTP",
"values":{"aNW4nkW5bdUjldO8oKuSku":"3",
"aMW4HKWR9bnOoGWQbpWQS4":"b",
"cMW6pcTSjbWOFdTCkBtmkN":"c"},
"approved":false,
"created_at":"2011-09-17T10:40:40-05:00",
"updated_at":"2011-09-17T10:40:40-05:00"
}
}
XML
方法DELETE
URL/apps/APP_ID/dtypes/ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<record>
<id>bYWQnuBajdBOkAW4BdMmki</id>
<app-id>ddIbpcNSncW5xcHxpdHCoW</app-id>
<entity-id>aEWQZdIXfahOqWvcvwrGTP</entity-id>
<values>
<aNW4nkW5bdUjldO8oKuSku>3</aNW4nkW5bdUjldO8oKuSku>
<aMW4HKWR9bnOoGWQbpWQS4>b</aMW4HKWR9bnOoGWQbpWQS4>
<cMW6pcTSjbWOFdTCkBtmkN>c</cMW6pcTSjbWOFdTCkBtmkN>
</values>
<approved type="boolean">false</approved>
<created-at type="datetime">2011-09-17T10:40:40-05:00</created-at>
<updated-at type="datetime">2011-09-17T10:40:40-05:00</updated-at>
</record>
删除多个条目
你的API密钥
ENTITY_ID您必须知道字段的表单标识符才能更新字段设置。您可以使用 Fetch All Forms 调用找到 ENTITY_ID。
APP_ID您必须知道您的数据库标识符才能获取数据库信息。您可以使用 Fetch All Databases 调用找到 ID。
dtype_ids您必须知道您的记录标识符。您可以使用 Fetch All Records 调用找到 ID。
json_dtype_ids您必须知道您的记录标识符。您可以使用 Fetch All Records 调用找到 ID。 (不一定)
JSON
方法POST
URL/apps/APP_ID/dtypes/delete_multiple.json
请求正文{rest_api_key: "YOUR_KEY",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
json_dtype_ids: "[\"ID1\",\"ID2\"...]"}
{rest_api_key: "YOUR_KEY",
entity_id: "ENTITY_ID",
app_id: "APP_ID",
dtype_ids: ["ID1","ID2"...]}
{\"success\":\"Done\"}
XML
方法POST
URL/apps/APP_ID/dtypes/delete_multiple.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<entity_id>ENTITY_ID</entity_id>
<app_id>APP_ID</app_id>
<json_dtype_ids>"[\"ID1\",\"ID2\"...]"</json_dtype_ids>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<entity_id>ENTITY_ID</entity_id>
<app_id>APP_ID</app_id>
<dtype_ids>"ID1","ID2"...</dtype_ids>
</api_call_params>
答案
<?xml version="1.0" encoding="UTF-8"?>
<success>Done</success>
删除所有
你的API密钥
APP_ID您必须知道您的数据库标识符才能获取数据库信息。您可以使用 Fetch All Databases 调用找到 ID。
ENTITY_ID您必须知道字段的表单标识符才能更新字段设置。您可以使用 Fetch All Forms 调用找到 ENTITY_ID。
view要得到记录,你应该知道的报告ID。 (不一定)
JSON
方法DELETE
URL/dtypes/APP_ID/delete_all/ENTITY_ID.json
请求正文{rest_api_key: "YOUR_KEY", entity_id: "ENTITY_ID"}
答案
{\"success\":\"Done\"}
XML
方法DELETE
URL/dtypes/APP_ID/delete_all/ENTITY_ID.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
<entity_id>ENTITY_ID</entity_id>
</api_call_params>
答案
<?xml version="1.0" encoding="UTF-8"?>
<success>Done</success>
新条目
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ENTITY_ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
ID如果需要使用您的个人ID,您可以生成 UUID(唯一标识符) 22个字符长的URL安全base64,例如 target='_blank' rel ='nofollow'>。接下来,您需要将其传递到'values'哈希值,例如:values => {'id'=> ID},更改为:值=> {'id'=>'22adadVXHdHie1WeGFE8k2'},否则系统将为您生成一个唯一标识符。
values / json_values如果您使用jQuery,Ruby或其他编程语言,请在'values'参数中将记录的值作为编码的哈希值传递。但是,如果您的框架不允许您执行此操作,则可以将记录值作为JSON字符串发送,例如: "{"aNW4nkW5bdUjldO8oKuSku":"2", "aMW4HKWR9bnOoGWQbpWQS4":"aaa"}". 但是然后使用参数名称'json_values'。
subforms_values / subforms_json_values要创建或更新子表单,类似地,使用选项'subforms_values' 或 'json_subforms_values'.
格式如下:
"{property1_id: {entity_id: subform1_id, subform1_record1_id: {subform1_field1_id: "2", subform1_field2_id: "aaa"}, subform1_record2_id: {subform1_field1_id: "3", subform1_field2_id: "bb"}}, property2_id: {entity_id: subform2_id, subform2_record1_id: {subform2_field1_id: "4", subform2_field2_id: "bb"}, subform2_record2_id: {subform2_field1_id: "5", subform2_field2_id: "dd"}}}" .
其中property1_id和property2_id是主表中具有Subform类型的字段的ID。
subform1_id, subform2_id - 由property1_id和property2_id字段指向的表单的ID。
subform1_record1_id и subform1_record2_id - 这是新的或现有的子表单条目的ID。
subform1_field1_id, subform1_field2_id - 字段ID的格式为subform1_id。
subform2_field1_id, subform2_field2_id - 字段ID的格式为subform2_id。
所有ID都是22个字符的URL安全base64,可以从其他API调用中获取它们,也可以为新条目的ID独立创建它们。
JSON
方法POST
URL/apps/APP_ID/dtypes.json
请求正文{"rest_api_key":"API_KEY", "values": {"entity_id" : ENTITY_ID, "id" : ID, "aNW4nkW5bdUjldO8oKuSku":"3", "aMW4HKWR9bnOoGWQbpWQS4":"b","cMW6pcTSjbWOFdTCkBtmkN":"c"}}
答案: 返回表格上的信息
{"record":
{
"id":"bYWQnuBajdBOkAW4BdMmki",
"app_id":"ddIbpcNSncW5xcHxpdHCoW",
"entity_id":"aEWQZdIXfahOqWvcvwrGTP",
"values":{"aNW4nkW5bdUjldO8oKuSku":"3",
"aMW4HKWR9bnOoGWQbpWQS4":"b",
"cMW6pcTSjbWOFdTCkBtmkN":"c"},
"approved":false,
"created_at":"2011-09-17T10:40:40-05:00",
"updated_at":"2011-09-17T10:40:40-05:00"
}
}
XML
方法POST
URL/apps/APP_ID/dtypes.xml
请求正文
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<values>{"aNW4nkW5bdUjldO8oKuSku"=>3,"entity_id"=>ENTITY_ID, "id"=>ID,"aMW4HKWR9bnOoGWQbpWQS4"=>"b", "cMW6pcTSjbWOFdTCkBtmkN"=>"c"}</values><
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<record>
<id>bYWQnuBajdBOkAW4BdMmki</id>
<app-id>ddIbpcNSncW5xcHxpdHCoW</app-id>
<entity-id>aEWQZdIXfahOqWvcvwrGTP</entity-id>
<values>
<aNW4nkW5bdUjldO8oKuSku>3</aNW4nkW5bdUjldO8oKuSku>
<aMW4HKWR9bnOoGWQbpWQS4>b</aMW4HKWR9bnOoGWQbpWQS4>
<cMW6pcTSjbWOFdTCkBtmkN>c</cMW6pcTSjbWOFdTCkBtmkN>
</values>
<approved type="boolean">false</approved>
<created-at type="datetime">2011-09-17T10:40:40-05:00</created-at>
<updated-at type="datetime">2011-09-17T10:40:40-05:00</updated-at>
</record>
搜索
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
ENTITY_ID你要知道,你可以找到ENTITY_ID 收到所有表格. 知道您需要替换的表单标识符ENTITY_ID 在 URL, 例如: /apps/APP_ID/entities.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/entities.json
view要得到记录,你应该知道的报告ID。 (不一定)
search您想在桌子上轻弹一下吗? “ SEARCH_TERM”,“ o” =>“ SEARCH_CRITERIA”}]]。
PROPERTY_ID-我们用来搜索的字段标识符( -ALL--搜索所有列),
SEARCH_TERM-我们正在寻找的值,
SEARCH_CRITERIA-一条消息的标准,也许是其中之一:
is, is_not, is_empty, is_not_empty, starts_with, ends_with, like, contains, not_contains.
有关常规数字和日期 : less_than, greater_than, less_than_or_equal_to, greater_than_or_equal_to.
约会约一个小时 : before, after, this_day_and_before, this_day_and_after, yesterday, today, tomorrow, today_or_later, last_7_days, last_30_days,
last_60_days, last_90_days, last_120_days, next_7_days, next_30_days, next_60_days, next_90_days, next_120_days, next_n_days, last_n_days,
last_week, this_week, next_week, current_and_prev_week, current_and_next_week, next_n_weeks, last_n_weeks, last_month, this_month, next_month,
current_and_prev_month, current_and_next_month, next_n_months, last_n_months, last_year, this_year, last_2_years, next_2_years, current_and_prev_year,
current_and_next_year, next_n_years, last_n_years.
系统栏 : added_by, created_at, updated_at, ip.
如果您要使用统一的“ AND”条件在几列中进行搜索,则这些条件应放在一个数组中, 如果为“ OR”,则分成一个单独的例子,例如:
[[{"a" => "PROPERTY_ID_1", "b" => "A", "o" => "is"}, {"a" => "PROPERTY_ID_2", "b" => "A", "o" => "is"}],
[{"a" => "PROPERTY_ID_3", "b" => "B", "o" => "SEARCH_CRITERIA"}]]
搜索公式将是: "Find all records where PROPERTY_ID_1 AND PROPERTY_ID_2 are equal to A OR PROPERTY_ID_3 is equal to B"
搜索结果中的记录数,最大为200。
JSON
方法POST
URL/search/APP_ID.json
请求正文{"rest_api_key":"API_KEY", "entity_id" => "ENTITY_ID", "search": [[{"a"=>"aNW4nkW5bdUjldO8oKuSku", "b"=>"value name 1", "o"=>"is"}]]}
答案
{"records":[
{
"id":"bYWQnuBajdBOkAW4BdMmki",
"app_id":"ddIbpcNSncW5xcHxpdHCoW",
"entity_id":"aEWQZdIXfahOqWvcvwrGTP",
"values":{"value name 1":"2",
"aNW4nkW5bdUjldO8oKuSku":"value name 1",
"value name 2":"aaa",
"aMW4HKWR9bnOoGWQbpWQS4":"value name 2",
"value name 3":"ddd",
"cMW6pcTSjbWOFdTCkBtmkN":"value name 3"},
"approved":false,
"created_at":"2011-09-17T10:40:40-05:00",
"updated_at":"2011-09-17T10:40:40-05:00"
},
{
"id":"bYWQnuBajdBOkAW4BdMmki",
"app_id":"ddIbpcNSncW5xcHxpdHCoW",
"entity_id":"aEWQZdIXfahOqWvcvwrGTP",
"values":{"value name 1":"2",
"aNW4nkW5bdUjldO8oKuSku":"value name 1",
"value name 2":"aaa",
"aMW4HKWR9bnOoGWQbpWQS4":"value name 2",
"value name 3":"ddd",
"cMW6pcTSjbWOFdTCkBtmkN":"value name 3"},
"approved":false,
"created_at":"2011-09-17T10:40:40-05:00",
"updated_at":"2011-09-17T10:40:40-05:00"
}
]
}
友情链接
为了在记录之间建立连接,您需要在请求中发送一个单独的哈希值以创建或更新记录。
curl -H 'Content-Type: application/json' -X PUT -d '{"rel":{REL_ID:RECORD_ID}}' "https://quintadb.ru/apps/APP_ID/dtypes/CURRENT_RECORD_ID.json?rest_api_key=API_KEY"
哈希应采用以下形式'rel' => {rel_id => RECORD_ID} 或 'rel' => {rel_id => [RECORD_ID, RECORD_ID2]} 如果您有多对多关系。其中RECORD_ID是要与当前记录关联的记录的标识符。下面是如何获取rel_id。
你的API密钥
PROPERTY_ID您必须知道字段ID。你可以找到身份证收到所有表格字段。知道字段标识符后,您需要替换URL中的ID,例如: /apps/APP_ID/entities/ENTITY_ID/properties/ID.json 在 /apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties/asdasddVXHdHie1WeGFE8k2.json
ENTITY_ID您必须知道表单标识符。你可以找到ENTITY_ID 收到所有表格。知道您需要替换的表单标识符ENTITY_ID在URL,例如/apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
JSON
方法GET
URL/entities/ENTITY_ID/get_rel_id/PROPERTY_ID.json?rest_api_key=API_KEY
请求正文{"rest_api_key":"API_KEY", {"entity_id" : ENTITY_ID, "property_id" : PROPERTY_ID}}
答案
11842
此類報告屬性可以通過REST API訪問。
ID
name标题
ID应用程式
entity_id表(表格)ID
created_at时间是创建记录。
updated_at当记录的最后更新的时间。
獲取報告
你的API密钥
APP_IDID应用程式
ENTITY_ID表(表格)ID
JSON
方法GET
URL/apps/APP_ID/entities/ENTITY_ID/views/index.json
请求正文{"rest_api_key":"API_KEY"}
答案: 返回所有表報告。
{"reports":[
{"id" : "aOWO_dVXHdHie1WeGFE8k2"
"name" : "Report Name 1",
"created_at" : "2011-08-16T05:42:40-05:00",
"updated_at" : "2011-08-16T05:42:40-05:00",
"entity_id" : 'aEWQZdIXfahOqWvcvwrGTP',
"app_id" : 'ddIbpcNSncW5xcHxpdHCoW'
},
{"id" : "aOWO3eVXHdHie1WeGFE8k2"
"name" : "Report Name 2",
"created_at" : "2011-04-29T01:26:22-05:00",
"updated_at" : "2011-08-16T00:47:56-05:00",
"entity_id" : 'RtWQZdIXfahOqWvcvwrGTP',
"app_id" : 'ddIbpcNSncW5xcHxpdHCoW'
} ]}
XML
方法GET
URL/apps/APP_ID/entities/ENTITY_ID/views/index.xml
请求正文: 返回所有表報告。
<?xml version="1.0" encoding="UTF-8"?>
<api_call_params>
<rest_api_key>API_KEY</rest_api_key>
</api_call_params>
<?xml version="1.0" encoding="UTF-8"?>
<reports type="array">
<report>
<id>bYWQnuBajdBOkAW4BdMmki</id>
<app-id>ddIbpcNSncW5xcHxpdHCoW</app-id>
<entity-id>aEWQZdIXfahOqWvcvwrGTP</entity-id>
<created-at type="datetime">2011-09-17T10:40:40-05:00</created-at>
<updated-at type="datetime">2011-09-17T10:40:40-05:00</updated-at>
</record>
<record>
<id>dcQSkdWO1odA5HAmkYWOix</id>
<app-id>ddIbpcNSncW5xcHxpdHCoW</app-id>
<entity-id>aEWQZdIXfahOqWvcvwrGTP</entity-id>
<created-at type="datetime">2011-09-17T04:28:10-05:00</created-at>
<updated-at type="datetime">2011-09-17T04:28:10-05:00</updated-at>
</report>
</reports>
得到一个链接到文件
上传文件
require 'open-uri'
require 'openssl'
require 'net/http'
require 'json'
require 'securerandom'
#MultipartPost
class MultipartPost
BOUNDARY = "-----------RubyMultipartPost"
EOL = "\r\n"
def initialize uri, &block
@params = Array.new
@uri = URI.parse uri
instance_eval &block if block
end
def params_part key, value
@params << multipart_text(key, value)
end
def files_part key, filename, mime_type, content
@params << multipart_file(key, filename, mime_type, content)
end
def request_body
body = @params.map{|p| "--#{BOUNDARY}#{EOL}" << p}.join ""
body << "#{EOL}--#{BOUNDARY}--#{EOL}"
end
def run
https = Net::HTTP.new @uri.host, @uri.port
https.use_ssl = true
https.verify_mode = (OpenSSL::SSL::VERIFY_PEER)
request = Net::HTTP::Post.new @uri.request_uri
request.body = request_body
request.set_content_type "multipart/form-data", {"boundary" => BOUNDARY}
res = https.request request
res.body
end
private
def multipart_text key, value
content = "Content-Disposition: form-data; name=\"#{key}\"" <<
EOL <<
EOL <<
"#{value}" << EOL
end
def multipart_file key, filename, mime_type, content
content = "Content-Disposition: form-data; name=\"#{key}\"; filename=\"#{filename}\"#{EOL}" <<
"Content-Type: #{mime_type}\r\n" <<
EOL <<
"#{content}" << EOL
end
end #MultipartPost
def call_quinta(url, format, method, params={})
uri = URI.parse(url)
req = case method
when "get"
Net::HTTP::Get.new(uri.path)
when "post"
Net::HTTP::Post.new(uri.path)
when "put"
Net::HTTP::Put.new(uri.path)
when "delete"
Net::HTTP::Delete.new(uri.path)
end
req.body = case format
when "json"
JSON.generate(params)
else
"no"
end
req["Content-Type"] = "application/#{format}"
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = (uri.scheme == 'https')
https.verify_mode = (OpenSSL::SSL::VERIFY_PEER)
https.start do |htt|
htt.request(req)
end
end
dtype_id = SecureRandom.urlsafe_base64
app_id = "bsx8kgWR9jWOBdUftcRXf9"
entity_id = "arjadcLJzeWOi1WPddL8ol"
property_id = "bwW68wWP1cSikQqSkhl04I"
post_url = "https://localhost:3001/entities/#{app_id}/upload_file/#{property_id}.json?dtype_id=#{dtype_id}"
# Path to your file
file_path = "/home/igor/Pictures/Selection_001.png"
file = File.open file_path
# getting file's content type, i.e. 'image/png'
file_content_type = `file --b --mime-type '#{file_path}'`.strip
multi_part = MultipartPost.new post_url do
params_part "rest_api_key", rest_api_key
files_part "dtype[#{property_id}]", "Selection_001.png",
file_content_type, file.read
end
p multi_part.run
# And below is the example of how to upload the file to Subform
rest_api_key = "API_KEY"
subform_field_id = "dcL8kXB8npd5pdRmk7BCoR"
subform_file_field_id = "aVWR3cNtvdUikQn8o3yCo1"
subform_form_id = "cCcxjdWRXpWPTLWOjvWPfO"
subform_dtype_id = SecureRandom.urlsafe_base64
file_path = "/home/igor/Pictures/Selection_002.png"
file = File.open file_path
# getting file's content type, i.e. 'image/png'
file_content_type = `file --b --mime-type '#{file_path}'`.strip
post_url = "https://quintadb.com/entities/#{app_id}/upload_file/#{subform_file_field_id}.json?dtype_id=#{subform_dtype_id}"
# upload file into subform record
multi_part = MultipartPost.new post_url do
params_part "rest_api_key", rest_api_key
params_part "subform_field", subform_field_id
params_part "property_id", subform_file_field_id
params_part "subform_dtype_id", subform_dtype_id
files_part "subforms[#{subform_field_id}][#{subform_dtype_id}][#{subform_file_field_id}]", "Selection_002.png",
file_content_type, file.read
end
p multi_part.run
text_field_on_a_form = "agW6rGWQHiWPvdWPL0oCoj"
text_field_on_a_subform = "dcV8k6y8nhWP4JF0r6W5LI"
params = {
:page => 1,
:rest_api_key => rest_api_key,
values: {entity_id: entity_id, id: dtype_id, text_field_on_a_form => "Test"},
subforms: {subform_field_id => {entity_id: subform_form_id, subform_dtype_id => { text_field_on_a_subform => "Test2"}}}
}
response = call_quinta "https://quintadb.com/apps/#{app_id}/dtypes.json", "json", "post", params
puts response.body
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
property_id您必须知道字段ID。你可以找到身份证收到所有表格字段。知道字段标识符后,您需要替换URL中的ID,例如: /apps/APP_ID/entities/ENTITY_ID/properties/ID.json 在 /apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties/asdasddVXHdHie1WeGFE8k2.json
dtype_id您必须知道记录ID. ID可以找到 收到所有记录. 知道您需要替换的表单标识符ID 在 URL 例如: /apps/APP_ID/dtypes/ID.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/dtypes/asd987asdasd97asd.json
JSON
方法POST
URL/entities/APP_ID/upload_file/PROPERTY_ID.json?dtype_id=DTYPE_ID
请求正文{"rest_api_key"=>API_KEY, "filedata"="your_file_here", "dtype_id"=>"fRLA83jrnAUOi5TEQLyuGw", "app_id"=>"bsx8kgWR9jWOBdUftcRXf9"}
Uploaded
删除文件
你的API密钥
APP_ID您需要知道数据库标识符。您可以找到获取所有数据库的APP_ID 已收到所有数据库。知道需要替换的基本标识符APP_ID在URL,例如: /apps/APP_ID/entities/ENTITY_ID/properties.json在/apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties.json
property_id您必须知道字段ID。你可以找到身份证收到所有表格字段。知道字段标识符后,您需要替换URL中的ID,例如: /apps/APP_ID/entities/ENTITY_ID/properties/ID.json 在 /apps/qweWO_dVXHdHie1WeGFE8k2/entities/aOWO_dVXHdHie1WeGFE8k2/properties/asdasddVXHdHie1WeGFE8k2.json
DTYPE_ID您必须知道记录ID. ID可以找到 收到所有记录. 知道您需要替换的表单标识符ID 在 URL 例如: /apps/APP_ID/dtypes/ID.json 在 /apps/aOWO_dVXHdHie1WeGFE8k2/dtypes/asd987asdasd97asd.json
SINGLE_FILE_NAME文件名
JSON
方法GET
URL/dtypes/delete_dtype_file/APP_ID/DTYPE_ID/PROPERTY_ID.json
请求正文{"rest_api_key"=>API_KEY, "single_file_name"=>"Selection_002.png", "app_id"=>"bsx8kgWR9jWOBdUftcRXf9", "dtype_id"=>"wlS5MeyMqQiCv16FdG3ztQ", "property_id"=>"bwW68wWP1cSikQqSkhl04I"}
答案
File removed
require 'open-uri'
require 'openssl'
require 'net/http'
require 'json'
def call_mth(url, format, method, params={})
uri = URI.parse(url)
# 创建对所需方法的调用: GET/POST/PUT/DELETE
req = case method
when "get"
Net::HTTP::Get.new(uri.path)
when "post"
Net::HTTP::Post.new(uri.path)
when "put"
Net::HTTP::Put.new(uri.path)
when "delete"
Net::HTTP::Delete.new(uri.path)
end
# 我们将参数转换为JSON/XML,并将内容类型设置为application/json或application/xml 注意XML参数格式,其根元素为api_call_params
req.body = case format
when "xml"
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<api_call_params>
#{params.collect{|key, value| "<#{key}>#{value}#{key}>"}.join("")}
</api_call_params>"
when "json"
JSON.generate(params)
else
"no"
end
# 设置内容类型
req["Content-Type"] = "application/#{format}"
https = Net::HTTP.new(uri.host, uri.port)
# 通过HTTPS的所有呼叫并检查SSL证书
https.use_ssl = (uri.scheme == 'https')
https.verify_mode = (OpenSSL::SSL::VERIFY_PEER)
# 我们提出要求
https.start do |htt|
htt.request(req)
end
end
# 请记住设置您的API_KEY密钥
params = {
:page => 1,
:rest_api_key => "API_KEY"
}
response = call_mth "https://quintadb.ru/apps.json", "json", "get", params
# 答案将在 response.body
puts response.body