influxdata / influxdata/kapacitor

Support for HTTP PUT, PATCH, DELETE and other methods

Open
#1,534 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
2.4k
Forks
479
Avg merge
4d 16h
Merged PRs (30d)
4

Description

We are sending a HTTP PUT to make Hue Lights go red when an alarm goes off. Is there a way to do this directly from Kapacitor? (I found and use the HTTP POST but am missing other HTTP methods). For example in JavaScript I would send a PUT like this to switch the lights on and make them red:

var xmlhttp = new XMLHttpRequest();
xmlhttp.open("PUT", 'http://myhuelights/api//lights//state');
xmlhttp.send('{"on":true, "sat":254, "bri":254,"hue":5448,"alert": "none"}');

It would also be useful to have all the methods for various other use cases. For example I would love to be able to simply recursively PATCH our alerts via the kapacitor API as they get fired as that is such an efficient way to change and improve many types of alerts dynamically.

Contributor guide

Open the contributing guide

Research direction

Start from Kapacitor's existing HTTP POST support and trace the entry point that selects the request method. Determine how PUT, PATCH, DELETE, and other requested methods should be exposed, then verify that HTTP actions can send them with the needed request body and that existing POST behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
api, backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.