GET api/P1QueryDefinition/Get?projectId={projectId}&queryId={queryId}
Get a query definition info based on query id
Request Information
URI Parameters
Name | Description | Type | Additional information |
---|---|---|---|
projectId | integer |
Required |
|
queryId | integer |
Required |
Body Parameters
None.
Response Information
Resource Description
Get a query definition info based on query id
API_Data_QueryDefinitionModeName | Description | Type | Additional information |
---|---|---|---|
Success | boolean |
None. |
|
Error | ErrorInfo |
None. |
|
Data | QueryDefinitionMode |
None. |
Response Formats
application/json, text/json
Sample:
{ "Success": true, "Error": { "ErrorCode": 1, "ErrorMessage": "sample error 1" }, "Data": { "GeneralInfo": { "QueryId": -105, "Name": "Last Query 1", "Formula": "A AND B " }, "Terms": [ { "TermId": -1501, "Columns": [ { "Words": "word1 word2", "OnlyEmpty": false, "FieldId": 101, "FieldType": 1 }, { "NotInclude": false, "ChoiceIds": [ 9, 13 ], "FieldId": 108, "FieldType": 4 }, { "Mode": 0, "From": "2021-05-01T00:00:00", "To": "2021-06-01T00:00:00", "AroundDays": 0, "OffsetDays": 0, "FieldId": 607, "FieldType": 8 } ], "Formula": "A AND B AND C " }, { "TermId": -1502, "Columns": [ { "From": 5, "To": 8, "OnlyEmpty": false, "FieldId": 631, "FieldType": 7 }, { "Yes": true, "FieldId": 203, "FieldType": 5 } ], "Formula": "A AND B " } ] } }
application/xml, text/xml
Sample:
<API_Data_QueryDefinitionMode xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Common"> <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Search"> <d2p1:GeneralInfo> <d2p1:Formula>sample string 3</d2p1:Formula> <d2p1:Name>sample string 2</d2p1:Name> <d2p1:QueryId>1</d2p1:QueryId> </d2p1:GeneralInfo> <d2p1:Terms> <d2p1:QueryTerm> <d2p1:ColumnOrder>sample string 3</d2p1:ColumnOrder> <d2p1:Columns xmlns:d5p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Search.Columns" i:nil="true" /> <d2p1:Formula>sample string 2</d2p1:Formula> <d2p1:TermId>1</d2p1:TermId> </d2p1:QueryTerm> <d2p1:QueryTerm> <d2p1:ColumnOrder>sample string 3</d2p1:ColumnOrder> <d2p1:Columns xmlns:d5p1="http://schemas.datacontract.org/2004/07/TechExcel.DTKService.Model.Search.Columns" i:nil="true" /> <d2p1:Formula>sample string 2</d2p1:Formula> <d2p1:TermId>1</d2p1:TermId> </d2p1:QueryTerm> </d2p1:Terms> </Data> <Error> <ErrorCode>1</ErrorCode> <ErrorMessage>sample string 1</ErrorMessage> </Error> <Success>true</Success> </API_Data_QueryDefinitionMode>