Notification Rules

This contains APIs for Notification Rules

List Notification rules

Get list of notification rules

Securityx-api-key
Request
path Parameters
org
required
string

Identifier field of the organization the resource is scoped to

project
required
string

Identifier field of the project the resource is scoped to

query Parameters
limit
integer <= 1000
Default: 30

Number of items to return per page.

sort
string

Parameter on the basis of which sorting is done.

Enum: "name" "identifier" "created" "updated"
order
string

Order on the basis of which sorting is done.

Enum: "ASC" "DESC"
search_term
string

This would be used to filter resources having attributes matching with search term.

page
integer
Default: 0

Pagination page number strategy: Specify the page number within the paginated collection related to the number of items in each page

resource
string

Notification entity name

event
string

Notification event name

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Example response

get/v1/orgs/{org}/projects/{project}/notification-rules
Request samples
Response samples
[
  • {
    }
]

Create Notification Rule

Create Notification Rule

Securityx-api-key
Request
path Parameters
org
required
string

Identifier field of the organization the resource is scoped to

project
required
string

Identifier field of the project the resource is scoped to

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Request Body schema: application/json

Notification rule request

identifier
string
account
string
org
string
project
string
status
string (Status)

Notification Rule Status

Enum: "ENABLED" "DISABLED"
last_modified
integer <int64>
created
integer <int64>
name
string
Array of objects (NotificationConditionDTO)
notification_channel_refs
Array of strings
object (CustomNotificationTemplateDTO)
Responses
201

Example response

post/v1/orgs/{org}/projects/{project}/notification-rules
Request samples
application/json
{
  • "identifier": "string",
  • "account": "string",
  • "org": "string",
  • "project": "string",
  • "status": "ENABLED",
  • "last_modified": 0,
  • "created": 0,
  • "name": "string",
  • "notification_conditions": [
    ],
  • "notification_channel_refs": [
    ],
  • "custom_notification_template_ref": {
    }
}
Response samples
{
  • "identifier": "string",
  • "account": "string",
  • "org": "string",
  • "project": "string",
  • "status": "ENABLED",
  • "last_modified": 0,
  • "created": 0,
  • "name": "string",
  • "notification_conditions": [
    ],
  • "notification_channel_refs": [
    ],
  • "custom_notification_template_ref": {
    }
}

Get Notification Rule

Get notification rule

Securityx-api-key
Request
path Parameters
org
required
string

Identifier field of the organization the resource is scoped to

project
required
string

Identifier field of the project the resource is scoped to

notification-rule
required
string

identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200

Example response

get/v1/orgs/{org}/projects/{project}/notification-rules/{notification-rule}
Request samples
Response samples
{
  • "identifier": "string",
  • "account": "string",
  • "org": "string",
  • "project": "string",
  • "status": "ENABLED",
  • "last_modified": 0,
  • "created": 0,
  • "name": "string",
  • "notification_conditions": [
    ],
  • "notification_channel_refs": [
    ],
  • "custom_notification_template_ref": {
    }
}

Delete Notification Rule

Delete notification rule

Securityx-api-key
Request
path Parameters
org
required
string

Identifier field of the organization the resource is scoped to

project
required
string

Identifier field of the project the resource is scoped to

notification-rule
required
string

identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
204

No Content

400
delete/v1/orgs/{org}/projects/{project}/notification-rules/{notification-rule}
Request samples
Response samples
application/json
{ }

Update Notification Rule

Update Notification Rule

Securityx-api-key
Request
path Parameters
org
required
string

Identifier field of the organization the resource is scoped to

project
required
string

Identifier field of the project the resource is scoped to

notification-rule
required
string

identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Request Body schema: application/json

Notification rule request

identifier
string
account
string
org
string
project
string
status
string (Status)

Notification Rule Status

Enum: "ENABLED" "DISABLED"
last_modified
integer <int64>
created
integer <int64>
name
string
Array of objects (NotificationConditionDTO)
notification_channel_refs
Array of strings
object (CustomNotificationTemplateDTO)
Responses
200

Example response

put/v1/orgs/{org}/projects/{project}/notification-rules/{notification-rule}
Request samples
application/json
{
  • "identifier": "string",
  • "account": "string",
  • "org": "string",
  • "project": "string",
  • "status": "ENABLED",
  • "last_modified": 0,
  • "created": 0,
  • "name": "string",
  • "notification_conditions": [
    ],
  • "notification_channel_refs": [
    ],
  • "custom_notification_template_ref": {
    }
}
Response samples
{
  • "identifier": "string",
  • "account": "string",
  • "org": "string",
  • "project": "string",
  • "status": "ENABLED",
  • "last_modified": 0,
  • "created": 0,
  • "name": "string",
  • "notification_conditions": [
    ],
  • "notification_channel_refs": [
    ],
  • "custom_notification_template_ref": {
    }
}

Validate notification rule identifier

Validate notification rule identifier

Securityx-api-key
Request
path Parameters
org
required
string

Identifier field of the organization the resource is scoped to

project
required
string

Identifier field of the project the resource is scoped to

notification-rule
required
string

Notification Rule Identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200
302

Found

get/v1/orgs/{org}/projects/{project}/notification-rules/validate-rules/{notification-rule}
Request samples
Response samples
application/json
{
  • "exists": true
}

Validate notification rule identifier

Validate notification rule identifier org level

Securityx-api-key
Request
path Parameters
org
required
string

Identifier field of the organization the resource is scoped to

notification-rule
required
string

Notification Rule Identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200
302

Found

get/v1/orgs/{org}/validate-rules/{notification-rule}
Request samples
Response samples
application/json
{
  • "exists": true
}

Validate notification rule identifier

Validate notification rule identifier

Securityx-api-key
Request
path Parameters
notification-rule
required
string

identifier

header Parameters
Harness-Account
string

Identifier field of the account the resource is scoped to. This is required for Authorization methods other than the x-api-key header. If you are using the x-api-key header, this can be skipped.

Responses
200
302

Found

get/v1/validate-rules/{notification-rule}
Request samples
Response samples
application/json
{
  • "exists": true
}