NotificationRules

Download InfluxDB API Spec
Create and manage notification rules that define when and how InfluxDB OSS v2 sends notifications to configured endpoints.
GET /api/v2/notificationRules

List all notification rules

Parameters

Query parameters
offset integer

The offset for pagination. The number of records to skip.

For more information about pagination parameters, see Pagination.

limit integer
Limits the number of records returned. Default is 20.
Default: 20
orgID required string
Only show notification rules that belong to a specific organization ID.
checkID string
Only show notifications that belong to the specific check ID.
tag string
Only return notification rules that “would match” statuses which contain the tag key value pairs provided.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/api/v2/notificationRules?orgID=ORGID" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 A list of notification rules
links string
notificationRules object[]
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
POST /api/v2/notificationRules

Add a notification rule

Request body required

Notification rule to create
Content-Type: application/json
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/api/v2/notificationRules" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json"

Responses

201 Notification rule created
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
GET /api/v2/notificationRules/{ruleID}

Retrieve a notification rule

Parameters

Path parameters
ruleID required string
The notification rule ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/api/v2/notificationRules/{ruleID}" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 The notification rule requested
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
PUT /api/v2/notificationRules/{ruleID}

Update a notification rule

Parameters

Path parameters
ruleID required string
The notification rule ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Notification rule update to apply
Content-Type: application/json
Example request Ask AI about this
curl --request PUT \
  "http://localhost:8086/api/v2/notificationRules/{ruleID}" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json"

Responses

200 An updated notification rule
404 The notification rule was not found
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
PATCH /api/v2/notificationRules/{ruleID}

Update a notification rule

Parameters

Path parameters
ruleID required string
The notification rule ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Notification rule update to apply
Content-Type: application/json
description string
name string
status string
Allowed: active , inactive
Example request Ask AI about this
curl --request PATCH \
  "http://localhost:8086/api/v2/notificationRules/{ruleID}" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "description": "DESCRIPTION",
  "name": "NAME",
  "status": "active"
}'

Responses

200 An updated notification rule
404 The notification rule was not found
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
DELETE /api/v2/notificationRules/{ruleID}

Delete a notification rule

Parameters

Path parameters
ruleID required string
The notification rule ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request DELETE \
  "http://localhost:8086/api/v2/notificationRules/{ruleID}" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

204 Delete has been accepted
404 The check was not found
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
GET /api/v2/notificationRules/{ruleID}/labels

List all labels for a notification rule

Parameters

Path parameters
ruleID required string
The notification rule ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request GET \
  "http://localhost:8086/api/v2/notificationRules/{ruleID}/labels" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

200 A list of all labels for a notification rule
labels string
links string
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
POST /api/v2/notificationRules/{ruleID}/labels

Add a label to a notification rule

Parameters

Path parameters
ruleID required string
The notification rule ID.
Header parameters
Zap-Trace-Span string
OpenTracing span context

Request body required

Label to add
Content-Type: application/json
labelID required string
A label ID. Specifies the label to attach.
Example request Ask AI about this
curl --request POST \
  "http://localhost:8086/api/v2/notificationRules/{ruleID}/labels" \
  --header "Authorization: Bearer INFLUX_TOKEN" \
  --header "Content-Type: application/json" \
  --data-raw '{
  "labelID": "LABELID"
}'

Responses

201 The label was added to the notification rule
label string
links string
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
DELETE /api/v2/notificationRules/{ruleID}/labels/{labelID}

Delete label from a notification rule

Parameters

Path parameters
ruleID required string
The notification rule ID.
labelID required string
The ID of the label to delete.
Header parameters
Zap-Trace-Span string
OpenTracing span context
Example request Ask AI about this
curl --request DELETE \
  "http://localhost:8086/api/v2/notificationRules/{ruleID}/labels/{labelID}" \
  --header "Authorization: Bearer INFLUX_TOKEN"

Responses

204 Delete has been accepted
404 Rule or label not found
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.
default Unexpected error
code required string
code is the machine-readable error code.
Allowed: internal error , not implemented , not found , conflict , invalid , unprocessable entity , empty value , unavailable , forbidden , too many requests , unauthorized , method not allowed , request too large , unsupported media type
err string
Stack of errors that occurred during processing of the request. Useful for debugging.
message string
Human-readable message.
op string
Describes the logical code operation when the error occurred. Useful for debugging.

Was this page helpful?

Thank you for your feedback!