Update monitoring rule
curl --request PUT \
--url https://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"extension_id": "<string>",
"watch_all": true,
"watch_items": [
"version",
"manifest",
"visibility",
"ownership",
"verdict",
"score",
"code_changes"
],
"destination_id": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id}"
payload = {
"extension_id": "<string>",
"watch_all": True,
"watch_items": ["version", "manifest", "visibility", "ownership", "verdict", "score", "code_changes"],
"destination_id": "<string>",
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
extension_id: '<string>',
watch_all: true,
watch_items: [
'version',
'manifest',
'visibility',
'ownership',
'verdict',
'score',
'code_changes'
],
destination_id: '<string>',
note: '<string>'
})
};
fetch('https://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_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://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_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([
'extension_id' => '<string>',
'watch_all' => true,
'watch_items' => [
'version',
'manifest',
'visibility',
'ownership',
'verdict',
'score',
'code_changes'
],
'destination_id' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id}"
payload := strings.NewReader("{\n \"extension_id\": \"<string>\",\n \"watch_all\": true,\n \"watch_items\": [\n \"version\",\n \"manifest\",\n \"visibility\",\n \"ownership\",\n \"verdict\",\n \"score\",\n \"code_changes\"\n ],\n \"destination_id\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"extension_id\": \"<string>\",\n \"watch_all\": true,\n \"watch_items\": [\n \"version\",\n \"manifest\",\n \"visibility\",\n \"ownership\",\n \"verdict\",\n \"score\",\n \"code_changes\"\n ],\n \"destination_id\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"extension_id\": \"<string>\",\n \"watch_all\": true,\n \"watch_items\": [\n \"version\",\n \"manifest\",\n \"visibility\",\n \"ownership\",\n \"verdict\",\n \"score\",\n \"code_changes\"\n ],\n \"destination_id\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"result": [
{
"rule_id": "rule123",
"organization_id": "org123",
"extension_id": "abcdef1234567890abcdef1234567890",
"watch_all": false,
"watch_items": [
"version",
"manifest",
"visibility",
"ownership",
"verdict",
"score",
"code_changes"
],
"destination_id": "dest123",
"note": "Monitor for security issues",
"platform": "chrome",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"details": "<string>"
}{
"error": "Authentication required"
}{
"error": "Access forbidden"
}{
"error": "Resource not found"
}{
"error": "Daily API quota exceeded",
"limit": 100,
"reset_at": "2024-01-16T00:00:00Z"
}{
"error": "<string>",
"details": "<string>"
}Monitoring
Update monitoring rule
Update an existing monitoring rule
PUT
/
organization
/
{organization_id}
/
monitor
/
{rule_id}
Update monitoring rule
curl --request PUT \
--url https://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"extension_id": "<string>",
"watch_all": true,
"watch_items": [
"version",
"manifest",
"visibility",
"ownership",
"verdict",
"score",
"code_changes"
],
"destination_id": "<string>",
"note": "<string>"
}
'import requests
url = "https://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id}"
payload = {
"extension_id": "<string>",
"watch_all": True,
"watch_items": ["version", "manifest", "visibility", "ownership", "verdict", "score", "code_changes"],
"destination_id": "<string>",
"note": "<string>"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
extension_id: '<string>',
watch_all: true,
watch_items: [
'version',
'manifest',
'visibility',
'ownership',
'verdict',
'score',
'code_changes'
],
destination_id: '<string>',
note: '<string>'
})
};
fetch('https://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_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://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_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([
'extension_id' => '<string>',
'watch_all' => true,
'watch_items' => [
'version',
'manifest',
'visibility',
'ownership',
'verdict',
'score',
'code_changes'
],
'destination_id' => '<string>',
'note' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id}"
payload := strings.NewReader("{\n \"extension_id\": \"<string>\",\n \"watch_all\": true,\n \"watch_items\": [\n \"version\",\n \"manifest\",\n \"visibility\",\n \"ownership\",\n \"verdict\",\n \"score\",\n \"code_changes\"\n ],\n \"destination_id\": \"<string>\",\n \"note\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"extension_id\": \"<string>\",\n \"watch_all\": true,\n \"watch_items\": [\n \"version\",\n \"manifest\",\n \"visibility\",\n \"ownership\",\n \"verdict\",\n \"score\",\n \"code_changes\"\n ],\n \"destination_id\": \"<string>\",\n \"note\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.secureannex.com/v0/organization/{organization_id}/monitor/{rule_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"extension_id\": \"<string>\",\n \"watch_all\": true,\n \"watch_items\": [\n \"version\",\n \"manifest\",\n \"visibility\",\n \"ownership\",\n \"verdict\",\n \"score\",\n \"code_changes\"\n ],\n \"destination_id\": \"<string>\",\n \"note\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"result": [
{
"rule_id": "rule123",
"organization_id": "org123",
"extension_id": "abcdef1234567890abcdef1234567890",
"watch_all": false,
"watch_items": [
"version",
"manifest",
"visibility",
"ownership",
"verdict",
"score",
"code_changes"
],
"destination_id": "dest123",
"note": "Monitor for security issues",
"platform": "chrome",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"details": "<string>"
}{
"error": "Authentication required"
}{
"error": "Access forbidden"
}{
"error": "Resource not found"
}{
"error": "Daily API quota exceeded",
"limit": 100,
"reset_at": "2024-01-16T00:00:00Z"
}{
"error": "<string>",
"details": "<string>"
}Authorizations
API key for authentication
Path Parameters
Organization ID
Monitoring rule ID
Body
application/json
Extension ID to monitor
Whether to watch all items
Specific items to watch
Available options:
version, manifest, visibility, ownership, verdict, score, code_changes Example:
[
"version",
"manifest",
"visibility",
"ownership",
"verdict",
"score",
"code_changes"
]
Destination ID for notifications
Rule note
Response
Rule updated successfully
Show child attributes
Show child attributes
