POST api/data_source/sql
Request Information
URI Parameters
None.
Body Parameters
DataSourceName | Description | Type | Additional information |
---|---|---|---|
DataSourceId | globally unique identifier |
None. |
|
ProjectId | globally unique identifier |
None. |
|
ReferenceId | globally unique identifier |
None. |
|
Reference | string |
None. |
|
Name | string |
None. |
|
Description | string |
None. |
|
Type | DataSourceType |
None. |
|
Schema | string |
None. |
|
Content | string |
None. |
|
EncodedConnection | string |
None. |
|
Connection | string |
None. |
|
Period | PeriodType |
None. |
|
DynamicPara | DynamicParaType |
None. |
|
BeginDate | string |
None. |
|
EndDate | string |
None. |
|
PeriodNumber | integer |
None. |
|
PeriodDimension | PeriodDimensionType |
None. |
|
Compare | CompareType |
None. |
|
IsReadOnly | boolean |
None. |
|
CacheInterval | integer |
None. |
|
TableName | string |
None. |
Request Formats
application/json, text/json
Sample:
{ "dataSourceId": "d5850766-3f8b-452a-8642-221ace9471af", "projectId": "e154961b-4390-4510-9b24-d123fc051acf", "referenceId": "dbebd0d4-b265-4bd0-8282-1f33912b11ff", "reference": "sample string 2", "name": "sample string 3", "description": "sample string 4", "type": 0, "schema": "sample string 5", "content": "sample string 6", "encodedConnection": "c2FtcGxlIHN0cmluZyA4", "connection": "sample string 8", "period": 0, "dynamicPara": 0, "beginDate": "sample string 9", "endDate": "sample string 10", "periodNumber": 11, "periodDimension": 1, "compare": 0, "isReadOnly": true, "cacheInterval": 1, "tableName": "sample string 13" }
application/xml, text/xml
Sample:
<DataSource xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Margin.Core.Data.Entities"> <BeginDate>sample string 9</BeginDate> <CacheInterval>1</CacheInterval> <Compare>Normal</Compare> <Connection>sample string 8</Connection> <Content>sample string 6</Content> <DataSourceId>d5850766-3f8b-452a-8642-221ace9471af</DataSourceId> <Description>sample string 4</Description> <DynamicPara>Interval</DynamicPara> <EncodedConnection>c2FtcGxlIHN0cmluZyA4</EncodedConnection> <EndDate>sample string 10</EndDate> <IsReadOnly>true</IsReadOnly> <Name>sample string 3</Name> <Period>RealTime</Period> <PeriodDimension>Day</PeriodDimension> <PeriodNumber>11</PeriodNumber> <ProjectId>e154961b-4390-4510-9b24-d123fc051acf</ProjectId> <Reference>sample string 2</Reference> <ReferenceId>dbebd0d4-b265-4bd0-8282-1f33912b11ff</ReferenceId> <Schema>sample string 5</Schema> <TableName>sample string 13</TableName> <Type>SQL</Type> </DataSource>
application/x-www-form-urlencoded
Sample:
Sample not available.
Response Information
Resource Description
ApiResultName | Description | Type | Additional information |
---|---|---|---|
Status | ApiResultStatus |
None. |
|
Data | Object |
None. |
|
Message | string |
None. |
|
Code | integer |
None. |
Response Formats
application/json, text/json
Sample:
{ "status": "success", "data": {}, "message": "sample string 2", "code": 1 }
application/xml, text/xml
Sample:
<ApiResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Margin.Models"> <Code>1</Code> <Data /> <Message>sample string 2</Message> <Status>Success</Status> </ApiResult>