POST api/P1QueryDefinition/Save
Save query definition
Request Information
URI Parameters
None.
Body Parameters
SaveQueryDefinitionBinder| Name | Description | Type | Additional information |
|---|---|---|---|
| ProjectId | integer |
None. |
|
| GeneralInfo | QueryGeneralInfo |
None. |
|
| Conditions | Collection of ColumnCondition |
None. |
Request Formats
application/json, text/json
Sample:
{
"ProjectId": 181,
"GeneralInfo": {
"QueryId": 0,
"Name": "New Query 1",
"Formula": "A AND B AND C AND D AND E"
},
"Conditions": [
{
"Words": "word1 word2",
"OnlyEmpty": false,
"FieldId": 101,
"FieldType": 0
},
{
"NotInclude": false,
"ChoiceIds": [
9,
13
],
"FieldId": 108,
"FieldType": 0
},
{
"Mode": 0,
"From": "2021-05-01T00:00:00",
"To": "2021-06-01T00:00:00",
"AroundDays": 0,
"OffsetDays": 0,
"FieldId": 607,
"FieldType": 0
},
{
"From": 5,
"To": 8,
"OnlyEmpty": false,
"FieldId": 631,
"FieldType": 0
},
{
"Yes": true,
"FieldId": 203,
"FieldType": 0
}
]
}
application/xml, text/xml
Sample:
<SaveQueryDefinitionBinder xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Binding">
<Conditions xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Search.Columns" i:nil="true" />
<GeneralInfo xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Search">
<d2p1:Formula>sample string 3</d2p1:Formula>
<d2p1:Name>sample string 2</d2p1:Name>
<d2p1:QueryId>1</d2p1:QueryId>
</GeneralInfo>
<ProjectId>1</ProjectId>
</SaveQueryDefinitionBinder>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
Save query definition
API_Data_Int32| Name | Description | Type | Additional information |
|---|---|---|---|
| Success | boolean |
None. |
|
| Error | ErrorInfo |
None. |
|
| Data | integer |
None. |
Response Formats
application/json, text/json
Sample:
{
"Success": true,
"Error": {
"ErrorCode": 1,
"ErrorMessage": "sample string 1"
},
"Data": 2
}
application/xml, text/xml
Sample:
<API_Data_int xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common">
<Data>2</Data>
<Error>
<ErrorCode>1</ErrorCode>
<ErrorMessage>sample string 1</ErrorMessage>
</Error>
<Success>true</Success>
</API_Data_int>