Operate Channel¶
Start or stop a read channel or write channel.
Prerequisites¶
A read channel or write channel already exists.
Request Format¶
POST https://{apigw-address}/data-federation/v2.0/channels/{channelId}
Request Parameters (URI)¶
Name |
Location (Path/Query) |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|---|
orgId |
Query |
Mandatory |
String |
The organization ID. How to get the orgId>> |
channelId |
Path |
Mandatory |
String |
Channel ID. |
action |
Query |
Mandatory |
String |
Operation to the channel (start: starting the channel; stop: stopping the channel) |
Request Parameters (Body)¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
resource |
Optional |
List<JSONObject> |
When starting a channle, specify the resource configuration for running the channel. For details, see Resource Struct |
Resource¶
Name |
Mandatory/Optional |
Data Type |
Description |
---|---|---|---|
resourceId |
Mandatory |
String |
Specify ID of the Federation Resource that is requested through the EnOS Resource Management page. |
resourceConfig |
Mandatory |
Integer |
Specify the amount of resource that is required for running the channel (by CU). |
ifMultiResourceAnalysis |
Mandatory |
Boolean |
Specify whether to enable cross-source analysis for the channel (true: enable; false: disable). |
Samples¶
Request Sample¶
url: https://{apigw-address}/data-federation/v2.0/channels/{channelId}?orgId={}&action=start
method: POST
request body:
{
"resource": {
"resourceId": "federation_3n6nb7",
"resourceConfig": "2",
"ifMultiResourceAnalysis": "false"
}
}
Return Sample¶
{
"msg": "OK",
"code": 0
}
SDK Samples¶
You can access the SDK samples for data federation service on GitHub: