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¶
url
The 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:
http
orhttps
- Importance: high
entity.names
A 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.method
The HTTP request method.
- Type: string
- Default:
GET
- Valid Values:
GET
andPOST
- Importance: high
http.request.headers.separator
The character that separates multiple distinct headers in the configuration
HTTP_REQUEST_HEADERS
.- Type: string
- Default:
|
- Importance: low
http.request.headers
HTTP 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:348
- Type: string
- Default: “”
- Importance: medium
http.request.parameters.separator
The character that separates multiple distinct headers in the configuration
http.request.parameters
.- Type: string
- Default:
&
- Importance: medium
http.request.parameters
HTTP 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.offset
and${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.body
The 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.method
is 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.body
is properly escaped.http.initial.offset
The 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.body
contain the template variable${offset}
:- Type: string
- Default: “”
- Importance: high
http.offset.mode
This 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 does
not need to be configured. If set toCHAINING
, the configurationhttp.offset.json.pointer
needs 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_INCREMENTING
- Valid values: [
SIMPLE_INCREMENTING
,CHAINING
,CURSOR_PAGINATION
] - Importance: high
http.response.data.json.pointer
The 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.pointer
The 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
http.next.page.json.pointer
The 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.mode
is set toCURSOR_PAGINATION
.- Type: string
- Default: “”
- Importance: high
http.request.sensitive.headers
Sensitive 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.retries
The maximum number of times to retry on errors before failing the task.
- Type: int
- Default: 10
- Valid Values: [0,…,2147483647]
- Importance: medium
retry.backoff.ms
The 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.codes
The 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-500
includes codes from400
to500
, 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 TIMEOUT
and all5xx
error 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.ms
The 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.type
Authentication type of the endpoint. Valid values are
NONE
,BASIC
,BEARER
,OAUTH2
(Client Credentials grant type only).- Type: string
- Default: NONE
- Importance: high
connection.user
The username to be used with an endpoint requiring authentication.
- Type: string
- Default: “”
- Importance: high
connection.password
The password to be used with an endpoint requiring authentication.
- Type: password
- Default: [hidden]
- Importance: high
oauth2.token.url
The URL to be used for fetching OAuth2 token. Client Credentials is the only supported grant type.
- Type: string
- Default: “”
- Importance: high
oauth2.client.id
The client id used when fetching OAuth2 token.
- Type: string
- Default: “”
- Importance: high
oauth2.client.secret
The secret used when fetching OAuth2 token.
- Type: password
- Default: [hidden]
- Importance: high
oauth2.token.property
The 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.mode
Specifies how to encode
client_id
andclient_secret
in 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_id
andclient_secret
are sent as URL encoded parameters.- Type: string
- Default: header
- Valid Values: one of [header, url]
- Importance: low
oauth2.client.scope
The scope used when fetching OAuth2 token.
- Type: string
- Default: any
- Importance: low
bearer.token
The bearer authentication token to be used with an endpoint requiring bearer token-based authentication.
- Type: password
- Importance: medium
Proxy configuration¶
http.proxy.host
The host or IP address of the HTTP proxy.
- Type: string
- Default: “”
- Importance: high
http.proxy.port
The port number of the HTTP proxy.
- Type: int
- Default: 0
- Valid Values: [0,…]
- Importance: high
http.proxy.user
The username to be used when authenticating with the HTTP proxy.
- Type: string
- Default: “”
- Importance: high
http.proxy.password
The password to be used when authenticating with the HTTP proxy.
- Type: password
- Default: [hidden]
- Importance: high
SSL configuration¶
https.ssl.enabled.protocols
The list of protocols enabled for SSL connections.
- Type: list
- Default: TLSv1.2,TLSv1.1,TLSv1
- Importance: medium
https.ssl.keystore.type
The file format of the key store file. This is optional for client.
- Type: string
- Default: JKS
- Importance: medium
https.ssl.keystore.location
The 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.password
The password of the private key in the key store file. This is optional for client.
- Type: password
- Default: null
- Importance: high
https.ssl.keystore.password
The 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.type
The file format of the trust store file.
- Type: string
- Default: JKS
- Importance: medium
https.ssl.truststore.location
The location of the trust store file.
- Type: string
- Default: null
- Importance: high
https.ssl.truststore.password
The 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.algorithm
The 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.algorithm
The 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.algorithm
The endpoint identification algorithm to validate server hostname using server certificate. Disable server hostname verification by setting
https.ssl.endpoint.identification.algorithm
to an empty string.- Type: string
- Default: https
- Importance: low
https.ssl.secure.random.implementation
The SecureRandom PRNG implementation to use for SSL cryptography operations.
- Type: string
- Default: null
- Importance: low
License configuration¶
confluent.license
Confluent 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.servers
A 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.topic
Name of the Kafka topic used for Confluent Platform configuration, including licensing information.
- Type: string
- Default: _confluent-command
- Importance: low
confluent.topic.replication.factor
The 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