ボットの公開リクエストを開始するために使用されます。ボット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 | 内部サーバーエラー |