[OAS] Add details for running Slack connector actions (#169712)

This commit is contained in:
Lisa Cawley 2024-02-13 15:00:15 -08:00 committed by GitHub
parent a45a4340a6
commit 1b65592c0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 669 additions and 5 deletions

View file

@ -587,6 +587,46 @@ the security incident. The IPs are added as observables to the security incident
(Required, string) The message to log.
=====
.Slack connectors
[%collapsible%open]
=====
`message`::
(Required^*^, string) The Slack message text, which cannot contain Markdown, images, or other advanced formatting.
It is applicable only when the connector type is `.slack`.
`subAction`::
(Required^*^, string) The action to test.
It is applicable only when the connector type is `.slack_api`.
Valid values include: `postMessage`, `validChannelId`.
======
`subActionParams`::
(Required, object) The set of configuration properties, which vary depending
on the `subAction` value.
+
.Properties when `subAction` is `postMessage`
[%collapsible%open]
=======
`channelIds`:::
(Optional, array of strings) The Slack channel identifier, which must be one of the allowed channels in the connector configuration.
`channels`:::
(Optional, array of strings)
The name of a channel that your Slack app has access to. deprecated:[8.12.0]
`text`:::
(Optional, string) The Slack message text, which cannot contain Markdown, images, or other advanced formatting.
=======
+
.Properties when `subAction` is `validChannelId`
[%collapsible%open]
=======
`channelId`:::
(Required, string) The Slack channel identifier. For example, `C123ABC456`.
=======
======
=====
.{swimlane} connectors
[%collapsible%open]
=====

View file

@ -317,6 +317,9 @@
"runServiceNowITOMConnectorRequest": {
"$ref": "#/components/examples/run_servicenow_itom_connector_request"
},
"runSlackConnectorRequest": {
"$ref": "#/components/examples/run_slack_api_connector_request"
},
"runSwimlaneConnectorRequest": {
"$ref": "#/components/examples/run_swimlane_connector_request"
}
@ -388,6 +391,9 @@
"runServiceNowITOMConnectorResponse": {
"$ref": "#/components/examples/run_servicenow_itom_connector_response"
},
"runSlackConnectorResponse": {
"$ref": "#/components/examples/run_slack_api_connector_response"
},
"runSwimlaneConnectorResponse": {
"$ref": "#/components/examples/run_swimlane_connector_response"
}
@ -976,6 +982,9 @@
"runServiceNowITOMConnectorRequest": {
"$ref": "#/components/examples/run_servicenow_itom_connector_request"
},
"runSlackConnectorRequest": {
"$ref": "#/components/examples/run_slack_api_connector_request"
},
"runSwimlaneConnectorRequest": {
"$ref": "#/components/examples/run_swimlane_connector_request"
}
@ -1015,6 +1024,12 @@
}
]
},
"message": {
"type": "string"
},
"service_message": {
"type": "string"
},
"status": {
"type": "string",
"description": "The status of the action.",
@ -1038,6 +1053,9 @@
"runServiceNowITOMConnectorResponse": {
"$ref": "#/components/examples/run_servicenow_itom_connector_response"
},
"runSlackConnectorResponse": {
"$ref": "#/components/examples/run_slack_api_connector_response"
},
"runSwimlaneConnectorResponse": {
"$ref": "#/components/examples/run_swimlane_connector_response"
}
@ -1951,7 +1969,7 @@
},
"create_connector_request_slack_api": {
"title": "Create Slack connector request",
"description": "The Slack connector uses Slack Incoming Webhooks.",
"description": "The Slack connector uses an API method to send Slack messages.",
"type": "object",
"required": [
"connector_type_id",
@ -1959,6 +1977,9 @@
"secrets"
],
"properties": {
"config": {
"$ref": "#/components/schemas/config_properties_slack_api"
},
"connector_type_id": {
"type": "string",
"description": "The type of connector.",
@ -2866,6 +2887,38 @@
}
}
},
"config_properties_slack_api": {
"title": "Connector request properties for a Slack connector",
"description": "Defines properties for connectors when type is `.slack_api`.",
"type": "object",
"properties": {
"allowedChannels": {
"type": "array",
"description": "A list of valid Slack channels.",
"items": {
"type": "object",
"required": [
"id",
"name"
],
"maxItems": 25,
"properties": {
"id": {
"type": "string",
"description": "The Slack channel ID.",
"example": "C123ABC456",
"minLength": 1
},
"name": {
"type": "string",
"description": "The Slack channel name.",
"minLength": 1
}
}
}
}
}
},
"secrets_properties_slack_api": {
"title": "Connector secrets properties for a Web API Slack connector",
"description": "Defines secrets for connectors when type is `.slack`.",
@ -4101,6 +4154,9 @@
"name"
],
"properties": {
"config": {
"$ref": "#/components/schemas/config_properties_slack_api"
},
"connector_type_id": {
"type": "string",
"description": "The type of connector.",
@ -4834,6 +4890,9 @@
"secrets"
],
"properties": {
"config": {
"$ref": "#/components/schemas/config_properties_slack_api"
},
"name": {
"type": "string",
"description": "The display name for the connector."
@ -5182,6 +5241,20 @@
}
}
},
"run_connector_params_message_slack": {
"title": "Slack connector parameters",
"description": "Test an action that sends a message to Slack. It is applicable only when the connector type is `.slack`.\n",
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "string",
"description": "The Slack message text, which cannot contain Markdown, images, or other advanced formatting."
}
}
},
"run_connector_params_trigger_pagerduty": {
"title": "PagerDuty connector parameters",
"description": "Test an action that triggers a PagerDuty alert.",
@ -5990,6 +6063,83 @@
}
}
},
"run_connector_subaction_postmessage": {
"title": "The postMessage subaction",
"type": "object",
"description": "Test an action that sends a message to Slack. It is applicable only when the connector type is `.slack_api`.\n",
"required": [
"subAction",
"subActionParams"
],
"properties": {
"subAction": {
"type": "string",
"description": "The action to test.",
"enum": [
"postMessage"
]
},
"subActionParams": {
"type": "object",
"description": "The set of configuration properties for the action.",
"properties": {
"channelIds": {
"type": "array",
"maxItems": 1,
"description": "The Slack channel identifier, which must be one of the `allowedChannels` in the connector configuration.\n",
"items": {
"type": "string"
}
},
"channels": {
"type": "array",
"deprecated": true,
"description": "The name of a channel that your Slack app has access to.\n",
"maxItems": 1,
"items": {
"type": "string"
}
},
"text": {
"type": "string",
"description": "The Slack message text, which cannot contain Markdown, images, or other advanced formatting.",
"minLength": 1
}
}
}
}
},
"run_connector_subaction_validchannelid": {
"title": "The validChannelId subaction",
"type": "object",
"description": "Retrieves information about a valid Slack channel identifier. It is applicable only when the connector type is `.slack_api`.\n",
"required": [
"subAction",
"subActionParams"
],
"properties": {
"subAction": {
"type": "string",
"description": "The action to test.",
"enum": [
"validChannelId"
]
},
"subActionParams": {
"type": "object",
"required": [
"channelId"
],
"properties": {
"channelId": {
"type": "string",
"description": "The Slack channel identifier.",
"example": "C123ABC456"
}
}
}
}
},
"run_connector_request": {
"title": "Run connector request body properties",
"description": "The properties vary depending on the connector type.",
@ -6012,6 +6162,9 @@
{
"$ref": "#/components/schemas/run_connector_params_message_serverlog"
},
{
"$ref": "#/components/schemas/run_connector_params_message_slack"
},
{
"$ref": "#/components/schemas/run_connector_params_trigger_pagerduty"
},
@ -6052,8 +6205,14 @@
{
"$ref": "#/components/schemas/run_connector_subaction_issuetypes"
},
{
"$ref": "#/components/schemas/run_connector_subaction_postmessage"
},
{
"$ref": "#/components/schemas/run_connector_subaction_pushtoservice"
},
{
"$ref": "#/components/schemas/run_connector_subaction_validchannelid"
}
],
"discriminator": {
@ -6422,6 +6581,20 @@
}
}
},
"run_slack_api_connector_request": {
"summary": "Run a Slack connector that uses the web API method to post a message on a channel.",
"value": {
"params": {
"subAction": "postMessage",
"subActionParams": {
"channelIds": [
"C123ABC456"
],
"text": "A test message."
}
}
}
},
"run_swimlane_connector_request": {
"summary": "Run a Swimlane connector to create an incident.",
"value": {
@ -6636,6 +6809,55 @@
"status": "ok"
}
},
"run_slack_api_connector_response": {
"summary": "Response from posting a message with a Slack connector.",
"value": {
"status": "ok",
"data": {
"ok": true,
"channel": "C123ABC456",
"ts": "1234567890.123456",
"message": {
"bot_id": "B12BCDEFGHI",
"type": "message",
"text": "A test message",
"user": "U12A345BC6D",
"ts": "1234567890.123456",
"app_id": "A01BC2D34EF",
"blocks": [
{
"type": "rich_text",
"block_id": "/NXe",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "A test message."
}
]
}
]
}
],
"team": "T01ABCDE2F",
"bot_profile": {
"id": "B12BCDEFGHI",
"app_id": "A01BC2D34EF",
"name": "test",
"icons": {
"image_36": "https://a.slack-edge.com/80588/img/plugins/app/bot_36.png"
},
"deleted": false,
"updated": 1672169705,
"team_id": "T01ABCDE2F"
}
}
},
"connector_id": ".slack_api"
}
},
"run_swimlane_connector_response": {
"summary": "Response from creating a Swimlane incident.",
"value": {

View file

@ -194,6 +194,8 @@ paths:
$ref: '#/components/examples/run_server_log_connector_request'
runServiceNowITOMConnectorRequest:
$ref: '#/components/examples/run_servicenow_itom_connector_request'
runSlackConnectorRequest:
$ref: '#/components/examples/run_slack_api_connector_request'
runSwimlaneConnectorRequest:
$ref: '#/components/examples/run_swimlane_connector_request'
responses:
@ -240,6 +242,8 @@ paths:
$ref: '#/components/examples/run_server_log_connector_response'
runServiceNowITOMConnectorResponse:
$ref: '#/components/examples/run_servicenow_itom_connector_response'
runSlackConnectorResponse:
$ref: '#/components/examples/run_slack_api_connector_response'
runSwimlaneConnectorResponse:
$ref: '#/components/examples/run_swimlane_connector_response'
'401':
@ -611,6 +615,8 @@ paths:
$ref: '#/components/examples/run_server_log_connector_request'
runServiceNowITOMConnectorRequest:
$ref: '#/components/examples/run_servicenow_itom_connector_request'
runSlackConnectorRequest:
$ref: '#/components/examples/run_slack_api_connector_request'
runSwimlaneConnectorRequest:
$ref: '#/components/examples/run_swimlane_connector_request'
responses:
@ -636,6 +642,10 @@ paths:
description: An array of information returned from the action.
items:
type: object
message:
type: string
service_message:
type: string
status:
type: string
description: The status of the action.
@ -651,6 +661,8 @@ paths:
$ref: '#/components/examples/run_server_log_connector_response'
runServiceNowITOMConnectorResponse:
$ref: '#/components/examples/run_servicenow_itom_connector_response'
runSlackConnectorResponse:
$ref: '#/components/examples/run_slack_api_connector_response'
runSwimlaneConnectorResponse:
$ref: '#/components/examples/run_swimlane_connector_response'
'401':
@ -1283,13 +1295,15 @@ components:
$ref: '#/components/schemas/secrets_properties_servicenow'
create_connector_request_slack_api:
title: Create Slack connector request
description: The Slack connector uses Slack Incoming Webhooks.
description: The Slack connector uses an API method to send Slack messages.
type: object
required:
- connector_type_id
- name
- secrets
properties:
config:
$ref: '#/components/schemas/config_properties_slack_api'
connector_type_id:
type: string
description: The type of connector.
@ -1986,6 +2000,30 @@ components:
description: |
The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.
type: string
config_properties_slack_api:
title: Connector request properties for a Slack connector
description: Defines properties for connectors when type is `.slack_api`.
type: object
properties:
allowedChannels:
type: array
description: A list of valid Slack channels.
items:
type: object
required:
- id
- name
maxItems: 25
properties:
id:
type: string
description: The Slack channel ID.
example: C123ABC456
minLength: 1
name:
type: string
description: The Slack channel name.
minLength: 1
secrets_properties_slack_api:
title: Connector secrets properties for a Web API Slack connector
description: Defines secrets for connectors when type is `.slack`.
@ -2883,6 +2921,8 @@ components:
- is_preconfigured
- name
properties:
config:
$ref: '#/components/schemas/config_properties_slack_api'
connector_type_id:
type: string
description: The type of connector.
@ -3388,6 +3428,8 @@ components:
- name
- secrets
properties:
config:
$ref: '#/components/schemas/config_properties_slack_api'
name:
type: string
description: The display name for the connector.
@ -3614,6 +3656,17 @@ components:
message:
type: string
description: The message for server log connectors.
run_connector_params_message_slack:
title: Slack connector parameters
description: |
Test an action that sends a message to Slack. It is applicable only when the connector type is `.slack`.
type: object
required:
- message
properties:
message:
type: string
description: The Slack message text, which cannot contain Markdown, images, or other advanced formatting.
run_connector_params_trigger_pagerduty:
title: PagerDuty connector parameters
description: Test an action that triggers a PagerDuty alert.
@ -4190,6 +4243,66 @@ components:
urgency:
type: string
description: The urgency of the incident for ServiceNow ITSM connectors.
run_connector_subaction_postmessage:
title: The postMessage subaction
type: object
description: |
Test an action that sends a message to Slack. It is applicable only when the connector type is `.slack_api`.
required:
- subAction
- subActionParams
properties:
subAction:
type: string
description: The action to test.
enum:
- postMessage
subActionParams:
type: object
description: The set of configuration properties for the action.
properties:
channelIds:
type: array
maxItems: 1
description: |
The Slack channel identifier, which must be one of the `allowedChannels` in the connector configuration.
items:
type: string
channels:
type: array
deprecated: true
description: |
The name of a channel that your Slack app has access to.
maxItems: 1
items:
type: string
text:
type: string
description: The Slack message text, which cannot contain Markdown, images, or other advanced formatting.
minLength: 1
run_connector_subaction_validchannelid:
title: The validChannelId subaction
type: object
description: |
Retrieves information about a valid Slack channel identifier. It is applicable only when the connector type is `.slack_api`.
required:
- subAction
- subActionParams
properties:
subAction:
type: string
description: The action to test.
enum:
- validChannelId
subActionParams:
type: object
required:
- channelId
properties:
channelId:
type: string
description: The Slack channel identifier.
example: C123ABC456
run_connector_request:
title: Run connector request body properties
description: The properties vary depending on the connector type.
@ -4203,6 +4316,7 @@ components:
- $ref: '#/components/schemas/run_connector_params_documents'
- $ref: '#/components/schemas/run_connector_params_message_email'
- $ref: '#/components/schemas/run_connector_params_message_serverlog'
- $ref: '#/components/schemas/run_connector_params_message_slack'
- $ref: '#/components/schemas/run_connector_params_trigger_pagerduty'
- title: Subaction parameters
description: Test an action that involves a subaction.
@ -4218,7 +4332,9 @@ components:
- $ref: '#/components/schemas/run_connector_subaction_issue'
- $ref: '#/components/schemas/run_connector_subaction_issues'
- $ref: '#/components/schemas/run_connector_subaction_issuetypes'
- $ref: '#/components/schemas/run_connector_subaction_postmessage'
- $ref: '#/components/schemas/run_connector_subaction_pushtoservice'
- $ref: '#/components/schemas/run_connector_subaction_validchannelid'
discriminator:
propertyName: subAction
mapping:
@ -4493,6 +4609,15 @@ components:
fields:
- severity
- urgency
run_slack_api_connector_request:
summary: Run a Slack connector that uses the web API method to post a message on a channel.
value:
params:
subAction: postMessage
subActionParams:
channelIds:
- C123ABC456
text: A test message.
run_swimlane_connector_request:
summary: Run a Swimlane connector to create an incident.
value:
@ -4638,6 +4763,40 @@ components:
label: 3 - Low
value: 3
status: ok
run_slack_api_connector_response:
summary: Response from posting a message with a Slack connector.
value:
status: ok
data:
ok: true
channel: C123ABC456
ts: '1234567890.123456'
message:
bot_id: B12BCDEFGHI
type: message
text: A test message
user: U12A345BC6D
ts: '1234567890.123456'
app_id: A01BC2D34EF
blocks:
- type: rich_text
block_id: /NXe
elements:
- type: rich_text_section
elements:
- type: text
text: A test message.
team: T01ABCDE2F
bot_profile:
id: B12BCDEFGHI
app_id: A01BC2D34EF
name: test
icons:
image_36: https://a.slack-edge.com/80588/img/plugins/app/bot_36.png
deleted: false
updated: 1672169705
team_id: T01ABCDE2F
connector_id: .slack_api
run_swimlane_connector_response:
summary: Response from creating a Swimlane incident.
value:

View file

@ -937,7 +937,7 @@
},
"create_connector_request_slack_api": {
"title": "Create Slack connector request",
"description": "The Slack connector uses Slack Incoming Webhooks.",
"description": "The Slack connector uses an API method to send Slack messages.",
"type": "object",
"required": [
"connector_type_id",
@ -945,6 +945,9 @@
"secrets"
],
"properties": {
"config": {
"$ref": "#/components/schemas/config_properties_slack_api"
},
"connector_type_id": {
"type": "string",
"description": "The type of connector.",
@ -1852,6 +1855,38 @@
}
}
},
"config_properties_slack_api": {
"title": "Connector request properties for a Slack connector",
"description": "Defines properties for connectors when type is `.slack_api`.",
"type": "object",
"properties": {
"allowedChannels": {
"type": "array",
"description": "A list of valid Slack channels.",
"items": {
"type": "object",
"required": [
"id",
"name"
],
"maxItems": 25,
"properties": {
"id": {
"type": "string",
"description": "The Slack channel ID.",
"example": "C123ABC456",
"minLength": 1
},
"name": {
"type": "string",
"description": "The Slack channel name.",
"minLength": 1
}
}
}
}
}
},
"secrets_properties_slack_api": {
"title": "Connector secrets properties for a Web API Slack connector",
"description": "Defines secrets for connectors when type is `.slack`.",
@ -3087,6 +3122,9 @@
"name"
],
"properties": {
"config": {
"$ref": "#/components/schemas/config_properties_slack_api"
},
"connector_type_id": {
"type": "string",
"description": "The type of connector.",
@ -3820,6 +3858,9 @@
"secrets"
],
"properties": {
"config": {
"$ref": "#/components/schemas/config_properties_slack_api"
},
"name": {
"type": "string",
"description": "The display name for the connector."

View file

@ -642,13 +642,15 @@ components:
$ref: '#/components/schemas/secrets_properties_servicenow'
create_connector_request_slack_api:
title: Create Slack connector request
description: The Slack connector uses Slack Incoming Webhooks.
description: The Slack connector uses an API method to send Slack messages.
type: object
required:
- connector_type_id
- name
- secrets
properties:
config:
$ref: '#/components/schemas/config_properties_slack_api'
connector_type_id:
type: string
description: The type of connector.
@ -1345,6 +1347,30 @@ components:
description: |
The identifier to use for OAuth authentication. This identifier should be the user field you selected when you created an OAuth JWT API endpoint for external clients in your ServiceNow instance. For example, if the selected user field is `Email`, the user identifier should be the user's email address. This property is required when `isOAuth` is `true`.
type: string
config_properties_slack_api:
title: Connector request properties for a Slack connector
description: Defines properties for connectors when type is `.slack_api`.
type: object
properties:
allowedChannels:
type: array
description: A list of valid Slack channels.
items:
type: object
required:
- id
- name
maxItems: 25
properties:
id:
type: string
description: The Slack channel ID.
example: C123ABC456
minLength: 1
name:
type: string
description: The Slack channel name.
minLength: 1
secrets_properties_slack_api:
title: Connector secrets properties for a Web API Slack connector
description: Defines secrets for connectors when type is `.slack`.
@ -2242,6 +2268,8 @@ components:
- is_preconfigured
- name
properties:
config:
$ref: '#/components/schemas/config_properties_slack_api'
connector_type_id:
type: string
description: The type of connector.
@ -2747,6 +2775,8 @@ components:
- name
- secrets
properties:
config:
$ref: '#/components/schemas/config_properties_slack_api'
name:
type: string
description: The display name for the connector.

View file

@ -0,0 +1,8 @@
summary: Run a Slack connector that uses the web API method to post a message on a channel.
value:
params:
subAction: postMessage
subActionParams:
channelIds:
- C123ABC456
text: A test message.

View file

@ -0,0 +1,48 @@
summary: Response from posting a message with a Slack connector.
value:
{
"status": "ok",
"data": {
"ok": true,
"channel": "C123ABC456",
"ts": "1234567890.123456",
"message": {
"bot_id": "B12BCDEFGHI",
"type": "message",
"text": "A test message",
"user": "U12A345BC6D",
"ts": "1234567890.123456",
"app_id": "A01BC2D34EF",
"blocks": [
{
"type": "rich_text",
"block_id": "/NXe",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "text",
"text": "A test message."
}
]
}
]
}
],
"team": "T01ABCDE2F",
"bot_profile": {
"id": "B12BCDEFGHI",
"app_id": "A01BC2D34EF",
"name": "test",
"icons": {
"image_36": "https://a.slack-edge.com/80588/img/plugins/app/bot_36.png"
},
"deleted": false,
"updated": 1672169705,
"team_id": "T01ABCDE2F"
}
}
},
"connector_id": ".slack_api"
}

View file

@ -0,0 +1,23 @@
title: Connector request properties for a Slack connector
description: Defines properties for connectors when type is `.slack_api`.
type: object
properties:
allowedChannels:
type: array
description: A list of valid Slack channels.
items:
type: object
required:
- id
- name
maxItems: 25
properties:
id:
type: string
description: The Slack channel ID.
example: C123ABC456
minLength: 1
name:
type: string
description: The Slack channel name.
minLength: 1

View file

@ -7,6 +7,8 @@ required:
- is_preconfigured
- name
properties:
config:
$ref: 'config_properties_slack_api.yaml'
connector_type_id:
type: string
description: The type of connector.

View file

@ -1,11 +1,13 @@
title: Create Slack connector request
description: The Slack connector uses Slack Incoming Webhooks.
description: The Slack connector uses an API method to send Slack messages.
type: object
required:
- connector_type_id
- name
- secrets
properties:
config:
$ref: 'config_properties_slack_api.yaml'
connector_type_id:
type: string
description: The type of connector.

View file

@ -0,0 +1,11 @@
title: Slack connector parameters
description: >
Test an action that sends a message to Slack.
It is applicable only when the connector type is `.slack`.
type: object
required:
- message
properties:
message:
type: string
description: The Slack message text, which cannot contain Markdown, images, or other advanced formatting.

View file

@ -10,6 +10,7 @@ properties:
- $ref: 'run_connector_params_documents.yaml'
- $ref: 'run_connector_params_message_email.yaml'
- $ref: 'run_connector_params_message_serverlog.yaml'
- $ref: 'run_connector_params_message_slack.yaml'
- $ref: 'run_connector_params_trigger_pagerduty.yaml'
- title: Subaction parameters
description: Test an action that involves a subaction.
@ -25,7 +26,9 @@ properties:
- $ref: 'run_connector_subaction_issue.yaml'
- $ref: 'run_connector_subaction_issues.yaml'
- $ref: 'run_connector_subaction_issuetypes.yaml'
- $ref: 'run_connector_subaction_postmessage.yaml'
- $ref: 'run_connector_subaction_pushtoservice.yaml'
- $ref: 'run_connector_subaction_validchannelid.yaml'
discriminator:
propertyName: subAction
mapping:

View file

@ -0,0 +1,38 @@
title: The postMessage subaction
type: object
description: >
Test an action that sends a message to Slack.
It is applicable only when the connector type is `.slack_api`.
required:
- subAction
- subActionParams
properties:
subAction:
type: string
description: The action to test.
enum:
- postMessage
subActionParams:
type: object
description: The set of configuration properties for the action.
properties:
channelIds:
type: array
maxItems: 1
description: >
The Slack channel identifier, which must be one of the `allowedChannels` in the connector configuration.
items:
type: string
channels:
type: array
deprecated: true
description: >
The name of a channel that your Slack app has access to.
maxItems: 1
items:
type: string
text:
type: string
description: The Slack message text, which cannot contain Markdown, images, or other advanced formatting.
minLength: 1

View file

@ -0,0 +1,23 @@
title: The validChannelId subaction
type: object
description: >
Retrieves information about a valid Slack channel identifier.
It is applicable only when the connector type is `.slack_api`.
required:
- subAction
- subActionParams
properties:
subAction:
type: string
description: The action to test.
enum:
- validChannelId
subActionParams:
type: object
required:
- channelId
properties:
channelId:
type: string
description: The Slack channel identifier.
example: C123ABC456

View file

@ -4,6 +4,8 @@ required:
- name
- secrets
properties:
config:
$ref: 'config_properties_slack_api.yaml'
name:
type: string
description: The display name for the connector.

View file

@ -31,6 +31,8 @@ post:
$ref: '../components/examples/run_server_log_connector_request.yaml'
runServiceNowITOMConnectorRequest:
$ref: '../components/examples/run_servicenow_itom_connector_request.yaml'
runSlackConnectorRequest:
$ref: '../components/examples/run_slack_api_connector_request.yaml'
runSwimlaneConnectorRequest:
$ref: '../components/examples/run_swimlane_connector_request.yaml'
responses:
@ -77,6 +79,8 @@ post:
$ref: '../components/examples/run_server_log_connector_response.yaml'
runServiceNowITOMConnectorResponse:
$ref: '../components/examples/run_servicenow_itom_connector_response.yaml'
runSlackConnectorResponse:
$ref: '../components/examples/run_slack_api_connector_response.yaml'
runSwimlaneConnectorResponse:
$ref: '../components/examples/run_swimlane_connector_response.yaml'
'401':

View file

@ -26,6 +26,8 @@ post:
$ref: '../components/examples/run_server_log_connector_request.yaml'
runServiceNowITOMConnectorRequest:
$ref: '../components/examples/run_servicenow_itom_connector_request.yaml'
runSlackConnectorRequest:
$ref: '../components/examples/run_slack_api_connector_request.yaml'
runSwimlaneConnectorRequest:
$ref: '../components/examples/run_swimlane_connector_request.yaml'
responses:
@ -51,6 +53,10 @@ post:
description: An array of information returned from the action.
items:
type: object
message:
type: string
service_message:
type: string
status:
type: string
description: The status of the action.
@ -66,6 +72,8 @@ post:
$ref: '../components/examples/run_server_log_connector_response.yaml'
runServiceNowITOMConnectorResponse:
$ref: '../components/examples/run_servicenow_itom_connector_response.yaml'
runSlackConnectorResponse:
$ref: '../components/examples/run_slack_api_connector_response.yaml'
runSwimlaneConnectorResponse:
$ref: '../components/examples/run_swimlane_connector_response.yaml'
'401':