In workflows
This provider can be used in workflows.
As "step" 可以 query data, example:
yaml
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" 可以 make changes or update data, example:
yaml
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
- db_disk_space_moni可以r.yml
- http_enrich.yml
- ifelse.yml
- incident-enrich.yaml
- pagerduty.yml
- permissions_example.yml
- send-message-telegram-with-htmlmd.yaml
- simple_http_request_ntfy.yml
- slack-workflow-trigger.yml
- telegram_basic.yml
- update-incident-grafana-incident.yaml
- update_workflows_from_http.yml
- webhook_example_foreach.yml
- zoom_chat_example.yml
连接 Provider
要连接到 provider,您可以实例化 HttpProvider 类的一个实例,提供 provider_id 和 ProviderConfig 对象。然后您可以调用 query 方法来查询 HTTP 端点。
注意事项
代码会记录有关正在发送的请求的一些调试信息,包括请求头、请求体和查询参数。此信息不应包含敏感信息,但在生产环境中使用了此 provider 之前,确保这一点很重要。