# HTTPS

The HTTP(s) Data Connector enables federated SQL query across [supported file formats](/building-blocks/data-connectors.md#object-store-file-formats) stored at an HTTP(s) endpoint.

```yaml
datasets:
  - from: http://my-http-api.com/report.csv
    name: local_report
    params:
      http_password: ${env:MY_HTTP_PASS}
```

## Configuration

### `from`

The `from` field must contain a valid URI to the location of a [supported file](/building-blocks/data-connectors.md#object-store-file-formats). For example, `http://static_username@my-http-api/report.csv`.

### `name`

The dataset name. This will be used as the table name within Spice.

Example:

```yaml
datasets:
  - from: http://static_username@my-http-api.com/report.csv
    name: cool_dataset
    params: ...
```

```sql
SELECT COUNT(*) FROM cool_dataset;
```

```shell
+----------+
| count(*) |
+----------+
| 6001215  |
+----------+
```

### `params`

The connector supports Basic HTTP authentication via `param` values.

| Parameter Name   | Description                                                                                                                                                                                                                                                                             |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `http_port`      | Optional. Port to create HTTP(s) connection over. Default: 80 and 443 for HTTP and HTTPS respectively.                                                                                                                                                                                  |
| `http_username`  | Optional. Username to provide connection for HTTP basic authentication. Default: None.                                                                                                                                                                                                  |
| `http_password`  | Optional. Password to provide connection for HTTP basic authentication. Default: None. Use the [secret replacement syntax](https://github.com/spicehq/docs/blob/trunk/building-blocks/secret-stores/index.md) to load the password from a secret store, e.g. `${secrets:my_http_pass}`. |
| `client_timeout` | Optional. Specifies timeout for HTTP operations. Default value is `30s` E.g. `client_timeout: 60s`                                                                                                                                                                                      |

## Examples

### Basic example

```yaml
datasets:
  - from: https://github.com/LAION-AI/audio-dataset/raw/7fd6ae3cfd7cde619f6bed817da7aa2202a5bc28/metadata/freesound/parquet/freesound_parquet.parquet
    name: laion_freesound
```

### Using Basic Authentication

```yaml
datasets:
  - from: http://static_username@my-http-api.com/report.csv
    name: local_report
    params:
      http_password: ${env:MY_HTTP_PASS}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.spice.ai/building-blocks/data-connectors/https.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
