봇에 대한 게시 요청을 시작하는 데 사용됩니다. 봇 게시 API를 호출하기 전에 봇에 대해 하나 이상의 채널이 활성화되어 있어야 합니다.
이 API를 사용하려면 오직 봇 관리자 콘솔에서 생성된 애플리케이션에서 만들어진 JWT가 필요합니다. 이 API를 사용하려면 앱은 봇 게시 아래에 있는 게시의 관리자 API 범위가 필요합니다.
POST https://{{host}}/api/public/bot/{{BotID}}/publish
봇에 대한 게시 요청을 시작하는 데 사용됩니다. 봇 게시 API를 호출하기 전에 봇에 대해 하나 이상의 채널이 활성화되어 있어야 합니다.
이 API를 사용하려면 오직 봇 관리자 콘솔에서 생성된 애플리케이션에서 만들어진 JWT가 필요합니다. 이 API를 사용하려면 앱은 봇 게시 아래에 있는 게시의 관리자 API 범위가 필요합니다.
POST https://{{host}}/api/public/bot/{{BotID}}/publish
| 매개 변수 | 설명 |
|---|---|
| host | 환경 URL(예: https://bots.kore.ai) |
| BotID | 봇 ID 또는 스트림 ID. 봇의 일반 설정 페이지에서 이를 액세스할 수 있습니다. |
| 매개 변수 | 설명 |
|---|---|
| versionComment | 게시 요청에 대한 댓글 |
다음 구문을 포함한 헤더에 JWT를 포함한 API를 호출합니다. auth: {{JWT}}
application/json
curl -X POST \
https://{{host}}/api/public/bot/{{BotID}}/publish \
-H 'auth: YOUR_JWT_ACCESS_TOKEN' \
-H 'content-type: application/json' \
-d '{
"versionComment" : "new update"
}'
[
{
"resourceType": "dialog",
"resourceId": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360",
"sbResourceId": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360",
"status": "SUCCESS",
"result": {
"visibility": {
"namespace": "enterprise",
"namespaceIds": [
"o-23b63f37-89e7-52e9-bc5d-8012cbda0d4a"
]
},
"contextLifeTime": {
"options": "close"
},
"version": "1.0",
"nodes": [
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false
},
"nodeId": "intent0",
"type": "intent",
"transitions": [
{
"default": "entity1",
"metadata": {
"color": "#299d8e",
"connId": "dummy0"
}
}
],
"metadata": {
"left": 19,
"top": 142
},
"componentId": "dc-4935f617-c82d-5c39-96d6-4df11f48bd99"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"precedence": "entityOverIntent"
},
"nodeId": "entity1",
"type": "entity",
"transitions": [
{
"metadata": {
"connId": "dummy1",
"color": "#299d8e"
},
"default": "entity2"
}
],
"metadata": {
"left": 9,
"top": 312
},
"componentId": "dc-a62d7d10-3ed2-5fb8-afc1-1d75b12e0253"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"precedence": "entityOverIntent"
},
"nodeId": "entity2",
"type": "entity",
"transitions": [
{
"metadata": {
"connId": "dummy6",
"color": "#299d8e"
},
"then": "message3",
"if": {
"value": "15",
"op": "eq",
"field": "entity2"
}
},
{
"metadata": {
"connId": "dummy7",
"color": "#5ea8d3"
},
"then": "message4",
"if": {
"value": "30",
"op": "eq",
"field": "entity2"
}
},
{
"default": "end",
"metadata": {
"color": "#299d8e",
"connId": "dummy3"
}
}
],
"metadata": {
"left": 24,
"top": 467
},
"componentId": "dc-64fc56de-b475-5071-b839-7615d600bf9b"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false
},
"nodeId": "message3",
"type": "message",
"transitions": [
{
"default": "end",
"metadata": {
"color": "#299d8e",
"connId": "dummy5"
}
}
],
"metadata": {
"left": 318,
"top": 373
},
"componentId": "dc-fb7bb786-8bd8-5f40-a2f9-92642c43ae5c"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false
},
"nodeId": "message4",
"type": "message",
"transitions": [
{
"default": "end",
"metadata": {
"color": "#299d8e",
"connId": "dummy7"
}
}
],
"metadata": {
"top": 627,
"left": 278
},
"componentId": "dc-32f800ce-f457-545c-846f-8e0b64c6c58c"
}
],
"isPublishedVersion": false,
"idp": "none",
"state": "awaitingApproval",
"languages": [],
"compatibility": [],
"adminTaskStatus": "active",
"editable": true,
"isHidden": false,
"approvedLanguages": [],
"approvalRequestedLanguages": [
"en"
],
"localeData": {
"en": {
"name": "mortgage",
"shortDesc": ""
}
},
"isFollowUp": false,
"interruptOptions": {
"type": {
"option": "developer",
"message": ""
},
"priority": "task",
"interruptsEnabled": true,
"holdUxOptions": {
"option": "discardCurrTaskNoNotify",
"message": ""
}
},
"_id": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360",
"refId": "682f9675-07a2-5505-aa75-52fd2c4d1a17",
"followUpIntents": [
{
"refId": "19ad68d9-beb9-5670-ba73-47cf4e8cb1e7",
"transitions": [],
"interruptOptions": {
"type": {
"option": "developer",
"message": ""
},
"interruptsEnabled": true,
"holdUxOptions": {
"option": "discardCurrTask",
"message": [
"Discarded current task to switch to new task"
]
},
"parameterMap": {
"preAssignments": [
{
"Place": "",
"preDefined": true,
"entityId": "dc-325a8628-ef8b-5411-853b-f6b51e6f43aa"
},
{
"Day": "",
"preDefined": true,
"entityId": "dc-33d98b9a-f332-505b-b370-c63b7d22edc9"
},
{
"Time": "",
"preDefined": true,
"entityId": "dc-d24a083d-e8e0-51c0-ba25-216ba5439ee2"
}
],
"postAssignments": [
{
"mortType": "",
"preDefined": true,
"entityId": "dc-29155c38-86f4-5124-b704-e932f55b0623"
},
{
"frType": "",
"preDefined": true,
"entityId": "dc-7af53bfd-eff5-5e0d-84c5-24d22d8fa150"
}
]
}
}
}
],
"botId": "st-b4543a96-49ec-5d95-a120-c6244fc23777",
"createdBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
"createdOn": "2018-12-05T07:45:19.391Z",
"lModBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
"lMod": "2018-12-05T07:53:13.000Z",
"lname": "mortgage",
"__v": 0,
"versionComment": "new update",
"publishedOn": "2018-12-05T07:53:13.237Z",
"name": "mortgage"
}
},
{
"resourceType": "dialog",
"resourceId": "dg-b68f22ad-19b8-5894-857a-04156d391b44",
"sbResourceId": "dg-b68f22ad-19b8-5894-857a-04156d391b44",
"status": "SUCCESS",
"result": {
"visibility": {
"namespace": "enterprise",
"namespaceIds": [
"o-23b63f37-89e7-52e9-bc5d-8012cbda0d4a"
]
},
"contextLifeTime": {
"options": "close"
},
"version": "1.0",
"nodes": [
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"message": [],
"errorMessage": []
},
"nodeId": "intent0",
"type": "intent",
"transitions": [
{
"default": "entity2",
"metadata": {
"color": "#299d8e",
"connId": "dummy0"
}
}
],
"metadata": {
"left": 175,
"top": 64
},
"componentId": "dc-4a22c00f-a5f8-5c2b-819b-db264a4a399b"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"isOptional": false,
"message": [],
"errorMessage": [],
"precedence": "entityOverIntent"
},
"nodeId": "entity1",
"type": "entity",
"transitions": [
{
"default": "entity3",
"metadata": {
"color": "#299d8e",
"connId": "dummy1"
}
}
],
"metadata": {
"left": 235,
"top": 396
},
"componentId": "dc-d2794a44-f565-5de3-8073-5321a773c044"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "node",
"type": {
"option": "developer"
},
"interruptsEnabled": true,
"holdUxOptions": {
"option": "discardCurrTaskNoNotify",
"message": ""
}
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"message": [],
"errorMessage": [],
"isOptional": false,
"precedence": "entityOverIntent"
},
"nodeId": "entity2",
"type": "entity",
"transitions": [
{
"default": "entity1",
"metadata": {
"color": "#299d8e",
"connId": "dummy3"
}
}
],
"metadata": {
"left": 175,
"top": 227
},
"componentId": "dc-9f065640-c0b6-5e86-8de7-d19997adb487"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"message": [],
"errorMessage": [],
"precedence": "entityOverIntent"
},
"nodeId": "entity3",
"type": "entity",
"transitions": [
{
"default": "message4",
"metadata": {
"color": "#299d8e",
"connId": "dummy5"
}
}
],
"metadata": {
"left": 768,
"top": 404
},
"componentId": "dc-8f9c6361-47f7-519b-950d-0b97b5b80ffb"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"message": [],
"errorMessage": []
},
"nodeId": "message4",
"type": "message",
"transitions": [
{
"default": "end",
"metadata": {
"color": "#299d8e",
"connId": "dummy7"
}
}
],
"metadata": {
"left": 786,
"top": 58
},
"componentId": "dc-45d51547-e374-5b90-ba1a-3fe620f9ab89"
}
],
"isPublishedVersion": false,
"idp": "none",
"state": "awaitingApproval",
"languages": [],
"compatibility": [],
"adminTaskStatus": "active",
"editable": true,
"isHidden": false,
"approvedLanguages": [],
"approvalRequestedLanguages": [
"en"
],
"localeData": {
"en": {
"name": "Support",
"shortDesc": "Schedule"
}
},
"isFollowUp": false,
"interruptOptions": {
"priority": "bot"
},
"_id": "dg-b68f22ad-19b8-5894-857a-04156d391b44",
"refId": "19ad68d9-beb9-5670-ba73-47cf4e8cb1e7",
"botId": "st-b4543a96-49ec-5d95-a120-c6244fc23777",
"createdBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
"createdOn": "2018-12-05T07:45:19.402Z",
"lModBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
"lMod": "2018-12-05T07:53:13.000Z",
"lname": "support",
"__v": 0,
"versionComment": "new update",
"publishedOn": "2018-12-05T07:53:13.236Z",
"name": "Support"
}
},
{
"resourceType": "NL",
"status": "SUCCESS",
"result": {
"resourceId": "NL",
"resourceType": "NL",
"modules": [
"nl_model",
"settings"
],
"name": "Natural Language"
}
},
{
"resourceType": "CHANNELS",
"status": "SUCCESS",
"result": {
"resourceId": "CHANNELS",
"resourceType": "CHANNELS",
"modules": [
"alexa"
],
"name": "Channels"
}
},
{
"resourceType": "EXTENSIONS",
"status": "SUCCESS",
"result": {
"resourceId": "EXTENSIONS",
"resourceType": "EXTENSIONS",
"modules": [
"botkit",
"agent_transfer",
"websdk",
"events"
],
"name": "Extensions"
}
},
{
"resourceType": "SETTINGS",
"status": "SUCCESS",
"result": {
"resourceId": "SETTINGS",
"resourceType": "SETTINGS",
"modules": [
"general",
"bot_variables",
"pii",
"ivr",
"hold_resume",
"custom_script",
"advanced"
],
"name": "Settings"
}
}
]
| Code | 설명 |
|---|---|
| 200 | 성공 |
| 400 | 응답에 오류가 있습니다. 응답 페이로드는 정확한 오류 설명을 표시합니다 |
| 401 | 클라이언트 앱이 API 호출을 할 수 있는 권한이 없습니다. SDK 자격 증명이 올바르지 않습니다 |
| 412 | 요청 페이로드가 전제 조건을 충족하지 않거나 필요한 인수를 전달했습니다 |
| 500 | 내부 서버 오류 |
ボットの公開リクエストを開始するために使用されます。ボットAPIを公開] を呼び出す前に、最低1つのチャネルがボットに対して有効になっていることを確認してください。
このAPIには、ボット管理者コンソールからのみ作成されたアプリケーションによって生成されたJWTが必要です。このAPIを使用するために、アプリは [ボットを公開] の [公開] の管理APIスコープを必要とします。
POST https://{{host}}/api/public/bot/{{BotID}}/publish
| パラメータ | 説明 |
|---|---|
| ホスト | 環境URL(例: https://bots.kore.ai) |
| BotID | ボットIDまたはストリームID。ボットの [一般設定] ページからアクセスすることができます。 |
| パラメータ | 説明 |
|---|---|
| versionComment | 公開リクエストへのコメント |
以下の構文を使用して、JWTをヘッダーに含むAPIを呼び出します。 auth: {{JWT}}
application/json
curl -X POST \ https://{{host}}/api/public/bot/{{BotID}}/publish \ -H 'auth: YOUR_JWT_ACCESS_TOKEN' \ -H 'content-type: application/json' \ -d '{ "versionComment" : "new update" }'
[ { "resourceType": "dialog", "resourceId": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360", "sbResourceId": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360", "status": "SUCCESS", "result": { "visibility": { "namespace": "enterprise", "namespaceIds": [ "o-23b63f37-89e7-52e9-bc5d-8012cbda0d4a" ] }, "contextLifeTime": { "options": "close" }, "version": "1.0", "nodes": [ { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "task" }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false }, "nodeId": "intent0", "type": "intent", "transitions": [ { "default": "entity1", "metadata": { "color": "#299d8e", "connId": "dummy0" } } ], "metadata": { "left": 19, "top": 142 }, "componentId": "dc-4935f617-c82d-5c39-96d6-4df11f48bd99" }, { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "task" }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false, "precedence": "entityOverIntent" }, "nodeId": "entity1", "type": "entity", "transitions": [ { "metadata": { "connId": "dummy1", "color": "#299d8e" }, "default": "entity2" } ], "metadata": { "left": 9, "top": 312 }, "componentId": "dc-a62d7d10-3ed2-5fb8-afc1-1d75b12e0253" }, { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "task" }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false, "precedence": "entityOverIntent" }, "nodeId": "entity2", "type": "entity", "transitions": [ { "metadata": { "connId": "dummy6", "color": "#299d8e" }, "then": "message3", "if": { "value": "15", "op": "eq", "field": "entity2" } }, { "metadata": { "connId": "dummy7", "color": "#5ea8d3" }, "then": "message4", "if": { "value": "30", "op": "eq", "field": "entity2" } }, { "default": "end", "metadata": { "color": "#299d8e", "connId": "dummy3" } } ], "metadata": { "left": 24, "top": 467 }, "componentId": "dc-64fc56de-b475-5071-b839-7615d600bf9b" }, { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "task" }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false }, "nodeId": "message3", "type": "message", "transitions": [ { "default": "end", "metadata": { "color": "#299d8e", "connId": "dummy5" } } ], "metadata": { "left": 318, "top": 373 }, "componentId": "dc-fb7bb786-8bd8-5f40-a2f9-92642c43ae5c" }, { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "task" }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false }, "nodeId": "message4", "type": "message", "transitions": [ { "default": "end", "metadata": { "color": "#299d8e", "connId": "dummy7" } } ], "metadata": { "top": 627, "left": 278 }, "componentId": "dc-32f800ce-f457-545c-846f-8e0b64c6c58c" } ], "isPublishedVersion": false, "idp": "none", "state": "awaitingApproval", "languages": [], "compatibility": [], "adminTaskStatus": "active", "editable": true, "isHidden": false, "approvedLanguages": [], "approvalRequestedLanguages": [ "en" ], "localeData": { "en": { "name": "mortgage", "shortDesc": "" } }, "isFollowUp": false, "interruptOptions": { "type": { "option": "developer", "message": "" }, "priority": "task", "interruptsEnabled": true, "holdUxOptions": { "option": "discardCurrTaskNoNotify", "message": "" } }, "_id": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360", "refId": "682f9675-07a2-5505-aa75-52fd2c4d1a17", "followUpIntents": [ { "refId": "19ad68d9-beb9-5670-ba73-47cf4e8cb1e7", "transitions": [], "interruptOptions": { "type": { "option": "developer", "message": "" }, "interruptsEnabled": true, "holdUxOptions": { "option": "discardCurrTask", "message": [ "Discarded current task to switch to new task" ] }, "parameterMap": { "preAssignments": [ { "Place": "", "preDefined": true, "entityId": "dc-325a8628-ef8b-5411-853b-f6b51e6f43aa" }, { "Day": "", "preDefined": true, "entityId": "dc-33d98b9a-f332-505b-b370-c63b7d22edc9" }, { "Time": "", "preDefined": true, "entityId": "dc-d24a083d-e8e0-51c0-ba25-216ba5439ee2" } ], "postAssignments": [ { "mortType": "", "preDefined": true, "entityId": "dc-29155c38-86f4-5124-b704-e932f55b0623" }, { "frType": "", "preDefined": true, "entityId": "dc-7af53bfd-eff5-5e0d-84c5-24d22d8fa150" } ] } } } ], "botId": "st-b4543a96-49ec-5d95-a120-c6244fc23777", "createdBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3", "createdOn": "2018-12-05T07:45:19.391Z", "lModBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3", "lMod": "2018-12-05T07:53:13.000Z", "lname": "mortgage", "__v": 0, "versionComment": "new update", "publishedOn": "2018-12-05T07:53:13.237Z", "name": "mortgage" } }, { "resourceType": "dialog", "resourceId": "dg-b68f22ad-19b8-5894-857a-04156d391b44", "sbResourceId": "dg-b68f22ad-19b8-5894-857a-04156d391b44", "status": "SUCCESS", "result": { "visibility": { "namespace": "enterprise", "namespaceIds": [ "o-23b63f37-89e7-52e9-bc5d-8012cbda0d4a" ] }, "contextLifeTime": { "options": "close" }, "version": "1.0", "nodes": [ { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "task" }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false, "message": [], "errorMessage": [] }, "nodeId": "intent0", "type": "intent", "transitions": [ { "default": "entity2", "metadata": { "color": "#299d8e", "connId": "dummy0" } } ], "metadata": { "left": 175, "top": 64 }, "componentId": "dc-4a22c00f-a5f8-5c2b-819b-db264a4a399b" }, { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "task" }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false, "isOptional": false, "message": [], "errorMessage": [], "precedence": "entityOverIntent" }, "nodeId": "entity1", "type": "entity", "transitions": [ { "default": "entity3", "metadata": { "color": "#299d8e", "connId": "dummy1" } } ], "metadata": { "left": 235, "top": 396 }, "componentId": "dc-d2794a44-f565-5de3-8073-5321a773c044" }, { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "node", "type": { "option": "developer" }, "interruptsEnabled": true, "holdUxOptions": { "option": "discardCurrTaskNoNotify", "message": "" } }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false, "message": [], "errorMessage": [], "isOptional": false, "precedence": "entityOverIntent" }, "nodeId": "entity2", "type": "entity", "transitions": [ { "default": "entity1", "metadata": { "color": "#299d8e", "connId": "dummy3" } } ], "metadata": { "left": 175, "top": 227 }, "componentId": "dc-9f065640-c0b6-5e86-8de7-d19997adb487" }, { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "task" }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false, "message": [], "errorMessage": [], "precedence": "entityOverIntent" }, "nodeId": "entity3", "type": "entity", "transitions": [ { "default": "message4", "metadata": { "color": "#299d8e", "connId": "dummy5" } } ], "metadata": { "left": 768, "top": 404 }, "componentId": "dc-8f9c6361-47f7-519b-950d-0b97b5b80ffb" }, { "nodeOptions": { "transitionType": "auto", "promptOptions": "required", "reuseMarkedupPhrases": false, "interruptOptions": { "priority": "task" }, "transitionMode": "initiateCurrentTask", "inputHandlingOptions": "useAsEntityValue", "reuseOptions": "1", "noAutoCorrection": false, "notForReuse": false, "message": [], "errorMessage": [] }, "nodeId": "message4", "type": "message", "transitions": [ { "default": "end", "metadata": { "color": "#299d8e", "connId": "dummy7" } } ], "metadata": { "left": 786, "top": 58 }, "componentId": "dc-45d51547-e374-5b90-ba1a-3fe620f9ab89" } ], "isPublishedVersion": false, "idp": "none", "state": "awaitingApproval", "languages": [], "compatibility": [], "adminTaskStatus": "active", "editable": true, "isHidden": false, "approvedLanguages": [], "approvalRequestedLanguages": [ "en" ], "localeData": { "en": { "name": "Support", "shortDesc": "Schedule" } }, "isFollowUp": false, "interruptOptions": { "priority": "bot" }, "_id": "dg-b68f22ad-19b8-5894-857a-04156d391b44", "refId": "19ad68d9-beb9-5670-ba73-47cf4e8cb1e7", "botId": "st-b4543a96-49ec-5d95-a120-c6244fc23777", "createdBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3", "createdOn": "2018-12-05T07:45:19.402Z", "lModBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3", "lMod": "2018-12-05T07:53:13.000Z", "lname": "support", "__v": 0, "versionComment": "new update", "publishedOn": "2018-12-05T07:53:13.236Z", "name": "Support" } }, { "resourceType": "NL", "status": "SUCCESS", "result": { "resourceId": "NL", "resourceType": "NL", "modules": [ "nl_model", "settings" ], "name": "Natural Language" } }, { "resourceType": "CHANNELS", "status": "SUCCESS", "result": { "resourceId": "CHANNELS", "resourceType": "CHANNELS", "modules": [ "alexa" ], "name": "Channels" } }, { "resourceType": "EXTENSIONS", "status": "SUCCESS", "result": { "resourceId": "EXTENSIONS", "resourceType": "EXTENSIONS", "modules": [ "botkit", "agent_transfer", "websdk", "events" ], "name": "Extensions" } }, { "resourceType": "SETTINGS", "status": "SUCCESS", "result": { "resourceId": "SETTINGS", "resourceType": "SETTINGS", "modules": [ "general", "bot_variables", "pii", "ivr", "hold_resume", "custom_script", "advanced" ], "name": "Settings" } } ]
| コード | 説明 |
|---|---|
| 200 | 成功 |
| 400 | 応答中のエラー。応答のペイロードは正確なエラーの説明を示します |
| 401 | クライアントアプリはAPIコールの実行を許可されていません。SDKの資格情報が無効です |
| 412 | リクエストペイロードが前提条件を満たしていない、または必要な引数を渡していません |
| 500 | 内部サーバーエラー |
Used to initiate a publish request for a bot. Before calling the Publish Bot API, make sure that at least one channel is enabled for the bot.
This API requires JWT generated by an application created only from Bot Admin Console.
To use this API, app needs the Admin API Scope of Publish under Bot Publish.
POST https://{{host}}/api/public/bot/{{BotID}}/publish
| Parameter | Description |
|---|---|
| host | Environment URL, for example, https://bots.kore.ai |
| BotID | Bot ID or Stream ID. You can access it from the General Settings page of the bot. |
| Parameter | Description |
|---|---|
| versionComment | Comments for your Publish request |
Invoke the API with JWT in the header with the following syntax:
auth: {{JWT}}
application/json
curl -X POST \
https://{{host}}/api/public/bot/{{BotID}}/publish \
-H 'auth: YOUR_JWT_ACCESS_TOKEN' \
-H 'content-type: application/json' \
-d '{
"versionComment" : "new update"
}'
[
{
"resourceType": "dialog",
"resourceId": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360",
"sbResourceId": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360",
"status": "SUCCESS",
"result": {
"visibility": {
"namespace": "enterprise",
"namespaceIds": [
"o-23b63f37-89e7-52e9-bc5d-8012cbda0d4a"
]
},
"contextLifeTime": {
"options": "close"
},
"version": "1.0",
"nodes": [
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false
},
"nodeId": "intent0",
"type": "intent",
"transitions": [
{
"default": "entity1",
"metadata": {
"color": "#299d8e",
"connId": "dummy0"
}
}
],
"metadata": {
"left": 19,
"top": 142
},
"componentId": "dc-4935f617-c82d-5c39-96d6-4df11f48bd99"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"precedence": "entityOverIntent"
},
"nodeId": "entity1",
"type": "entity",
"transitions": [
{
"metadata": {
"connId": "dummy1",
"color": "#299d8e"
},
"default": "entity2"
}
],
"metadata": {
"left": 9,
"top": 312
},
"componentId": "dc-a62d7d10-3ed2-5fb8-afc1-1d75b12e0253"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"precedence": "entityOverIntent"
},
"nodeId": "entity2",
"type": "entity",
"transitions": [
{
"metadata": {
"connId": "dummy6",
"color": "#299d8e"
},
"then": "message3",
"if": {
"value": "15",
"op": "eq",
"field": "entity2"
}
},
{
"metadata": {
"connId": "dummy7",
"color": "#5ea8d3"
},
"then": "message4",
"if": {
"value": "30",
"op": "eq",
"field": "entity2"
}
},
{
"default": "end",
"metadata": {
"color": "#299d8e",
"connId": "dummy3"
}
}
],
"metadata": {
"left": 24,
"top": 467
},
"componentId": "dc-64fc56de-b475-5071-b839-7615d600bf9b"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false
},
"nodeId": "message3",
"type": "message",
"transitions": [
{
"default": "end",
"metadata": {
"color": "#299d8e",
"connId": "dummy5"
}
}
],
"metadata": {
"left": 318,
"top": 373
},
"componentId": "dc-fb7bb786-8bd8-5f40-a2f9-92642c43ae5c"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false
},
"nodeId": "message4",
"type": "message",
"transitions": [
{
"default": "end",
"metadata": {
"color": "#299d8e",
"connId": "dummy7"
}
}
],
"metadata": {
"top": 627,
"left": 278
},
"componentId": "dc-32f800ce-f457-545c-846f-8e0b64c6c58c"
}
],
"isPublishedVersion": false,
"idp": "none",
"state": "awaitingApproval",
"languages": [],
"compatibility": [],
"adminTaskStatus": "active",
"editable": true,
"isHidden": false,
"approvedLanguages": [],
"approvalRequestedLanguages": [
"en"
],
"localeData": {
"en": {
"name": "mortgage",
"shortDesc": ""
}
},
"isFollowUp": false,
"interruptOptions": {
"type": {
"option": "developer",
"message": ""
},
"priority": "task",
"interruptsEnabled": true,
"holdUxOptions": {
"option": "discardCurrTaskNoNotify",
"message": ""
}
},
"_id": "dg-606c7f53-e94a-58ff-8b98-d83ce03e6360",
"refId": "682f9675-07a2-5505-aa75-52fd2c4d1a17",
"followUpIntents": [
{
"refId": "19ad68d9-beb9-5670-ba73-47cf4e8cb1e7",
"transitions": [],
"interruptOptions": {
"type": {
"option": "developer",
"message": ""
},
"interruptsEnabled": true,
"holdUxOptions": {
"option": "discardCurrTask",
"message": [
"Discarded current task to switch to new task"
]
},
"parameterMap": {
"preAssignments": [
{
"Place": "",
"preDefined": true,
"entityId": "dc-325a8628-ef8b-5411-853b-f6b51e6f43aa"
},
{
"Day": "",
"preDefined": true,
"entityId": "dc-33d98b9a-f332-505b-b370-c63b7d22edc9"
},
{
"Time": "",
"preDefined": true,
"entityId": "dc-d24a083d-e8e0-51c0-ba25-216ba5439ee2"
}
],
"postAssignments": [
{
"mortType": "",
"preDefined": true,
"entityId": "dc-29155c38-86f4-5124-b704-e932f55b0623"
},
{
"frType": "",
"preDefined": true,
"entityId": "dc-7af53bfd-eff5-5e0d-84c5-24d22d8fa150"
}
]
}
}
}
],
"botId": "st-b4543a96-49ec-5d95-a120-c6244fc23777",
"createdBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
"createdOn": "2018-12-05T07:45:19.391Z",
"lModBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
"lMod": "2018-12-05T07:53:13.000Z",
"lname": "mortgage",
"__v": 0,
"versionComment": "new update",
"publishedOn": "2018-12-05T07:53:13.237Z",
"name": "mortgage"
}
},
{
"resourceType": "dialog",
"resourceId": "dg-b68f22ad-19b8-5894-857a-04156d391b44",
"sbResourceId": "dg-b68f22ad-19b8-5894-857a-04156d391b44",
"status": "SUCCESS",
"result": {
"visibility": {
"namespace": "enterprise",
"namespaceIds": [
"o-23b63f37-89e7-52e9-bc5d-8012cbda0d4a"
]
},
"contextLifeTime": {
"options": "close"
},
"version": "1.0",
"nodes": [
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"message": [],
"errorMessage": []
},
"nodeId": "intent0",
"type": "intent",
"transitions": [
{
"default": "entity2",
"metadata": {
"color": "#299d8e",
"connId": "dummy0"
}
}
],
"metadata": {
"left": 175,
"top": 64
},
"componentId": "dc-4a22c00f-a5f8-5c2b-819b-db264a4a399b"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"isOptional": false,
"message": [],
"errorMessage": [],
"precedence": "entityOverIntent"
},
"nodeId": "entity1",
"type": "entity",
"transitions": [
{
"default": "entity3",
"metadata": {
"color": "#299d8e",
"connId": "dummy1"
}
}
],
"metadata": {
"left": 235,
"top": 396
},
"componentId": "dc-d2794a44-f565-5de3-8073-5321a773c044"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "node",
"type": {
"option": "developer"
},
"interruptsEnabled": true,
"holdUxOptions": {
"option": "discardCurrTaskNoNotify",
"message": ""
}
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"message": [],
"errorMessage": [],
"isOptional": false,
"precedence": "entityOverIntent"
},
"nodeId": "entity2",
"type": "entity",
"transitions": [
{
"default": "entity1",
"metadata": {
"color": "#299d8e",
"connId": "dummy3"
}
}
],
"metadata": {
"left": 175,
"top": 227
},
"componentId": "dc-9f065640-c0b6-5e86-8de7-d19997adb487"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"message": [],
"errorMessage": [],
"precedence": "entityOverIntent"
},
"nodeId": "entity3",
"type": "entity",
"transitions": [
{
"default": "message4",
"metadata": {
"color": "#299d8e",
"connId": "dummy5"
}
}
],
"metadata": {
"left": 768,
"top": 404
},
"componentId": "dc-8f9c6361-47f7-519b-950d-0b97b5b80ffb"
},
{
"nodeOptions": {
"transitionType": "auto",
"promptOptions": "required",
"reuseMarkedupPhrases": false,
"interruptOptions": {
"priority": "task"
},
"transitionMode": "initiateCurrentTask",
"inputHandlingOptions": "useAsEntityValue",
"reuseOptions": "1",
"noAutoCorrection": false,
"notForReuse": false,
"message": [],
"errorMessage": []
},
"nodeId": "message4",
"type": "message",
"transitions": [
{
"default": "end",
"metadata": {
"color": "#299d8e",
"connId": "dummy7"
}
}
],
"metadata": {
"left": 786,
"top": 58
},
"componentId": "dc-45d51547-e374-5b90-ba1a-3fe620f9ab89"
}
],
"isPublishedVersion": false,
"idp": "none",
"state": "awaitingApproval",
"languages": [],
"compatibility": [],
"adminTaskStatus": "active",
"editable": true,
"isHidden": false,
"approvedLanguages": [],
"approvalRequestedLanguages": [
"en"
],
"localeData": {
"en": {
"name": "Support",
"shortDesc": "Schedule"
}
},
"isFollowUp": false,
"interruptOptions": {
"priority": "bot"
},
"_id": "dg-b68f22ad-19b8-5894-857a-04156d391b44",
"refId": "19ad68d9-beb9-5670-ba73-47cf4e8cb1e7",
"botId": "st-b4543a96-49ec-5d95-a120-c6244fc23777",
"createdBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
"createdOn": "2018-12-05T07:45:19.402Z",
"lModBy": "u-3ae8bd39-a65b-5b2c-b55b-85864a8202c3",
"lMod": "2018-12-05T07:53:13.000Z",
"lname": "support",
"__v": 0,
"versionComment": "new update",
"publishedOn": "2018-12-05T07:53:13.236Z",
"name": "Support"
}
},
{
"resourceType": "NL",
"status": "SUCCESS",
"result": {
"resourceId": "NL",
"resourceType": "NL",
"modules": [
"nl_model",
"settings"
],
"name": "Natural Language"
}
},
{
"resourceType": "CHANNELS",
"status": "SUCCESS",
"result": {
"resourceId": "CHANNELS",
"resourceType": "CHANNELS",
"modules": [
"alexa"
],
"name": "Channels"
}
},
{
"resourceType": "EXTENSIONS",
"status": "SUCCESS",
"result": {
"resourceId": "EXTENSIONS",
"resourceType": "EXTENSIONS",
"modules": [
"botkit",
"agent_transfer",
"websdk",
"events"
],
"name": "Extensions"
}
},
{
"resourceType": "SETTINGS",
"status": "SUCCESS",
"result": {
"resourceId": "SETTINGS",
"resourceType": "SETTINGS",
"modules": [
"general",
"bot_variables",
"pii",
"ivr",
"hold_resume",
"custom_script",
"advanced"
],
"name": "Settings"
}
}
]
| Code | Description |
|---|---|
| 200 | Success |
| 400 | Error in response; the response payload shows the exact error description |
| 401 | The client app is unauthorized to make the API call; Invalid SDK credentials |
| 412 | Request payload didn’t meet the preconditions or passed the required arguments |
| 500 | Internal server error |