> ## Documentation Index
> Fetch the complete documentation index at: https://docs.keephq.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# HTTP Provider

> HTTP Provider is a provider used to query/notify using HTTP requests

## In workflows

This provider can be used in workflows.

As "step" to query data, example:

```yaml theme={null}
steps:
    - name: Query http
      provider: http
      config: "{{ provider.my_provider_name }}"
      with:
        url: {value}  
        method: {value}  
        headers: {value}  
        body: {value}  
        params: {value}  
        proxies: {value}  
        fail_on_error: {value}  
        verify: {value}  
```

As "action" to make changes or update data, example:

```yaml theme={null}
actions:
    - name: Query http
      provider: http
      config: "{{ provider.my_provider_name }}"
      with:
        url: {value}  
        method: {value}  
        headers: {value}  
        body: {value}  
        params: {value}  
        proxies: {value}  
        verify: {value}  
```

Check the following workflow examples:

* [create-new-incident-grafana-incident.yaml](https://github.com/keephq/keep/blob/main/examples/workflows/create-new-incident-grafana-incident.yaml)
* [db\_disk\_space\_monitor.yml](https://github.com/keephq/keep/blob/main/examples/workflows/db_disk_space_monitor.yml)
* [http\_enrich.yml](https://github.com/keephq/keep/blob/main/examples/workflows/http_enrich.yml)
* [ifelse.yml](https://github.com/keephq/keep/blob/main/examples/workflows/ifelse.yml)
* [incident-enrich.yaml](https://github.com/keephq/keep/blob/main/examples/workflows/incident-enrich.yaml)
* [pagerduty.yml](https://github.com/keephq/keep/blob/main/examples/workflows/pagerduty.yml)
* [permissions\_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/permissions_example.yml)
* [send-message-telegram-with-htmlmd.yaml](https://github.com/keephq/keep/blob/main/examples/workflows/send-message-telegram-with-htmlmd.yaml)
* [simple\_http\_request\_ntfy.yml](https://github.com/keephq/keep/blob/main/examples/workflows/simple_http_request_ntfy.yml)
* [slack-workflow-trigger.yml](https://github.com/keephq/keep/blob/main/examples/workflows/slack-workflow-trigger.yml)
* [telegram\_basic.yml](https://github.com/keephq/keep/blob/main/examples/workflows/telegram_basic.yml)
* [update-incident-grafana-incident.yaml](https://github.com/keephq/keep/blob/main/examples/workflows/update-incident-grafana-incident.yaml)
* [update\_workflows\_from\_http.yml](https://github.com/keephq/keep/blob/main/examples/workflows/update_workflows_from_http.yml)
* [webhook\_example\_foreach.yml](https://github.com/keephq/keep/blob/main/examples/workflows/webhook_example_foreach.yml)
* [zoom\_chat\_example.yml](https://github.com/keephq/keep/blob/main/examples/workflows/zoom_chat_example.yml)

## Connecting with the Provider

To connect to the provider, you can instantiate an instance of the `HttpProvider` class, providing a `provider_id` and a `ProviderConfig` object. Then you can call the `query` method to query the HTTP endpoint.

## Notes

The code logs some debug information about the requests being sent, including the request headers, body, and query parameters. This information should not contain sensitive information, but it's important to make sure of that before using this provider in production.

## Useful Links

* [requests library documentation](https://docs.python-requests.org/en/latest/)
