Channels (via HTTP)
General: System Interaction via HTTP (REST API).
You can search, add, modify and delete channels via HTTP.
Furthermore, additional IDs can be added, changed and deleted.
Each request requires authentication via Basic Authentication (username and password of a Lobster_data user with user right Administrator or Administration via REST). As an alternative to Basic Authentication, the user credentials can be passed in the URL with &user=myuser&passwd=mypassword.
Logs for requests of this kind can be found in the Server Logs under internal / message.log .
Searching Channel
The ID of the channel is returned via the name of the partner (relation) and the name of the channel (name).
URL (HTTP POST with JSON):
http://<IP or URL of Integration Server>/dw/auth/v1/channelSearch https://<IP or URL of Integration Server>/dw/auth/v1/channelSearch |
Note: See section Adding an HTTPS Listener.
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"
}
}
Adding Channel
URL (HTTP POST with JSON):
http://<IP or URL of Integration Server>/dw/auth/v1/channel https://<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://<IP or URL of Integration Server>/dw/auth/v1/channel https://<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://<IP or URL of Integration Server>/dw/auth/v1/channel https://<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.
Deleting Additional ID
"optKeys"
: [ {
"key"
:
"a key"
,
"operation"
:
"delete"
}
]
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"
},
]
}