RetrieveQueryDocs
Interface Function
Query document that is under the specified entity and meets the criteria.
Request Parameter
Parameter | Type | Remarks |
---|---|---|
EntityName | String | Query ID |
SearchItem | List<SearchItem> |
SearchItem |
Order | Dictionary<String, int> |
Ascending=0 Descending=1 |
Index | int | It is not the page number, but the number from which item to return. |
Size | int | Number of return items |
Columns | List<string> |
Specify the collection of returned column names. Case-sensitive, order-independent, multi-level support (use. split). |
Locale | string | Sorting rule (optional parameter: en_ US , zh) |
[info] Note
- You can query the
like
\favourite
\share
information by specifying the Columns, the corresponding Columns are as follows:
C4-LikeCount
andC4-LikeStaff
C4-FavouriteCount
andC4-FavouriteStaff
C4-ShareCount
andC4-ShareStaff
Return Parameter
EasyDataGridModel<Dictionary<string, object>>
public class EasyDataGridModel
{
public long total { get; set; }
public List<T> rows { get; set; }
public string ErrorMessage { get; set; }
}
Note
Dictionary
of return value is the full information of each document.
Input Sample
{
//Note that the EntityName here is actually Query Id
"EntityName": "c1dq7qhhmp4hkhp55xi6hia4i",
"SearchItem": [
{
"Method": "And",
"Name": "IsDelete",
"Operator": "Equal",
"SubSearchItems": null,
"Value": "0"
}
],
"Order": {
//1:DESC, 0:ASC
"C4-CreateDate": 1
},
"Index": 0,
"Size": 20,
"columns": [
"Gender",
"Name",
"_id",
"C4-EditHistory.Time",
"C4-EditHistory.Creator",
"aaaa" //Input invalid column name will be automatically ignored in the result
]
}
Return Sample
{
"StatusCode": 200,
"Info": "Request (or process) succeeded",
"Data": {
"total": 9,
"rows": [
{
"_id": "3a2862f9-163c-4680-8253-11b59a5b632e",
"Name": "From UnitTest",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537236601954,
"Creator": "DemoUser"
}
]
},
{
"_id": "933ff760-7b20-4819-9232-067d2ef1de6f",
"Name": "From UnitTest",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537234449869,
"Creator": "DemoUser"
}
]
},
{
"_id": "ef370439-f124-4465-a030-21d4962f7a09",
"Name": "From UnitTest",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537234357135,
"Creator": "DemoUser"
}
]
},
{
"_id": "8e9ce202-73b9-4620-9137-f90f11eb6cba",
"Name": "From UnitTest",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537234050218,
"Creator": "DemoUser"
}
]
},
{
"_id": "70dd143a-d868-4e88-bc37-8cc9d2a0b588",
"Name": "From UnitTest",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537233940422,
"Creator": "DemoUser"
}
]
},
{
"_id": "1d4d652e-6d90-43da-9155-ad6dc2b5fffe",
"Name": "From UnitTest",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537155722177,
"Creator": "DemoUser"
}
]
},
{
"_id": "1234567890",
"Name": "DataId is not GUID",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537155721521,
"Creator": "DemoUser"
},
{
"Time": 1537236601329,
"Creator": "DemoUser"
}
]
},
{
"_id": "59942e43-92e0-4a3b-b4f5-9ed80c3a9cef",
"Name": "DataId is an exist value",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537155721349,
"Creator": "DemoUser"
},
{
"Time": 1537155890615,
"Creator": "DemoUser"
},
{
"Time": 1537236601110,
"Creator": "DemoUser"
}
]
},
{
"_id": null,
"Name": "Test",
"Gender": "man",
"C4-EditHistory": [
{
"Time": 1537155721037,
"Creator": "DemoUser"
},
{
"Time": 1537236600814,
"Creator": "DemoUser"
},
{
"Time": 1543390691865,
"Creator": "DemoUser"
},
{
"Time": 1543390806681,
"Creator": "DemoUser"
}
]
}
],
"ErrorMessage": null
}
}
Input Sample
{
//EntityName it is 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"
]
}