Event filters
GET Returns the list of supported event filters.
https://api.track.toggl.com/webhooks/api/v1/event_filters
Returns the list of supported event filters to be used when creating or updating a subscription.
- cURL
- Go
- Ruby
- JavaScript
- Python
- Rust
curl https://api.track.toggl.com/webhooks/api/v1/event_filters \
-H "Content-Type: application/json"
req, err := http.NewRequest(http.MethodGet,
"https://api.track.toggl.com/webhooks/api/v1/event_filters")
if err != nil {
print(err)
}
req.Header.Set("Content-Type", "application/json; charset=utf-8")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
print(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
print(err)
}
fmt.Print(string(body))
require 'net/http'
require 'uri'
require 'json'
uri = URI('https://api.track.toggl.com/webhooks/api/v1/event_filters')
http = Net::HTTP.new(uri.host, uri.port)
req = Net::HTTP::Get.new(uri.path)
req['Content-Type'] = "application/json"
res = http.request(req)
puts JSON.parse(res.body)
fetch("https://api.track.toggl.com/webhooks/api/v1/event_filters", {
method: "GET",
headers: {
"Content-Type": "application/json"
},
})
.then((resp) => resp.json())
.then((json) => {
console.log(json);
})
.catch(err => console.error(err));
import requests
from base64 import b64encode
data = requests.get('https://api.track.toggl.com/webhooks/api/v1/event_filters', headers={'content-type': 'application/json'})
print(data.json())
extern crate tokio;
extern crate serde_json;
use reqwest::{Client};
use reqwest::header::{CONTENT_TYPE};
#[tokio::main]
async fn main() -> Result<(), reqwest::Error> {
let client = Client::new();
let json = client.request(Method::GET, "https://api.track.toggl.com/webhooks/api/v1/event_filters".to_string())
.header(CONTENT_TYPE, "application/json")
.send()
.await?
.json()
.await?;
println!("{:#?}", json);
Ok(())
}
Response
200
Successful operation.
500
Internal Server Error