Create a Monad Agent task Copy
curl --request POST \
--url https://api.brewit.money/automation/scheduler/jobs \
--header 'Content-Type: application/json' \
--data '
{
"name": "Scheduler Job ",
"repeat": 5000,
"times": 1,
"task": "external",
"payload": {
"callbackUrl": "https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659",
"data": {
"name": "koshik"
}
},
"enabled": true
}
'import requests
url = "https://api.brewit.money/automation/scheduler/jobs"
payload = {
"name": "Scheduler Job ",
"repeat": 5000,
"times": 1,
"task": "external",
"payload": {
"callbackUrl": "https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659",
"data": { "name": "koshik" }
},
"enabled": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Scheduler Job ',
repeat: 5000,
times: 1,
task: 'external',
payload: {
callbackUrl: 'https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659',
data: {name: 'koshik'}
},
enabled: true
})
};
fetch('https://api.brewit.money/automation/scheduler/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brewit.money/automation/scheduler/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Scheduler Job ',
'repeat' => 5000,
'times' => 1,
'task' => 'external',
'payload' => [
'callbackUrl' => 'https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659',
'data' => [
'name' => 'koshik'
]
],
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.brewit.money/automation/scheduler/jobs"
payload := strings.NewReader("{\n \"name\": \"Scheduler Job \",\n \"repeat\": 5000,\n \"times\": 1,\n \"task\": \"external\",\n \"payload\": {\n \"callbackUrl\": \"https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659\",\n \"data\": {\n \"name\": \"koshik\"\n }\n },\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.brewit.money/automation/scheduler/jobs")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Scheduler Job \",\n \"repeat\": 5000,\n \"times\": 1,\n \"task\": \"external\",\n \"payload\": {\n \"callbackUrl\": \"https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659\",\n \"data\": {\n \"name\": \"koshik\"\n }\n },\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brewit.money/automation/scheduler/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Scheduler Job \",\n \"repeat\": 5000,\n \"times\": 1,\n \"task\": \"external\",\n \"payload\": {\n \"callbackUrl\": \"https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659\",\n \"data\": {\n \"name\": \"koshik\"\n }\n },\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_bodyScheduled Jobs
Create a Scheduled Job
POST
/
automation
/
scheduler
/
jobs
Create a Monad Agent task Copy
curl --request POST \
--url https://api.brewit.money/automation/scheduler/jobs \
--header 'Content-Type: application/json' \
--data '
{
"name": "Scheduler Job ",
"repeat": 5000,
"times": 1,
"task": "external",
"payload": {
"callbackUrl": "https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659",
"data": {
"name": "koshik"
}
},
"enabled": true
}
'import requests
url = "https://api.brewit.money/automation/scheduler/jobs"
payload = {
"name": "Scheduler Job ",
"repeat": 5000,
"times": 1,
"task": "external",
"payload": {
"callbackUrl": "https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659",
"data": { "name": "koshik" }
},
"enabled": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Scheduler Job ',
repeat: 5000,
times: 1,
task: 'external',
payload: {
callbackUrl: 'https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659',
data: {name: 'koshik'}
},
enabled: true
})
};
fetch('https://api.brewit.money/automation/scheduler/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.brewit.money/automation/scheduler/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Scheduler Job ',
'repeat' => 5000,
'times' => 1,
'task' => 'external',
'payload' => [
'callbackUrl' => 'https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659',
'data' => [
'name' => 'koshik'
]
],
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.brewit.money/automation/scheduler/jobs"
payload := strings.NewReader("{\n \"name\": \"Scheduler Job \",\n \"repeat\": 5000,\n \"times\": 1,\n \"task\": \"external\",\n \"payload\": {\n \"callbackUrl\": \"https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659\",\n \"data\": {\n \"name\": \"koshik\"\n }\n },\n \"enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.brewit.money/automation/scheduler/jobs")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Scheduler Job \",\n \"repeat\": 5000,\n \"times\": 1,\n \"task\": \"external\",\n \"payload\": {\n \"callbackUrl\": \"https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659\",\n \"data\": {\n \"name\": \"koshik\"\n }\n },\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.brewit.money/automation/scheduler/jobs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Scheduler Job \",\n \"repeat\": 5000,\n \"times\": 1,\n \"task\": \"external\",\n \"payload\": {\n \"callbackUrl\": \"https://webhook.site/bf9b412a-782d-4fda-90ad-4e3a8ee32659\",\n \"data\": {\n \"name\": \"koshik\"\n }\n },\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_bodyBody
application/json
Response
200 - undefined
⌘I