Configuration Reference for HTTP Source Connector for Confluent Platform
To use this connector, specify the name of the connector class in the
connector.class configuration property.
connector.class=io.confluent.connect.http.HttpSourceConnector
Connector-specific configuration properties are described below. For a list of properties common to all source connectors, see the Kafka Source Connector Configuration Reference for Confluent Platform documentation page.
Connection
urlThe service URL which can be templated with offset information. For example:
http://example.com/api/v1/${entityName}/${offset}where${offset}will be substituted with the offset generated by the previous request’s response (or if it’s the first request, fromhttp.initial.offset), and${entityName}will be substituted with values from the configurationentity.names.Type: string
Valid Values: URI with one of these schemes:
httporhttpsImportance: high
entity.namesA list of entities that should be polled. Entities are distributed among the connector tasks. Values from this list will replace the template variable
${entityName}in the configurations:topic.name.pattern,url,http.request.parameters, andhttp.request.body. You do not need to set this property if none of the aforementioned configuration properties contain the template variable${entityName}.Type: list
Importance: high
http.request.methodThe HTTP request method.
Type: string
Default:
GETValid Values:
GETandPOSTImportance: high
http.request.headers.separatorThe character that separates multiple distinct headers in the configuration
HTTP_REQUEST_HEADERS.Type: string
Default:
|Importance: low
http.request.headersHTTP headers to be included in each request. Header names and values should be separated by
:. Distinct headers should be separated by the configuration value forHTTP_REQUEST_HEADERS_SEPARATOR(defaults toHTTP_REQUEST_HEADERS_SEPARATOR_DEFAULT). For example:From:abcxyz@confluent.io|Content-Length:348Type: string
Default: “”
Importance: medium
http.request.parameters.separatorThe character that separates multiple distinct headers in the configuration
http.request.parameters.Type: string
Default:
&Importance: medium
http.request.parametersHTTP parameters to be added to the request. Parameter names and values should be separated by
=. Distinct parameters should be separated by the configuration value forhttp.request.parameters.separator(defaults to&). Parameter values can be templated with offset and entity information, for example:entity=${entityName}&search_after=${offset}, where${offset}will be substituted with the offset generated from the previous request’s response or if it’s the first request, fromhttp.initial.offsetand${entityName}will be substituted with values from the configurationentity.names. The parameters are only set ifhttp.request.method``is set to ``GET.Type: string
Default: “”
Importance: medium
http.request.bodyThe payload to be sent along with the HTTP request. The value can be templated with offset information–for example,
{"search_after":"${offset}", "entity":"${entityName}"where${offset}will be substituted with the offset generated by the previous request’s response (or if it’s the first request, fromhttp.initial.offset), and${entityName}will be substituted with values from the configentity.names. The body is only set ifhttp.request.methodis set toPOST.Type: string
Default: “”
Importance: medium
Note
When you set this property with the Confluent CLI or API, ensure that the value for
http.request.bodyis properly escaped.http.initial.offsetThe initial offset to be used to generate the first request. This needs to be set if either one or more of the following configurations:
url,http.request.parameters, orhttp.request.bodycontain the template variable${offset}:Type: string
Default: “”
Importance: high
http.offset.modeThis property indicates how offsets are computed and how requests are generated. If set to
SIMPLE_INCREMENTING, the${offset}used to generate requests is simply the previous offset (orhttp.initial.offset) incremented by the number of records in the response. In this mode, http.initial.offset needs to be set to an integer value, andhttp.offset.json.pointer doesnot need to be configured. If set toCHAINING, the configurationhttp.offset.json.pointerneeds to be set, and the offset for a record is set to the value at the JSON pointer in the record data.Type: string
Default:
SIMPLE_INCREMENTINGValid values: [
SIMPLE_INCREMENTING,CHAINING,CURSOR_PAGINATION]Importance: high
http.response.data.json.pointerThe JSON Pointer to the entity in the JSON response containing the actual data that should be written to Kafka as records. The entity can be an array (multiple records ) or an object (single record).
Type: string
Default: “”
Importance: high
http.offset.json.pointerThe JSON Pointer to the value in each record that corresponds to the offset for that record. For example, for a response like the following:
{ "users": [ { "id": 11, "url": "http://{subdomain}.zendesk.com/api/v2/users/11.json", "name": "Agent Extraordinaire", "..." "user_fields": { "field1": 0, "field2": "value2" } } ] "metadata_1": "val", "metadata_2": "val", "time": 1383685952 }
This config can be set to
/id. Note note that the pointer needs to be valid for each record, not the top level JSON response. The offset for the corresponding SourceRecord will be set to the value at the specified JSON Pointer (cannot be an object or an array); also this value will be available to the subsequent request as${offset}.Type: string
Default: “”
Importance: high
use.http.offset.json.pointer.as.stringBy default, the value of this property will be converted to a string before being used as an offset. Set this to
falseif this conversion is not needed.Type: boolean
Default:
trueImportance: medium
http.next.page.json.pointerThe JSON pointer to the value in the response which corresponds to the next page reference (either a page token, a full URL or a URL fragment). This will be stored as the offset and will be available to the subsequent request with the template variable
${offset}. This config should only be set ifhttp.offset.modeis set toCURSOR_PAGINATION.Type: string
Default: “”
Importance: high
http.request.sensitive.headersSensitive HTTP headers (for example, credentials) to be included in all requests. Individual headers should be separated by the
header.separator.Type: string
Default: “”
Importance: medium
Retries
max.retriesThe maximum number of times to retry on errors before failing the task.
Type: int
Default: 10
Valid Values: [0,…,2147483647]
Importance: medium
retry.backoff.msThe time in milliseconds to wait following an error before a retry attempt is made.
Type: int
Default: 3000
Valid Values: [0,…,2147483647]
Importance: medium
retry.on.status.codesThe HTTP error codes to retry on. A comma-separated list of codes or range of codes to retry on. Ranges are specified with a start and optional end code. Range boundaries are inclusive. For instance,
400-includes all codes greater than or equal to400.400-500includes codes from400to500, including500. Multiple ranges and single codes can be specified together to achieve fine-grained control over retry behavior. For example,404,408,500-will retry on404 NOT FOUND,408 REQUEST TIMEOUTand all5xxerror codes. Note that some status codes will always be retried, ” such as unauthorized, timeouts and too many requests.Type: string
Default:
400-Importance: medium
request.interval.msThe time in milliseconds to wait after receiving a response to a request before sending a subsequent request.
Type: long
Default:
400-Valid values: [1,…,2147483647]
Importance: medium
Authentication configuration
auth.typeAuthentication type of the endpoint. Valid values are
NONE,BASIC,BEARER,OAUTH2(Client Credentials grant type only).Type: string
Default: NONE
Importance: high
connection.userThe username to be used with an endpoint requiring authentication.
Type: string
Default: “”
Importance: high
connection.passwordThe password to be used with an endpoint requiring authentication.
Type: password
Default: [hidden]
Importance: high
oauth2.token.urlThe URL to be used for fetching OAuth2 token. Client Credentials is the only supported grant type.
Type: string
Default: “”
Importance: high
oauth2.client.idThe client id used when fetching OAuth2 token.
Type: string
Default: “”
Importance: high
oauth2.client.secretThe secret used when fetching OAuth2 token.
Type: password
Default: [hidden]
Importance: high
oauth2.token.propertyThe name of the property containing the OAuth2 token returned by the http proxy. Default value is
access_token.Type: string
Default: access_token
Importance: high
oauth2.client.auth.modeSpecifies how to encode
client_idandclient_secretin the OAuth2 authorization request. If set to ‘header’, the credentials are encoded as an'Authorization: Basic <base-64 encoded client_id:client_secret>'HTTP header. If set to ‘url’, thenclient_idandclient_secretare sent as URL encoded parameters.Type: string
Default: header
Valid Values: one of [header, url]
Importance: low
oauth2.client.scopeThe scope used when fetching OAuth2 token.
Type: string
Default: any
Importance: low
bearer.tokenThe bearer authentication token to be used with an endpoint requiring bearer token-based authentication.
Type: password
Importance: medium
Proxy configuration
http.proxy.hostThe host or IP address of the HTTP proxy.
Type: string
Default: “”
Importance: high
http.proxy.portThe port number of the HTTP proxy.
Type: int
Default: 0
Valid Values: [0,…]
Importance: high
http.proxy.userThe username to be used when authenticating with the HTTP proxy.
Type: string
Default: “”
Importance: high
http.proxy.passwordThe password to be used when authenticating with the HTTP proxy.
Type: password
Default: [hidden]
Importance: high
SSL configuration
https.ssl.enabled.protocolsThe list of protocols enabled for SSL connections.
Type: list
Default: TLSv1.2,TLSv1.1,TLSv1
Importance: medium
https.ssl.keystore.typeThe file format of the key store file. This is optional for client.
Type: string
Default: JKS
Importance: medium
https.ssl.keystore.locationThe location of the key store file. This is optional for client and can be used for two-way authentication for client.
Type: string
Default: null
Importance: high
https.ssl.key.passwordThe password of the private key in the key store file. This is optional for client.
Type: password
Default: null
Importance: high
https.ssl.keystore.passwordThe store password for the key store file. This is optional for a client and is only needed if ssl.keystore.location is configured.
Type: password
Default: null
Importance: high
https.ssl.truststore.typeThe file format of the trust store file.
Type: string
Default: JKS
Importance: medium
https.ssl.truststore.locationThe location of the trust store file.
Type: string
Default: null
Importance: high
https.ssl.truststore.passwordThe password for the trust store file. If a password is not set, access to the truststore is still available, but integrity checking is disabled.
Type: password
Default: null
Importance: high
https.ssl.keymanager.algorithmThe algorithm used by key manager factory for SSL connections. Default value is the key manager factory algorithm configured for the Java Virtual Machine.
Type: string
Default: SunX509
Importance: low
https.ssl.trustmanager.algorithmThe algorithm used by trust manager factory for SSL connections. Default value is the trust manager factory algorithm configured for the Java Virtual Machine.
Type: string
Default: SunX509
Importance: low
https.ssl.endpoint.identification.algorithmThe endpoint identification algorithm to validate server hostname using server certificate. Disable server hostname verification by setting
https.ssl.endpoint.identification.algorithmto an empty string.Type: string
Default: https
Importance: low
https.ssl.secure.random.implementationThe SecureRandom PRNG implementation to use for SSL cryptography operations.
Type: string
Default: null
Importance: low
CSFLE configuration
csfle.enabled
Accepts a boolean value. CSFLE is enabled for the connector if csfle.enabled is set to True.
Type: boolean
Default: False
auto.register.schemas
Specifies if the Serializer should attempt to register the Schema with Schema Registry.
Type: boolean
Default: true
Importance: medium
use.latest.version
Only applies when auto.register.schemas is set to false. If auto.register.schemas is set to false and use.latest.version is set to true, then instead of deriving a schema for the object passed to the client for serialization, Schema Registry uses the latest version of the schema in the subject for serialization.
Type: boolean
Default: true
Importance: medium
License configuration
confluent.licenseConfluent will issue a license key to each subscriber. The license key will be a short snippet of text that you can copy and paste. Without the license key, you can use the connector for a 30-day trial period. If you are a subscriber, contact Confluent Support for more information.
Type: string
Importance: high
confluent.topic.bootstrap.serversA list of host/port pairs to use for establishing the initial connection to the Kafka cluster used for licensing. All servers in the cluster will be discovered from the initial connection. This list should be in the form
<code>host1:port1,host2:port2,...</code>. Since these servers are just used for the initial connection to discover the full cluster membership (which may change dynamically), this list need not contain the full set of servers (you may want more than one, though, in case a server is down).Type: list
Importance: high
confluent.topicName of the Kafka topic used for Confluent Platform configuration, including licensing information.
Type: string
Default: _confluent-command
Importance: low
confluent.topic.replication.factorThe replication factor for the Kafka topic used for Confluent Platform configuration, including licensing information. This is used only if the topic does not already exist, and the default of 3 is appropriate for production use. If you are using a development environment with less than 3 brokers, you must set this to the number of brokers (often 1).
Type: int
Default: 3
Importance: low