Skip to content

Commit

Permalink
[OAS] Add closeIncident subaction for run connector API (#175267)
Browse files Browse the repository at this point in the history
  • Loading branch information
lcawl authored Jan 23, 2024
1 parent 775199e commit 67db684
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 0 deletions.
62 changes: 62 additions & 0 deletions x-pack/plugins/actions/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -5263,6 +5263,65 @@
}
}
},
"run_connector_subaction_closeincident": {
"title": "The closeIncident subaction",
"type": "object",
"required": [
"subAction",
"subActionParams"
],
"description": "The `closeIncident` subaction for ServiceNow ITSM connectors.",
"properties": {
"subAction": {
"type": "string",
"description": "The action to test.",
"enum": [
"closeIncident"
]
},
"subActionParams": {
"type": "object",
"required": [
"incident"
],
"properties": {
"incident": {
"type": "object",
"anyOf": [
{
"required": [
"correlation_id"
]
},
{
"required": [
"externalId"
]
}
],
"properties": {
"correlation_id": {
"type": [
"null",
"string"
],
"description": "An identifier that is assigned to the incident when it is created by the connector. NOTE: If you use the default value and the rule generates multiple alerts that use the same alert IDs, the latest open incident for this correlation ID is closed unless you specify the external ID.\n",
"maxLength": 100,
"default": "{{rule.id}}:{{alert.id}}"
},
"externalId": {
"type": [
"null",
"string"
],
"description": "The unique identifier (`incidentId`) for the incident in ServiceNow."
}
}
}
}
}
}
},
"run_connector_subaction_createalert": {
"title": "The createAlert subaction",
"type": "object",
Expand Down Expand Up @@ -5834,6 +5893,9 @@
{
"$ref": "#/components/schemas/run_connector_subaction_closealert"
},
{
"$ref": "#/components/schemas/run_connector_subaction_closeincident"
},
{
"$ref": "#/components/schemas/run_connector_subaction_createalert"
},
Expand Down
40 changes: 40 additions & 0 deletions x-pack/plugins/actions/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3664,6 +3664,45 @@ components:
user:
type: string
description: The display name for the owner.
run_connector_subaction_closeincident:
title: The closeIncident subaction
type: object
required:
- subAction
- subActionParams
description: The `closeIncident` subaction for ServiceNow ITSM connectors.
properties:
subAction:
type: string
description: The action to test.
enum:
- closeIncident
subActionParams:
type: object
required:
- incident
properties:
incident:
type: object
anyOf:
- required:
- correlation_id
- required:
- externalId
properties:
correlation_id:
type:
- 'null'
- string
description: |
An identifier that is assigned to the incident when it is created by the connector. NOTE: If you use the default value and the rule generates multiple alerts that use the same alert IDs, the latest open incident for this correlation ID is closed unless you specify the external ID.
maxLength: 100
default: '{{rule.id}}:{{alert.id}}'
externalId:
type:
- 'null'
- string
description: The unique identifier (`incidentId`) for the incident in ServiceNow.
run_connector_subaction_createalert:
title: The createAlert subaction
type: object
Expand Down Expand Up @@ -4062,6 +4101,7 @@ components:
oneOf:
- $ref: '#/components/schemas/run_connector_subaction_addevent'
- $ref: '#/components/schemas/run_connector_subaction_closealert'
- $ref: '#/components/schemas/run_connector_subaction_closeincident'
- $ref: '#/components/schemas/run_connector_subaction_createalert'
- $ref: '#/components/schemas/run_connector_subaction_fieldsbyissuetype'
- $ref: '#/components/schemas/run_connector_subaction_getchoices'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ properties:
oneOf:
- $ref: 'run_connector_subaction_addevent.yaml'
- $ref: 'run_connector_subaction_closealert.yaml'
- $ref: 'run_connector_subaction_closeincident.yaml'
- $ref: 'run_connector_subaction_createalert.yaml'
- $ref: 'run_connector_subaction_fieldsbyissuetype.yaml'
- $ref: 'run_connector_subaction_getchoices.yaml'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
title: The closeIncident subaction
type: object
required:
- subAction
- subActionParams
description: The `closeIncident` subaction for ServiceNow ITSM connectors.
properties:
subAction:
type: string
description: The action to test.
enum:
- closeIncident
subActionParams:
type: object
required:
- incident
properties:
incident:
type: object
anyOf:
- required: [correlation_id]
- required: [externalId]
properties:
correlation_id:
type: ['null', string]
description: >
An identifier that is assigned to the incident when it is created by the connector.
NOTE: If you use the default value and the rule generates multiple alerts that use the same alert IDs, the latest open incident for this correlation ID is closed unless you specify the external ID.
maxLength: 100
default: '{{rule.id}}:{{alert.id}}'
externalId:
type: ['null', string]
description: The unique identifier (`incidentId`) for the incident in ServiceNow.

0 comments on commit 67db684

Please sign in to comment.