更新途径
开发环境
开发环境
POST
/v1/convo_pathway/{pathway_id}
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/v1/convo_pathway/' \
--header 'authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "<string>",
"description": "<string>",
"nodes": {},
"edges": {}
}'
响应示例响应示例
{
"status": "success",
"message": "Pathway updated successfully",
"pathway_data": {
"pathway_id": "9d404c1b-6a23-4426-953a-a52c392ff8f1",
"name": "Updated Demo Pathway",
"description": "This is an updated description",
"nodes": [
{
"id": "1",
"data": {
"name": "Start",
"text": "Hey there, how are you doing today?",
"isStart": true,
},
"type": "Default"
},
{
"id": "randomnode_1710288752186",
"data": {
"name": "End call",
"prompt": "Click 'Add New Node' on the right to add a new node",
},
"type": "End Call"
},
{
"id": "randomnode_1710288871721",
"data": {
"name": "New Node",
"prompt": "Click 'Add New Node' on the right to add a new node",
},
"type": "Default"
}
],
"edges": [
{
"id": "1",
"source": "1",
"target": "randomnode_1710288752186",
"data": {
"name": "End call",
"prompt": "Click 'Add New Node' on the right to add a new node",
}
},
{
"id": "2",
"source": "1",
"target": "randomnode_1710288871721",
"data": {
"name": "New Node",
"prompt": "Click 'Add New Node' on the right to add a new node",
}
}
]
}
}
请求参数
Path 参数
pathway_id
string
必需
Header 参数
Content-Type
string
必需
示例值:
application/json
authorization
string
必需
示例值:
<authorization>
Body 参数application/json
返回响应
修改于 2024-05-10 07:27:37