Tenable Security Center API: Notification

/notification

Methods
GET

Gets the list of notifications.

NOTE #1: There is currently no means to get all notifications. Rather, only notifications in the valid timeframe values.
NOTE #2: If a retrieved message had a status of 'new', it will be updated to 'sent'

Fields Parameter
Expand

The fields parameter should be specified along the query string, and it takes the syntax

    ?fields=<field>,...

Allowed Fields

**id
initiator
action
type
time
target
changes
effects
status
text

Legend

* = always comes back

** = comes back if fields list not specified on GET all
redFont =  field is a JSON object e.g. "repository" :{ "id" : <id>, "name" : <name> } )
Request Parameters
Expand

Parameters must be passed in as query string (as opposed to JSON) in the format of: /notification?timeframe=24h

{
	"timeframe" : "24h" | "7d" | "30d" DEFAULT "24h"}
Example Response
Expand
{
	"type" : "regular",
	"response" : [
		{
			"id" : "31",
			"initiator" : "FeedUpdate",
			"action" : "end",
			"type" : "feed",
			"time" : "1424709857",
			"target" : {
				"id" : -1,
				"name" : "",
				"description" : ""			},
			"changes" : null,
			"effects" : [],
			"status" : "sent",
			"text" : "Feed Update job completed."		}
	],
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1425923484
}

/notification/{id}

Methods
GET

Gets the notification associated with {id}.

NOTE: If a retrieved message had a status of 'new', it will be updated to 'sent'

Fields Parameter
Expand

The fields parameter should be specified along the query string, and it takes the syntax

    ?fields=<field>,...

Allowed Fields

**id
initiator
action
type
time
target
changes
effects
status
text

Legend

* = always comes back

** = comes back if fields list not specified on GET all
redFont =  field is a JSON object e.g. "repository" :{ "id" : <id>, "name" : <name> } )
Request Parameters

None

Example Response
Expand
{
	"type" : "regular",
	"response" : {
		"id" : "39",
		"initiator" : "Scan",
		"action" : "end",
		"type" : "scan",
		"time" : "1427230966",
		"target" : {
			"id" : "15",
			"name" : "Weekly Scan",
			"description" : ""		},
		"changes" : null,
		"effects" : [],
		"status" : "sent",
		"text" : "The Scan completed normally."	},
	"error_code" : 0,
	"error_msg" : "",
	"warnings" : [],
	"timestamp" : 1427311911
}

/notification

Methods
PATCH

Patch the notification update particular id or All notification

NOTE: If required to update status id wise then pass id ex. '1,2,3' and for all notification update pass 'All'

Fields Parameter

None

Request Parameters
Expand

Parameters must be passed in as query string (as opposed to JSON) in the format of: /notification?timeframe=24h

{
    "id": "All",
    "status": "new"}
Example Response
Expand
{
    "type": "regular",
    "response": 0,
    "error_code": 0,
    "error_msg": "",
    "warnings": [],
    "timestamp": 1664517168
}