Skip to content

Commit

Permalink
[DOCS] Add api_key_created_by_user to alerting API specification (#15…
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored May 17, 2023
1 parent 3743e22 commit 60513d3
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 9 deletions.
8 changes: 7 additions & 1 deletion docs/api-generated/rules/rule-apis-passthru.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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" : ""
},
Expand Down Expand Up @@ -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" : ""
},
Expand Down Expand Up @@ -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" : ""
},
Expand Down Expand Up @@ -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" : ""
},
Expand Down Expand Up @@ -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" : ""
},
Expand Down Expand Up @@ -2566,7 +2571,8 @@ Any modifications made to this file will be overwritten.
<div class='model-description'></div>
<div class="field-items">
<div class="param">actions </div><div class="param-desc"><span class="param-type"><a href="#actions_inner">array[actions_inner]</a></span> </div>
<div class="param">api_key_owner </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> </div>
<div class="param">api_key_created_by_user (optional)</div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether the API key that is associated with the rule was created by the user. </div>
<div class="param">api_key_owner </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The owner of the API key that is associated with the rule and used to run background tasks. </div>
<div class="param">consumer </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The application or feature that owns the rule. For example, <code>alerts</code>, <code>apm</code>, <code>discover</code>, <code>infrastructure</code>, <code>logs</code>, <code>metrics</code>, <code>ml</code>, <code>monitoring</code>, <code>securitySolution</code>, <code>siem</code>, <code>stackAlerts</code>, or <code>uptime</code>. </div>
<div class="param">created_at </div><div class="param-desc"><span class="param-type"><a href="#DateTime">Date</a></span> The date and time that the rule was created. format: date-time</div>
<div class="param">created_by </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The identifier for the user that created the rule. </div>
Expand Down
18 changes: 14 additions & 4 deletions x-pack/plugins/alerting/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -3214,6 +3222,7 @@
}
}
],
"api_key_created_by_user": false,
"api_key_owner": "elastic",
"consumer": "alerts",
"created_at": "2022-06-08T17:20:31.632Z",
Expand Down Expand Up @@ -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
}
]
}
Expand Down Expand Up @@ -3500,4 +3510,4 @@
"apiKeyAuth": []
}
]
}
}
14 changes: 12 additions & 2 deletions x-pack/plugins/alerting/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ value:
warning: null
outcome: succeeded
next_run: '2022-12-06T01:45:23.912Z'
api_key_created_by_user: false
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ value:
outcome_msg: null
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
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ value:
outcome_msg: null
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
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 60513d3

Please sign in to comment.