<a id="http-source-connector-configuration"></a>

# 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.

```bash
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](/platform/current/installation/configuration/connect/source-connect-configs.html)
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, from `http.initial.offset`), and
  `${entityName}` will be substituted with values from the configuration
  `entity.names`.
  <br/>
  * Type: string
  * Valid Values: URI with one of these schemes: `http` or `https`
  * 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`, and `http.request.body`. You do not need to set
  this property if none of the aforementioned configuration properties contain
  the template variable `${entityName}`.
  <br/>
  * Type: list
  * Importance: high

`http.request.method`
: The HTTP request method.
  <br/>
  * Type: string
  * Default: `GET`
  * Valid Values: `GET` and `POST`
  * Importance: high

`http.request.headers.separator`
: The character that separates multiple distinct headers in the configuration
  `HTTP_REQUEST_HEADERS`.
  <br/>
  * 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 for `HTTP_REQUEST_HEADERS_SEPARATOR` (defaults to
  `HTTP_REQUEST_HEADERS_SEPARATOR_DEFAULT`). For example:
  `From:abcxyz@confluent.io|Content-Length:348`
  <br/>
  * Type: string
  * Default: “”
  * Importance: medium

`http.request.parameters.separator`
: The character that separates multiple distinct headers in the configuration
  `http.request.parameters`.
  <br/>
  * 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 for `http.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, from `http.initial.offset`
  and `${entityName}` will be substituted with values from the configuration
  `entity.names`. The parameters are only set if `http.request.method``is set
  to ``GET`.
  <br/>
  * 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, from `http.initial.offset`), and `${entityName}` will be
  substituted with values from the config `entity.names`. The body is only set if
  `http.request.method` is set to `POST`.
  <br/>
  * Type: string
  * Default: “”
  * Importance: medium
  <br/>
  #### 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`, or `http.request.body` contain the template
  variable `${offset}`:
  <br/>
  * 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 (or `http.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, and
  `http.offset.json.pointer does` not need to be configured. If set to
  `CHAINING`, the configuration `http.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.
  <br/>
  * 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).
  <br/>
  * 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:
  <br/>
  ```json
  {
     "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
  }
  ```
  <br/>
  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}`.
  <br/>
  * Type: string
  * Default: “”
  * Importance: high

`use.http.offset.json.pointer.as.string`
: By default, the value of this property will be converted to a string before being used as an offset.
  Set this to `false` if this conversion is not needed.
  <br/>
  * Type: boolean
  * Default: `true`
  * Importance: medium

`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 if
  `http.offset.mode` is set to `CURSOR_PAGINATION`.
  <br/>
  * 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`.
  <br/>
  * Type: string
  * Default: “”
  * Importance: medium

## Retries

`max.retries`
: The maximum number of times to retry on errors before failing the task.
  <br/>
  * 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.
  <br/>
  * 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 to `400`. `400-500` includes codes from `400` to
  `500`, including `500`. Multiple ranges and single codes can be specified
  together to achieve fine-grained control over retry behavior. For example,
  `404,408,500-` will retry on `404 NOT FOUND`, `408 REQUEST TIMEOUT` and
  all `5xx` error codes. Note that some status codes will always be retried, ”
  such as unauthorized, timeouts and too many requests.
  <br/>
  * 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.
  <br/>
  * 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).
  <br/>
  * Type: string
  * Default: NONE
  * Importance: high

`connection.user`
: The username to be used with an endpoint requiring authentication.
  <br/>
  * Type: string
  * Default: “”
  * Importance: high

`connection.password`
: The password to be used with an endpoint requiring authentication.
  <br/>
  * 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.
  <br/>
  * Type: string
  * Default: “”
  * Importance: high

`oauth2.client.id`
: The client id used when fetching OAuth2 token.
  <br/>
  * Type: string
  * Default: “”
  * Importance: high

`oauth2.client.secret`
: The secret used when fetching OAuth2 token.
  <br/>
  * 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`.
  <br/>
  * Type: string
  * Default: access_token
  * Importance: high

`oauth2.client.auth.mode`
: Specifies how to encode `client_id` and `client_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’, then `client_id` and `client_secret` are sent as URL encoded parameters.
  <br/>
  * Type: string
  * Default: header
  * Valid Values: one of [header, url]
  * Importance: low

`oauth2.client.scope`
: The scope used when fetching OAuth2 token.
  <br/>
  * Type: string
  * Default: any
  * Importance: low

`bearer.token`
: The bearer authentication token to be used with an endpoint requiring bearer token-based authentication.
  <br/>
  * Type: password
  * Importance: medium

## Proxy configuration

`http.proxy.host`
: The host or IP address of the HTTP proxy.
  <br/>
  * Type: string
  * Default: “”
  * Importance: high

`http.proxy.port`
: The port number of the HTTP proxy.
  <br/>
  * Type: int
  * Default: 0
  * Valid Values: [0,…]
  * Importance: high

`http.proxy.user`
: The username to be used when authenticating with the HTTP proxy.
  <br/>
  * Type: string
  * Default: “”
  * Importance: high

`http.proxy.password`
: The password to be used when authenticating with the HTTP proxy.
  <br/>
  * Type: password
  * Default: [hidden]
  * Importance: high

## SSL configuration

`https.ssl.enabled.protocols`
: The list of protocols enabled for SSL connections.
  <br/>
  * 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.
  <br/>
  * 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.
  <br/>
  * 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.
  <br/>
  * 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.
  <br/>
  * Type: password
  * Default: null
  * Importance: high

`https.ssl.truststore.type`
: The file format of the trust store file.
  <br/>
  * Type: string
  * Default: JKS
  * Importance: medium

`https.ssl.truststore.location`
: The location of the trust store file.
  <br/>
  * 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.
  <br/>
  * 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.
  <br/>
  * 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.
  <br/>
  * 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.
  <br/>
  * Type: string
  * Default: https
  * Importance: low

`https.ssl.secure.random.implementation`
: The SecureRandom PRNG implementation to use for SSL cryptography operations.
  <br/>
  * Type: string
  * Default: null
  * Importance: low



## CSFLE and CSPE configurations

`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.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](https://support.confluent.io) for more
  information.
  <br/>
  * 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).
  <br/>
  * Type: list
  * Importance: high

`confluent.topic`
: Name of the Kafka topic used for Confluent Platform configuration, including licensing
  information.
  <br/>
  * 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).
  <br/>
  * Type: int
  * Default: 3
  * Importance: low
