Create Connector

Create Connector

Create a connector instance

Request
URI
POST
https://{api_host}/dcc/v1/connectors
COPY
Request Body

Create a new connector instance such as kafka connector

CreateConnectorRequest of type(s) application/json
Required

Show optional properties

{
    "targetCluster": {
        "tls": {},
        "authentication": {},
        "bootstrapServers": "10.168.200.123:9092"
    },
    "name": "DashboardKafka",
    "topics": [
        "vsa_metrics",
        "vsa_events"
    ]
}
{
    "name": "demo_connector",
    "tasksMax": 6,
    "replicationFactor": 2,
    "topics": [
        "vsa_metrics"
    ],
    "targetCluster": {
        "bootstrapServers": "target-kafka-cluster:9092",
        "tls": {
            "enabled": true,
            "certificate": "base64 encoded certificate"
        },
        "authentication": {
            "enabled": true,
            "type": "auth type plain/scram-sha-512/oauth/tls",
            "username": "targetuser",
            "password": "target password"
        }
    },
    "logging": {
        "type": "inline",
        "level": "INFO"
    },
    "resources": {
        "limits": {
            "cpu": "4000m",
            "memory": "8192Mi"
        },
        "requests": {
            "cpu": "1000m",
            "memory": "2048Mi"
        }
    }
}
string As ^[A-Za-z]
name
Required

Name of the connector should always start with a letter a-z or A-Z

number
tasksMax
Optional
Constraints: default: 4

The maximum number of tasks for the Kafka Connector.

number
replicationFactor
Optional
Constraints: default: 1

Replication factor for the internal topics and replicated topics.

array of string
topics
Required

Topic names to be replicated

object
targetCluster
Required

Object having details of target kafka cluster and authentication

object
logging
Optional

Logging object containing logging type and logging level

object
resources
Optional

Maximum limits for CPU and memory resources and the requested initial resources.

Authentication
This operation uses the following authentication methods.
Responses
200

Returns Connector Config for the newly created Connector

Returns CreateConnectorResponse of type(s) application/json
{
    "message": "Connector successfully initialized",
    "blockId": "kafka-connector",
    "time": "2022-03-25 13:02:21.041469",
    "name": "demo_connector",
    "instanceId": "demo-connector",
    "display_name": "Demo_connector",
    "status": "pending",
    "params": {
        "targetCluster": {
            "tls": null,
            "authentication": null,
            "bootstrapServers": "10.168.200.123:9092"
        },
        "name": "DashboardKafka",
        "topics": [
            "vsa_metrics",
            "vsa_events"
        ],
        "tasksMax": 4,
        "resources": {
            "requests": {
                "memory": "2Gi",
                "cpu": "1"
            },
            "limits": {
                "memory": "8Gi",
                "cpu": "4"
            }
        }
    }
}
string
blockId
Optional

The type of connector created.

string
displayName
Optional

The name of the connector as entered by the user

string
instanceId
Optional

Instance id of the connector object

string
message
Optional

The message indicating success or failure of connector creation.

object
params
Optional

The configuration with which the connector was created.

string
status
Optional

This specifies the status of the connector created. It can be stopped, started or pending

string
time
Optional

The time of creation of the connector.


400

Invalid Request sent by the user

Operation doesn't return any data structure

401

User authentication failed

Operation doesn't return any data structure

403

Access to the requested resource/operation is forbidden

Operation doesn't return any data structure

404

Cannot find requested resource

Operation doesn't return any data structure

500

Internal server error

Operation doesn't return any data structure

Code Samples
COPY
                    curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"name:"string","targetCluster:"object","topics":["string"]}' https://{api_host}/dcc/v1/connectors