Update Monitor
curl --request PUT \
--url https://hub.griff.services/monitor/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project": "<string>",
"name": "<string>",
"version": "1.0",
"frequency": {
"every": 123
},
"environment": "default",
"nodes": [
{
"id": "<string>",
"type": "HTTP_REQUEST",
"path": {
"$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
}
},
"base": {
"$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
}
},
"headers": {},
"body": "<unknown>"
}
],
"edges": [
{
"from": "<string>",
"to": "<string>"
}
],
"locations": [
"<string>"
],
"notifications": [
{
"trigger": {
"type": "run_failed"
},
"routing": {
"channelType": "slack",
"channel": "<string>"
},
"integration": "<string>"
}
]
}
'import requests
url = "https://hub.griff.services/monitor/{id}"
payload = {
"project": "<string>",
"name": "<string>",
"version": "1.0",
"frequency": { "every": 123 },
"environment": "default",
"nodes": [
{
"id": "<string>",
"type": "HTTP_REQUEST",
"path": { "$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
} },
"base": { "$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
} },
"headers": {},
"body": "<unknown>"
}
],
"edges": [
{
"from": "<string>",
"to": "<string>"
}
],
"locations": ["<string>"],
"notifications": [
{
"trigger": { "type": "run_failed" },
"routing": {
"channelType": "slack",
"channel": "<string>"
},
"integration": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project: '<string>',
name: '<string>',
version: '1.0',
frequency: {every: 123},
environment: 'default',
nodes: [
{
id: '<string>',
type: 'HTTP_REQUEST',
path: {$secret: {ref: '<string>', version: '<string>', field: '<string>'}},
base: {$secret: {ref: '<string>', version: '<string>', field: '<string>'}},
headers: {},
body: JSON.stringify('<unknown>')
}
],
edges: [{from: '<string>', to: '<string>'}],
locations: ['<string>'],
notifications: [
{
trigger: {type: 'run_failed'},
routing: {channelType: 'slack', channel: '<string>'},
integration: '<string>'
}
]
})
};
fetch('https://hub.griff.services/monitor/{id}', 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://hub.griff.services/monitor/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'project' => '<string>',
'name' => '<string>',
'version' => '1.0',
'frequency' => [
'every' => 123
],
'environment' => 'default',
'nodes' => [
[
'id' => '<string>',
'type' => 'HTTP_REQUEST',
'path' => [
'$secret' => [
'ref' => '<string>',
'version' => '<string>',
'field' => '<string>'
]
],
'base' => [
'$secret' => [
'ref' => '<string>',
'version' => '<string>',
'field' => '<string>'
]
],
'headers' => [
],
'body' => '<unknown>'
]
],
'edges' => [
[
'from' => '<string>',
'to' => '<string>'
]
],
'locations' => [
'<string>'
],
'notifications' => [
[
'trigger' => [
'type' => 'run_failed'
],
'routing' => [
'channelType' => 'slack',
'channel' => '<string>'
],
'integration' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://hub.griff.services/monitor/{id}"
payload := strings.NewReader("{\n \"project\": \"<string>\",\n \"name\": \"<string>\",\n \"version\": \"1.0\",\n \"frequency\": {\n \"every\": 123\n },\n \"environment\": \"default\",\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"HTTP_REQUEST\",\n \"path\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"base\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"headers\": {},\n \"body\": \"<unknown>\"\n }\n ],\n \"edges\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"locations\": [\n \"<string>\"\n ],\n \"notifications\": [\n {\n \"trigger\": {\n \"type\": \"run_failed\"\n },\n \"routing\": {\n \"channelType\": \"slack\",\n \"channel\": \"<string>\"\n },\n \"integration\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://hub.griff.services/monitor/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project\": \"<string>\",\n \"name\": \"<string>\",\n \"version\": \"1.0\",\n \"frequency\": {\n \"every\": 123\n },\n \"environment\": \"default\",\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"HTTP_REQUEST\",\n \"path\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"base\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"headers\": {},\n \"body\": \"<unknown>\"\n }\n ],\n \"edges\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"locations\": [\n \"<string>\"\n ],\n \"notifications\": [\n {\n \"trigger\": {\n \"type\": \"run_failed\"\n },\n \"routing\": {\n \"channelType\": \"slack\",\n \"channel\": \"<string>\"\n },\n \"integration\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.griff.services/monitor/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project\": \"<string>\",\n \"name\": \"<string>\",\n \"version\": \"1.0\",\n \"frequency\": {\n \"every\": 123\n },\n \"environment\": \"default\",\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"HTTP_REQUEST\",\n \"path\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"base\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"headers\": {},\n \"body\": \"<unknown>\"\n }\n ],\n \"edges\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"locations\": [\n \"<string>\"\n ],\n \"notifications\": [\n {\n \"trigger\": {\n \"type\": \"run_failed\"\n },\n \"routing\": {\n \"channelType\": \"slack\",\n \"channel\": \"<string>\"\n },\n \"integration\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"project": "<string>",
"id": "<string>",
"name": "<string>",
"version": "1.0",
"frequency": {
"every": 123
},
"environment": "default",
"nodes": [
{
"id": "<string>",
"type": "HTTP_REQUEST",
"path": {
"$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
}
},
"base": {
"$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
}
},
"headers": {},
"body": "<unknown>"
}
],
"edges": [
{
"from": "<string>",
"to": "<string>"
}
],
"locations": [
"<string>"
],
"notifications": [
{
"trigger": {
"type": "run_failed"
},
"routing": {
"channelType": "slack",
"channel": "<string>"
},
"integration": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}monitor
Update Monitor
Update an existing monitor by ID. Notification rules are synced from the request body.
PUT
/
monitor
/
{id}
Update Monitor
curl --request PUT \
--url https://hub.griff.services/monitor/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"project": "<string>",
"name": "<string>",
"version": "1.0",
"frequency": {
"every": 123
},
"environment": "default",
"nodes": [
{
"id": "<string>",
"type": "HTTP_REQUEST",
"path": {
"$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
}
},
"base": {
"$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
}
},
"headers": {},
"body": "<unknown>"
}
],
"edges": [
{
"from": "<string>",
"to": "<string>"
}
],
"locations": [
"<string>"
],
"notifications": [
{
"trigger": {
"type": "run_failed"
},
"routing": {
"channelType": "slack",
"channel": "<string>"
},
"integration": "<string>"
}
]
}
'import requests
url = "https://hub.griff.services/monitor/{id}"
payload = {
"project": "<string>",
"name": "<string>",
"version": "1.0",
"frequency": { "every": 123 },
"environment": "default",
"nodes": [
{
"id": "<string>",
"type": "HTTP_REQUEST",
"path": { "$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
} },
"base": { "$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
} },
"headers": {},
"body": "<unknown>"
}
],
"edges": [
{
"from": "<string>",
"to": "<string>"
}
],
"locations": ["<string>"],
"notifications": [
{
"trigger": { "type": "run_failed" },
"routing": {
"channelType": "slack",
"channel": "<string>"
},
"integration": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
project: '<string>',
name: '<string>',
version: '1.0',
frequency: {every: 123},
environment: 'default',
nodes: [
{
id: '<string>',
type: 'HTTP_REQUEST',
path: {$secret: {ref: '<string>', version: '<string>', field: '<string>'}},
base: {$secret: {ref: '<string>', version: '<string>', field: '<string>'}},
headers: {},
body: JSON.stringify('<unknown>')
}
],
edges: [{from: '<string>', to: '<string>'}],
locations: ['<string>'],
notifications: [
{
trigger: {type: 'run_failed'},
routing: {channelType: 'slack', channel: '<string>'},
integration: '<string>'
}
]
})
};
fetch('https://hub.griff.services/monitor/{id}', 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://hub.griff.services/monitor/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'project' => '<string>',
'name' => '<string>',
'version' => '1.0',
'frequency' => [
'every' => 123
],
'environment' => 'default',
'nodes' => [
[
'id' => '<string>',
'type' => 'HTTP_REQUEST',
'path' => [
'$secret' => [
'ref' => '<string>',
'version' => '<string>',
'field' => '<string>'
]
],
'base' => [
'$secret' => [
'ref' => '<string>',
'version' => '<string>',
'field' => '<string>'
]
],
'headers' => [
],
'body' => '<unknown>'
]
],
'edges' => [
[
'from' => '<string>',
'to' => '<string>'
]
],
'locations' => [
'<string>'
],
'notifications' => [
[
'trigger' => [
'type' => 'run_failed'
],
'routing' => [
'channelType' => 'slack',
'channel' => '<string>'
],
'integration' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://hub.griff.services/monitor/{id}"
payload := strings.NewReader("{\n \"project\": \"<string>\",\n \"name\": \"<string>\",\n \"version\": \"1.0\",\n \"frequency\": {\n \"every\": 123\n },\n \"environment\": \"default\",\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"HTTP_REQUEST\",\n \"path\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"base\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"headers\": {},\n \"body\": \"<unknown>\"\n }\n ],\n \"edges\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"locations\": [\n \"<string>\"\n ],\n \"notifications\": [\n {\n \"trigger\": {\n \"type\": \"run_failed\"\n },\n \"routing\": {\n \"channelType\": \"slack\",\n \"channel\": \"<string>\"\n },\n \"integration\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://hub.griff.services/monitor/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"project\": \"<string>\",\n \"name\": \"<string>\",\n \"version\": \"1.0\",\n \"frequency\": {\n \"every\": 123\n },\n \"environment\": \"default\",\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"HTTP_REQUEST\",\n \"path\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"base\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"headers\": {},\n \"body\": \"<unknown>\"\n }\n ],\n \"edges\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"locations\": [\n \"<string>\"\n ],\n \"notifications\": [\n {\n \"trigger\": {\n \"type\": \"run_failed\"\n },\n \"routing\": {\n \"channelType\": \"slack\",\n \"channel\": \"<string>\"\n },\n \"integration\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hub.griff.services/monitor/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"project\": \"<string>\",\n \"name\": \"<string>\",\n \"version\": \"1.0\",\n \"frequency\": {\n \"every\": 123\n },\n \"environment\": \"default\",\n \"nodes\": [\n {\n \"id\": \"<string>\",\n \"type\": \"HTTP_REQUEST\",\n \"path\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"base\": {\n \"$secret\": {\n \"ref\": \"<string>\",\n \"version\": \"<string>\",\n \"field\": \"<string>\"\n }\n },\n \"headers\": {},\n \"body\": \"<unknown>\"\n }\n ],\n \"edges\": [\n {\n \"from\": \"<string>\",\n \"to\": \"<string>\"\n }\n ],\n \"locations\": [\n \"<string>\"\n ],\n \"notifications\": [\n {\n \"trigger\": {\n \"type\": \"run_failed\"\n },\n \"routing\": {\n \"channelType\": \"slack\",\n \"channel\": \"<string>\"\n },\n \"integration\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"project": "<string>",
"id": "<string>",
"name": "<string>",
"version": "1.0",
"frequency": {
"every": 123
},
"environment": "default",
"nodes": [
{
"id": "<string>",
"type": "HTTP_REQUEST",
"path": {
"$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
}
},
"base": {
"$secret": {
"ref": "<string>",
"version": "<string>",
"field": "<string>"
}
},
"headers": {},
"body": "<unknown>"
}
],
"edges": [
{
"from": "<string>",
"to": "<string>"
}
],
"locations": [
"<string>"
],
"notifications": [
{
"trigger": {
"type": "run_failed"
},
"routing": {
"channelType": "slack",
"channel": "<string>"
},
"integration": "<string>"
}
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Available options:
1.0 Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Default Response
Show child attributes
Show child attributes
⌘I