RetrieveQueryDocs
接口功能
查询指定Entity下满足条件的 Document
请求参数
参数 | 类型 | 说明 |
---|---|---|
EntityName | String | Query ID |
SearchItem | List<SearchItem> |
SearchItem |
Order | Dictionary<String, int> |
Ascending=0 Descending=1 |
Index | int | 不是页码,是从第几条开始返回 |
Size | int | 返回的数量 |
Columns | List<string> |
指定返回的列名集合。大小写敏感,顺序无关,支持多级(使用.分割) |
Locale | string | 排序规则(非必选 参数:en_US , zh) |
[info] 注意
- 可以通过指定Columns 查询
like
\favourite
\share
信息,对应的Columns如下:
C4-LikeCount
和C4-LikeStaff
C4-FavouriteCount
和C4-FavouriteStaff
C4-ShareCount
和C4-ShareStaff
返回参数
EasyDataGridModel<Dictionary<string, object>>
public class EasyDataGridModel<T>
{
public long total { get; set; }
public List<T> rows { get; set; }
public string ErrorMessage { get; set; }
}
说明
返回值中Dictionary
为每个Document的全部信息。
调用示例
{
//注意此处的 EntityName 实际是Query Id
"EntityName": "l9wbd61s3ot",
"SearchItem": [
{
"Method": "And",
"Name": "IsDelete",
"Operator": "Equal",
"SubSearchItems": null,
"Value": "0"
}
],
"Order": {
//1:DESC, 0:ASC
"C4-CreateDate": 1
},
"Index": 0,
"Size": 20,
"columns": [
"textbx_name",
"textbx_address",
"_id",
"C4-EditHistory.Time",
"C4-EditHistory.Creator",
"aaaa" //输入无效列名结果中会自动忽略
]
}
返回示例
{
"StatusCode": 200,
"Info": "Request (or process) succeeded",
"Data": {
"total": 9,
"rows": [
{
"_id": "3a2862f9-163c-4680-8253-11b59a5b632e",
"Name": "From UnitTest1",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537236601954,
"Creator": "DemoUser"
}
]
},
{
"_id": "933ff760-7b20-4819-9232-067d2ef1de6f",
"Name": "From UnitTest2",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537234449869,
"Creator": "DemoUser"
}
]
}
],
"ErrorMessage": null
}
}