`PATCH /v1/orgs/{org}/notification-rules/{rule_id}`.
PATCH
/v1/orgs/{org}/notification-rules/{rule_id}
const url = 'https://api.updawg.net/v1/orgs/example/notification-rules/example';const options = { method: 'PATCH', headers: {'Content-Type': 'application/json'}, body: '{"channel_ids":["example"],"enabled":true,"event_types":["example"],"filter":{"known_exploited":true,"min_severity":"none","proposal_kinds":["example"]},"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.updawg.net/v1/orgs/example/notification-rules/example \ --header 'Content-Type: application/json' \ --data '{ "channel_ids": [ "example" ], "enabled": true, "event_types": [ "example" ], "filter": { "known_exploited": true, "min_severity": "none", "proposal_kinds": [ "example" ] }, "name": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
Organization slug.
rule_id
required
string
The nru_… id.
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
channel_ids
Array<string> | null
enabled
boolean | null
event_types
Array<string> | null
filter
One of:
What a rule narrows its events by. Every field optional; all given must hold. The proposal fields do not narrow host events.
null
name
string | null
Responses
Section titled “Responses”Changed. channel_ids, when given, replaces the list.
Media typeapplication/json
object
channel_ids
required
nch_… ids.
Array<string>
created_at
required
string format: date-time
enabled
required
boolean
event_types
required
Array<string>
filter
required
What a rule narrows its events by. Every field optional; all given must hold. The proposal fields do not narrow host events.
id
required
nru_….
string
name
required
string
updated_at
required
string format: date-time
Example
{ "filter": { "min_severity": "none" }}As for creating one.
Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}No session.
Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}Not permitted for this role.
Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}No such rule here.
Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}A rule with that name exists.
Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}Over the organization’s request limit. Retry-After says when to try again; RateLimit-Limit is the burst.
Media typeapplication/json
object
detail
string | null
status
required
integer format: int32
title
required
string
type
required
string
Examplegenerated
{ "detail": "example", "status": 1, "title": "example", "type": "example"}