Channels (REST API)
Channels (REST API)
Searching channel
The ID of the channel is returned via the name of the partner (parameter "relation") and the name of the channel (parameter "name").
URL (HTTP POST with JSON):
http(s)://<IP or URL of Integration Server>/dw/auth/v1/channelSearch |
JSON:
{
"relation"
:
"My partner"
,
"name"
:
"My SSH channel"
}
Example response
The structure of the response is identical for each successful channel operation.
The parameter " id" is the ID of the channel .
{
"response"
: {
"status"
:
"ok"
,
"id"
:
"1616400091443029"
}
}
Show channel info
The information for the channel is returned via the ID of the channel.
URL (HTTP GET):
http(s)://<IP or URL of Integration Server>/dw/auth/v1/channelinfo?id=<channel_ID> |
Example response
{
"sendCompressed"
:
false
,
"refreshURL"
:
"https://\u003cserver\u003e/dw/register/oauth/token?grant_type=refresh_token\u0026refresh_token=\u003crefreshToken\u003e\u0026client_id=\u003cclientId\u003e\u0026client_secret=\u003cclientSecret\u003e"
,
"active"
:
true
,
"type"
:
"HTTP"
,
"sendSigned"
:
false
,
"dmz"
:
true
,
"certificates"
: {
},
"preemtive"
:
false
,
"sendEncrypted"
:
false
,
"name"
:
"Showcase_Oauth2_Client_AuthorizationCode"
,
"receiveSigned"
:
false
,
"realm"
:
"DEFAULT"
,
"id"
:
1677075059014090
,
"operation"
:
"get"
,
"logSettings"
: {
"retainDays"
:
"-1"
,
"Enabled"
:
false
},
"receiveEncrypted"
:
false
,
"releation"
:
"01_Showcases"
,
"direction"
:
"in"
}
Adding channel
URL (HTTP POST with JSON):
http(s)://<IP or URL of Integration Server>/dw/auth/v1/channel |
JSON files for the respective channel type
Modifying channel
URL (HTTP POST with JSON):
http(s)://<IP or URL of Integration Server>/dw/auth/v1/channel |
JSON:
The structure of the JSON file here is the same as when creating a partner. The only difference is value "update" instead of value "add" in parameter "operation" and the actual ID of the channel in parameter "id" instead of value "0".
Moreover, it is not necessary to use the whole structure, but only the mandatory parameters "type", "operation", "name", "relation" and "id" and other parameters that you want to change.
Deleting channel
URL (HTTP POST with JSON):
http(s)://<IP or URL of Integration Server>/dw/auth/v1/channel |
JSON:
{
"type"
:
"AS2"
,
"operation"
:
"delete"
,
"relation"
:
"My partner"
,
"id"
:
1592398910884151
}
Parameter "type" specifies the channel type (as when adding).
The name of the partner is set in parameter "relation".
Parameter "id" is the ID of the channel.
Adding, modifying and deleting additional IDs
When creating or changing channels, you can also create, change or delete additional IDs for these channels. Please note that you can only create an additional ID for a channel if this additional ID already exists (additional IDs are created centrally and can have different values in each channel).
Use the following additional code segments when creating or changing channels.
Adding additional ID
"optKeys"
: [ {
"key"
:
"a key"
,
"value"
:
"a value"
,
"operation"
:
"add"
,
"secure"
:
"true"
}
]
Parameter "key" is the name of the additional ID and parameter "value" the value of the additional ID.
Parameter "secure" specifies whether the value should be stored encrypted.
Modifying additional ID
"optKeys"
: [ {
"key"
:
"a key"
,
"value"
:
"a new value"
,
"operation"
:
"add"
,
"secure"
:
"true"
}
]
Please note that parameter "operation" also uses the value "add" here. The old value of the additional ID (if it exists) is then simply overwritten. Thus, you can never create more than one entry with the same key.
Example
{
"type"
:
"SMB"
,
"operation"
:
"add"
,
"name"
:
"My SMB channel"
,
"relation"
:
"My partner"
,
"active"
:
true
,
"id"
:
0
,
"user"
:
"me"
,
"password"
:
"secret"
,
"domain"
:
"lobster.de"
,
"server"
:
"smb://localhost"
,
"contact"
: {
"language"
:
"de"
,
"name"
:
"John Doe"
,
"fax"
:
""
,
"email"
:
"john.doe@example.com"
,
"note"
:
""
},
"optKeys"
: [ {
"key"
:
"a key"
,
"value"
:
"a value"
,
"operation"
:
"add"
,
"secure"
:
"true"
},
{
"key"
:
"another key"
,
"value"
:
"a value"
,
"operation"
:
"add"
,
"secure"
:
"true"
},
]
}
Logs
Logs for requests of this kind can be found in the Server Logs in the Control Center under "internal / message.log" (or in file ./logs/services/message.log ).