Create Connect cluster secret Run in API Explorer

POST /v1/kafka-connect/clusters/{cluster_name}/secrets

Create a Kafka Connect cluster secret.

Path parameters

  • cluster_name string Required

    Unique name of target connect cluster. For Redpanda Cloud, use redpanda.

application/json

Body Required

  • labels object

    Secret labels.

    Hide labels attribute Show labels attribute object
    • * string Additional properties
  • name string Required

    Name of connector.

  • secret_data string(byte) Required

    The secret data. Must be Base64-encoded.

Responses

  • 201 application/json

    Secret created

    Hide response attribute Show response attribute object
    • secret object

      Defines the secret resource.

      Hide secret attributes Show secret attributes object
      • id string

        Secret identifier.

      • labels object

        Secret labels.

        Hide labels attribute Show labels attribute object
        • * string Additional properties
      • scopes array[string]

        Defines the scope of a secret.

        Values are SCOPE_REDPANDA_CONNECT or SCOPE_REDPANDA_CLUSTER.

  • 401 application/json

    Unauthenticated.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • 500 application/json

    Internal Server Error. Reach out to support.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

  • default application/json

    An unexpected error response.

    Hide response attributes Show response attributes object
    • code string(int32)

      RPC status code, as described here.

      Values are OK, CANCELLED, UNKNOWN, INVALID_ARGUMENT, DEADLINE_EXCEEDED, NOT_FOUND, ALREADY_EXISTS, PERMISSION_DENIED, UNAUTHENTICATED, RESOURCE_EXHAUSTED, FAILED_PRECONDITION, ABORTED, OUT_OF_RANGE, UNIMPLEMENTED, INTERNAL, UNAVAILABLE, or DATA_LOSS.

    • details array[object]

      A list of messages that carries the error details.

      Details of the error.

      Details of the error.

      One of:
    • message string

      Detailed error message. No compatibility guarantees are given for the text contained in this message.

POST /v1/kafka-connect/clusters/{cluster_name}/secrets
curl \
 --request POST 'https://{dataplane_api_subdomain}.cloud.redpanda.com/v1/kafka-connect/clusters/{cluster_name}/secrets' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"labels":{"additionalProperty1":"string","additionalProperty2":"string"},"name":"string","secret_data":"string"}'
Request examples
{
  "labels": {
    "additionalProperty1": "string",
    "additionalProperty2": "string"
  },
  "name": "string",
  "secret_data": "string"
}
Response examples (201)
{
  "secret": {
    "id": "string",
    "labels": {
      "additionalProperty1": "string",
      "additionalProperty2": "string"
    },
    "scopes": [
      "SCOPE_REDPANDA_CONNECT"
    ]
  }
}
Response examples (401)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (500)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}
Response examples (default)
{
  "code": "OK",
  "details": [
    {
      "@type": "type.googleapis.com/google.rpc.BadRequest",
      "field_violations": [
        {
          "description": "string",
          "field": "string"
        }
      ]
    }
  ],
  "message": "string"
}