diff --git a/docs/api-generated/rules/rule-apis-passthru.asciidoc b/docs/api-generated/rules/rule-apis-passthru.asciidoc
index 08fdcd1d0276a..2ac55ffee4cfa 100644
--- a/docs/api-generated/rules/rule-apis-passthru.asciidoc
+++ b/docs/api-generated/rules/rule-apis-passthru.asciidoc
@@ -111,6 +111,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
+ "api_key_created_by_user" : false,
"params" : {
"key" : ""
},
@@ -407,6 +408,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
+ "api_key_created_by_user" : false,
"params" : {
"key" : ""
},
@@ -473,6 +475,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
+ "api_key_created_by_user" : false,
"params" : {
"key" : ""
},
@@ -654,6 +657,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
+ "api_key_created_by_user" : false,
"params" : {
"key" : ""
},
@@ -2012,6 +2016,7 @@ Any modifications made to this file will be overwritten.
"warning" : "warning",
"outcome" : "succeeded"
},
+ "api_key_created_by_user" : false,
"params" : {
"key" : ""
},
@@ -2566,7 +2571,8 @@ Any modifications made to this file will be overwritten.
actions
-
api_key_owner
+
api_key_created_by_user (optional)
Boolean Indicates whether the API key that is associated with the rule was created by the user.
+
api_key_owner
String The owner of the API key that is associated with the rule and used to run background tasks.
consumer
String The application or feature that owns the rule. For example,
alerts
,
apm
,
discover
,
infrastructure
,
logs
,
metrics
,
ml
,
monitoring
,
securitySolution
,
siem
,
stackAlerts
, or
uptime
.
created_at
Date The date and time that the rule was created. format: date-time
created_by
String The identifier for the user that created the rule.
diff --git a/x-pack/plugins/alerting/docs/openapi/bundled.json b/x-pack/plugins/alerting/docs/openapi/bundled.json
index becb387e84024..9bee67e2c612b 100644
--- a/x-pack/plugins/alerting/docs/openapi/bundled.json
+++ b/x-pack/plugins/alerting/docs/openapi/bundled.json
@@ -2565,8 +2565,14 @@
"actions": {
"$ref": "#/components/schemas/actions"
},
+ "api_key_created_by_user": {
+ "type": "boolean",
+ "description": "Indicates whether the API key that is associated with the rule was created by the user.",
+ "example": false
+ },
"api_key_owner": {
"type": "string",
+ "description": "The owner of the API key that is associated with the rule and used to run background tasks.\n",
"nullable": true,
"example": "elastic"
},
@@ -3032,7 +3038,8 @@
"warning": null,
"outcome": "succeeded"
},
- "next_run": "2022-12-13T22:34:44.314Z"
+ "next_run": "2022-12-13T22:34:44.314Z",
+ "api_key_created_by_user": false
}
},
"update_rule_request": {
@@ -3148,7 +3155,8 @@
"warning": null,
"outcome": "succeeded"
},
- "next_run": "2023-01-31T23:49:42.432Z"
+ "next_run": "2023-01-31T23:49:42.432Z",
+ "api_key_created_by_user": false
}
},
"create_rule_request": {
@@ -3214,6 +3222,7 @@
}
}
],
+ "api_key_created_by_user": false,
"api_key_owner": "elastic",
"consumer": "alerts",
"created_at": "2022-06-08T17:20:31.632Z",
@@ -3332,7 +3341,8 @@
"warning": null,
"outcome": "succeeded"
},
- "next_run": "2022-12-06T01:45:23.912Z"
+ "next_run": "2022-12-06T01:45:23.912Z",
+ "api_key_created_by_user": false
}
]
}
@@ -3500,4 +3510,4 @@
"apiKeyAuth": []
}
]
-}
+}
\ No newline at end of file
diff --git a/x-pack/plugins/alerting/docs/openapi/bundled.yaml b/x-pack/plugins/alerting/docs/openapi/bundled.yaml
index d2b9eafb97e57..46b8b12e9757c 100644
--- a/x-pack/plugins/alerting/docs/openapi/bundled.yaml
+++ b/x-pack/plugins/alerting/docs/openapi/bundled.yaml
@@ -681,7 +681,7 @@ paths:
summary: Mutes an alert.
operationId: muteAlert
description: |
- You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.
+ You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
@@ -707,7 +707,7 @@ paths:
summary: Unmutes an alert.
operationId: unmuteAlert
description: |
- You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.
+ You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
@@ -1641,8 +1641,14 @@ components:
properties:
actions:
$ref: '#/components/schemas/actions'
+ api_key_created_by_user:
+ type: boolean
+ description: Indicates whether the API key that is associated with the rule was created by the user.
+ example: false
api_key_owner:
type: string
+ description: |
+ The owner of the API key that is associated with the rule and used to run background tasks.
nullable: true
example: elastic
consumer:
@@ -1999,6 +2005,7 @@ components:
warning: null
outcome: succeeded
next_run: '2022-12-13T22:34:44.314Z'
+ api_key_created_by_user: false
update_rule_request:
summary: Update an index threshold rule.
value:
@@ -2100,6 +2107,7 @@ components:
warning: null
outcome: succeeded
next_run: '2023-01-31T23:49:42.432Z'
+ api_key_created_by_user: false
create_rule_request:
summary: Create an index threshold rule.
value:
@@ -2156,6 +2164,7 @@ components:
- Value: {{context.value}}
- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}
- Timestamp: {{context.date}}
+ api_key_created_by_user: false
api_key_owner: elastic
consumer: alerts
created_at: '2022-06-08T17:20:31.632Z'
@@ -2259,6 +2268,7 @@ components:
warning: null
outcome: succeeded
next_run: '2022-12-06T01:45:23.912Z'
+ api_key_created_by_user: false
get_health_response:
summary: Retrieve information about the health of the alerting framework.
value:
diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_response.yaml
index daef9b2e3a39b..73ad19287095d 100644
--- a/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_response.yaml
+++ b/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_response.yaml
@@ -10,6 +10,7 @@ value:
params:
level: info
message: "alert {{alertName}} is active for group {{context.group} :\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}"
+ api_key_created_by_user: false
api_key_owner: elastic
consumer: alerts
created_at: '2022-06-08T17:20:31.632Z'
diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/find_rules_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/find_rules_response.yaml
index d93a03d9d40ab..68deb0bd6e8f8 100644
--- a/x-pack/plugins/alerting/docs/openapi/components/examples/find_rules_response.yaml
+++ b/x-pack/plugins/alerting/docs/openapi/components/examples/find_rules_response.yaml
@@ -58,3 +58,4 @@ value:
warning: null
outcome: succeeded
next_run: '2022-12-06T01:45:23.912Z'
+ api_key_created_by_user: false
diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/get_rule_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/get_rule_response.yaml
index eb63c8aeb82a3..3c387b1a5a40c 100644
--- a/x-pack/plugins/alerting/docs/openapi/components/examples/get_rule_response.yaml
+++ b/x-pack/plugins/alerting/docs/openapi/components/examples/get_rule_response.yaml
@@ -53,4 +53,5 @@ value:
outcome_msg: null
warning: null
outcome: succeeded
- next_run: '2022-12-13T22:34:44.314Z'
\ No newline at end of file
+ next_run: '2022-12-13T22:34:44.314Z'
+ api_key_created_by_user: false
\ No newline at end of file
diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_response.yaml
index a2195d0e15947..6b64214ff5ec9 100644
--- a/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_response.yaml
+++ b/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_response.yaml
@@ -54,4 +54,5 @@ value:
outcome_msg: null
warning: null
outcome: succeeded
- next_run: '2023-01-31T23:49:42.432Z'
\ No newline at end of file
+ next_run: '2023-01-31T23:49:42.432Z'
+ api_key_created_by_user: false
\ No newline at end of file
diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/rule_response_properties.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/rule_response_properties.yaml
index 827e89938f8fd..b8617ed1ec5ec 100644
--- a/x-pack/plugins/alerting/docs/openapi/components/schemas/rule_response_properties.yaml
+++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/rule_response_properties.yaml
@@ -22,8 +22,14 @@ required:
properties:
actions:
$ref: 'actions.yaml'
+ api_key_created_by_user:
+ type: boolean
+ description: Indicates whether the API key that is associated with the rule was created by the user.
+ example: false
api_key_owner:
type: string
+ description: >
+ The owner of the API key that is associated with the rule and used to run background tasks.
nullable: true
example: elastic
consumer: