Command examples

The examples below assume you are running from tools/detect-cli so the relative JSON paths work as written.

For Kafka feeds, specify the topic and consumer group names without the Unica Platform prefixes in connectorProperties.topic and connectorProperties.groupId. Detect adds the configured prefixes when connecting to Kafka. Ensure the resulting prefixed topic or consumer group exists on the Kafka broker.

Create feed application

Command:

Windows:

CliTool.bat create-feed-application -f "<path-to-resource-folder>/create_feed_application_kafka.json"

Linux:

./CliTool.sh create-feed-application -f "<path-to-resource-folder>/create_feed_application_kafka.json"

Sample payload from create_feed_application_kafka.json:

{
  "name": "feedAP1",
  "batchSize": 10,
  "connectorProperties": {
    "connectorType": "KAFKA",
    "topic": "TEST_1",
    "groupId": "detect",
    "clusterName": "k8s-cluster"
  },
  "enabled": true
}

Expected console pattern:

Feed application created successfully with ID: <generatedId>

Update feed application

Command:

Windows:

CliTool.bat update-feed-application -id 101 -f "<path-to-resource-folder>/update_feed_application_kafka.json"

Linux:

./CliTool.sh update-feed-application -id 101 -f "<path-to-resource-folder>/update_feed_application_kafka.json"

Sample payload from update_feed_application_kafka.json:

{
  "name": "feedAP1",
  "batchSize": 10,
  "connectorProperties": {
    "connectorType": "KAFKA",
    "topic": "TEST_1",
    "groupId": "detect",
    "clusterName": "k8s-cluster"
  },
  "enabled": true
}

Expected console pattern:

Feed application updated successfully with ID: 101

Get feed application by id

Command:

Windows:

CliTool.bat get-feed-application -id 101

Linux:

./CliTool.sh get-feed-application -id 101

Expected console pattern:

Feed Application: <FeedApplicationDto>

Get all feed applications

Basic example:

Windows:

CliTool.bat get-all-feed-applications -page 0 -size 10

Linux:

./CliTool.sh get-all-feed-applications -page 0 -size 10

Filter by search text:

Windows:

CliTool.bat get-all-feed-applications -search "feedAP" -page 0 -size 10

Linux:

./CliTool.sh get-all-feed-applications -search "feedAP" -page 0 -size 10

Filter by Kafka connector type and enabled status:

Windows:

CliTool.bat get-all-feed-applications -byInputConnectorType KAFKA -isEnabled true -page 0 -size 10

Linux:

./CliTool.sh get-all-feed-applications -byInputConnectorType KAFKA -isEnabled true -page 0 -size 10

Expected console pattern:

Feed Applications: <PageResponse<FeedApplicationDto>>

Delete feed application

Command:

Windows:

CliTool.bat delete-feed-application -id 101

Linux:

./CliTool.sh delete-feed-application -id 101

Expected console pattern:

Delete result: <ResponseBooleanWithMessageDto>

Get feed application names

Command:

Windows:

CliTool.bat get-feed-application-names

Linux:

./CliTool.sh get-feed-application-names

Expected console pattern:

Feed Application Names: <ListOfNamesDto>