Skip to content

`POST /v1/orgs/{org}/notification-rules`.

POST
/v1/orgs/{org}/notification-rules
curl --request POST \
--url https://api.updawg.net/v1/orgs/example/notification-rules \
--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" }'
org
required
string

Organization slug.

Media typeapplication/json
object
channel_ids
required

nch_… ids. May be empty: a rule for proposal.auto_merged with no channels is how auto-merges are silenced.

Array<string>
enabled
boolean
event_types
required

proposal.opened, proposal.auto_merged, proposal.approved, proposal.merged, proposal.halted, host.stale, host.recovered, release.eol.

Array<string>
filter

What a rule narrows its events by. Every field optional; all given must hold. The proposal fields do not narrow host events.

object
known_exploited

Only proposals that fix something known to be exploited (true), or only those that do not (false).

boolean | null
min_severity
One of:

At least this severe.

string
Allowed values: none low medium high critical
proposal_kinds

Only these kinds of proposal: security, bugfix, …

Array<string> | null
name
required
string

Saved.

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.

object
known_exploited

Only proposals that fix something known to be exploited (true), or only those that do not (false).

boolean | null
min_severity
One of:

At least this severe.

string
Allowed values: none low medium high critical
proposal_kinds

Only these kinds of proposal: security, bugfix, …

Array<string> | null
id
required

nru_….

string
name
required
string
updated_at
required
string format: date-time
Example
{
"filter": {
"min_severity": "none"
}
}

No name, no event type or one that does not exist, a channel id that is not one of this organization’s, or a filter with a field that does not exist.

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 organization, or not yours — one answer for both.

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"
}