**测试环境URL**:http://tx-gz14.heyqiwu.cn **生产环境URL**:http://tx-gz11.heyqiwu.cn [TOC] ### 搜索词组 **METHOD**: GET **path**: api/platform/design/phrase/search **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | ---------- | ------ | -------- | -------------------------- | | projectId | number | yes | 项目id | | searchText | string | no | 搜索文本,通过名称或者标签 | | type | number | yes | 词组种类 | type值说明 | key | type | description | | ---- | ------ | ----------- | | 0 | number | 系统词组 | | 1 | number | 作品词组 | | 2 | number | 项目词组 | #### 请求body字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/phrase/search?projectId=2159&searchText=&type=0' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFd05qRTNNVE1zSW1WNGNDSTZNVGN3TVRBMk9Ea3hNeXdpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLmlzYl9Hc09VajdZbmQ3alN0ZUVldDhWSjNwYXBZVmxQQ1FGUmpsV3BOZlE6czAwcGVyczNjcmV0' \ -H 'Connection: keep-alive' \ -H 'Origin: http://localhost:8080' \ -H 'Referer: http://localhost:8080/' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ -H 'botAccount: gz33botxindaorudaochu710656447' \ -H 'groupId: 76' \ -H 'mul: true' \ -H 'projectId: 2159' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": [ { "phraseName": "时间段o词组", "updatePhraseName": null, "pos": null, "labels": "时间,时间段", "phraseRemarks": "仅限时间段的词语", "content": null, "type": 0, "highPerformance": null, "projectId": null }, { "phraseName": "水果大全", "updatePhraseName": null, "pos": null, "labels": "水果,水果名字,水果名", "phraseRemarks": "各种水果的名字。", "content": null, "type": 0, "highPerformance": null, "projectId": null } ] } ``` ### 新建词组 **METHOD**: POST **path**: api/platform/design/phrase/work **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求body字段说明 | key | type | required | description | | --------------- | ------- | -------- | -------------- | | phraseName | string | yes | 词组名称 | | labels | string | yes | 标签,用于搜索 | | content | string | yes | 词组内容 | | type | number | yes | 词组种类 | | projectId | number | yes | 项目id | | phraseRemarks | string | yes | 词组备注 | | highPerformance | boolean | yes | 高性能模式 | | pos | string | yes | 词性 | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/phrase/work' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFd05qRTNNVE1zSW1WNGNDSTZNVGN3TVRBMk9Ea3hNeXdpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLmlzYl9Hc09VajdZbmQ3alN0ZUVldDhWSjNwYXBZVmxQQ1FGUmpsV3BOZlE6czAwcGVyczNjcmV0' \ -H 'Connection: keep-alive' \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Origin: http://localhost:8080' \ -H 'Referer: http://localhost:8080/' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ -H 'botAccount: gz33botxindaorudaochu710656447' \ -H 'groupId: 76' \ -H 'mul: true' \ -H 'projectId: 2159' \ --data-raw '{"phraseName":"哈哈","labels":"你好","content":"这是词组","type":1,"projectId":2159,"phraseRemarks":"呜呜呜","highPerformance":true,"pos":"动词"}' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": null } ``` ### 获取词组 **METHOD**: GET **path**: api/platform/design/phrase/work **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | ---------- | ------ | -------- | ----------- | | phraseName | string | yes | 词组名称 | | type | number | yes | 词组种类 | | projectId | number | yes | 项目id | type值说明 | key | type | description | | ---- | ------ | ----------- | | 0 | number | 系统词组 | | 1 | number | 作品词组 | | 2 | number | 项目词组 | #### 请求body字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/phrase?phraseName=%E6%97%B6%E9%97%B4%E6%AE%B5o%E8%AF%8D%E7%BB%84&type=0&projectId=1' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFeE16WTBOakFzSW1WNGNDSTZNVGN3TVRFME16WTJNQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLnJjVE9mb2IzbE13ZFViNTRFNlh6X1N2bnNadGVZbnJzbi1hZTlRX0phcUE6czAwcGVyczNjcmV0' \ -H 'Connection: keep-alive' \ -H 'Origin: http://localhost:8080' \ -H 'Referer: http://localhost:8080/' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ -H 'botAccount: 6080626246' \ -H 'groupId: 76' \ -H 'mul: true' \ -H 'projectId: 1' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": [ "", "月底", "深夜", "正午", "周末", "午后", "早上", "清晨", "早晨", "下午", "凌晨", "黄昏", "半夜", "拂晓", "午夜", "傍晚", "春天", "晌午", "秋天", "夏天", "中午", "下周", "上午", "冬天", "夜里", "晚上" ] } ``` ### 删除词组 **METHOD**: DELETE **path**: api/platform/design/phrase/work/{phraseName} **RequestHeaders:** 同创作平台请求header #### 请求path字段说明 | key | type | required | description | | ---------- | ------ | -------- | ----------- | | phraseName | string | yes | 词组名 | #### 请求param字段说明 | key | type | required | description | | --------- | ------ | -------- | ----------- | | projectId | number | yes | 项目id | | type | number | yes | 词组种类 | type值说明 | key | type | description | | ---- | ------ | ----------- | | 0 | number | 系统词组 | | 1 | number | 作品词组 | | 2 | number | 项目词组 | #### 请求body字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/phrase/work/%E5%8C%85%E5%90%AB?projectId=6381&type=1' \ -X 'DELETE' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFME1Ea3hNamdzSW1WNGNDSTZNVGN3TVRReE5qTXlPQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLml3Y0NPUWdNeHdLcjZZY3YwUU1xYllOMFNtYVU4YzlfZ05hNlJjUC1DRWs6czAwcGVyczNjcmV0' \ -H 'Connection: keep-alive' \ -H 'Origin: http://localhost:8080' \ -H 'Referer: http://localhost:8080/' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ -H 'botAccount: txgz14botwww853177949' \ -H 'groupId: 713' \ -H 'mul: true' \ -H 'projectId: 6381' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": null } ``` ### 获取项目所有词组 **METHOD**: GET **path**: api/platform/design/phrase/all **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | --------- | ------ | -------- | ----------- | | projectId | number | yes | 项目id | #### 请求body字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/phrase/all?projectId=6381' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFME1UWXpORElzSW1WNGNDSTZNVGN3TVRReU16VTBNaXdpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLjVCV1FMbUxSOXJNYWgtMk80cUdDcXdmTHVDWjJWVHVFSW1PWWtRdjJXZG86czAwcGVyczNjcmV0' \ -H 'Connection: keep-alive' \ -H 'Origin: http://localhost:8080' \ -H 'Referer: http://localhost:8080/' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ -H 'botAccount: txgz14botwww853177949' \ -H 'groupId: 713' \ -H 'mul: true' \ -H 'projectId: 6381' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": [ { "updatePhraseName": null, "phraseName": "开心词组类型二", "pos": null, "labels": "", "content": "喜悦+欢快+忻悦+起劲+愉快+得意忘形+高兴+雀跃+欢腾+喜出望外+欣喜若狂+欢天喜地+幸福+不错+欣忭+怡悦+得志+怡情悦性+抚掌大笑+笑容可掬+愉悦+乐意+欢喜+夷愉+喜上眉梢+愿意+快活+手舞足蹈+欢娱+满意+夷悦+心花怒放+开心+欢悦+首肯+欢欣+快乐+答应+乐+谈笑风生+得意+欣喜+喜气洋洋+称心+兴奋+欢乐+舒畅+激动+酒酣耳热+欢跃+安乐+欢畅+自在+振奋+心悦诚服+康乐+痛快", "comment": "", "highPerformance": false, "projectId": 6381, "ownerId": 293, "gmtCreate": "2023-11-28T02:58:52.000+0000", "gmtModified": "2023-11-28T02:58:52.000+0000" }, { "updatePhraseName": null, "phraseName": "认识词组类型二", "pos": null, "labels": "", "content": "相识+知道+认识+熟悉+了解+认不认识+结识+熟", "comment": "", "highPerformance": false, "projectId": 6381, "ownerId": 293, "gmtCreate": "2023-11-28T02:58:52.000+0000", "gmtModified": "2023-11-28T02:58:52.000+0000" } ] } ``` ### 导出项目词组 **METHOD**: GET **path**: api/platform/user/group/phrase/all **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求body字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/user/group/phrase/all' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFME9ERTFNamdzSW1WNGNDSTZNVGN3TVRRNE9EY3lPQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLmNvVVdsTUhDTVhmenY3REZLbzJCdXM3YzQtUnM4THVxRjV6QVZCc0g3TTg6czAwcGVyczNjcmV0' \ -H 'Connection: keep-alive' \ -H 'Origin: http://localhost:8080' \ -H 'Referer: http://localhost:8080/' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ -H 'botAccount: 7690972386' \ -H 'groupId: 49' \ -H 'mul: true' \ -H 'projectId: 985' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": [ { "updatePhraseName": null, "phraseName": "测试名称", "pos": "名词", "labels": "标签", "content": "词组内容", "comment": "备注", "highPerformance": true, "groupId": 49, "ownerId": null, "gmtCreate": "2021-02-19T13:04:08.000+00:00", "gmtModified": "2023-12-02T01:48:42.000+00:00" } ] } ``` ### 导出作品词组 **METHOD**: GET **path**: api/platform/design/phrase/all **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | --------- | ------ | -------- | ----------- | | projectId | number | yes | 项目id | #### 请求body字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/phrase/all?projectId=985' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFME9ERTFNamdzSW1WNGNDSTZNVGN3TVRRNE9EY3lPQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLmNvVVdsTUhDTVhmenY3REZLbzJCdXM3YzQtUnM4THVxRjV6QVZCc0g3TTg6czAwcGVyczNjcmV0' \ -H 'Connection: keep-alive' \ -H 'Origin: http://localhost:8080' \ -H 'Referer: http://localhost:8080/' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ -H 'botAccount: 7690972386' \ -H 'groupId: 49' \ -H 'mul: true' \ -H 'projectId: 985' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": [ { "updatePhraseName": null, "phraseName": "呜呜呜", "pos": "专有名", "labels": "我", "content": "五点多的点点滴滴", "comment": "呜呜呜呜呜呜", "highPerformance": true, "projectId": 985, "ownerId": 37, "gmtCreate": "2023-12-02T01:40:57.000+0000", "gmtModified": "2023-12-02T01:40:57.000+0000" } ] } ``` ### 导入项目词组 **METHOD**: POST **path**: api/platform/user/group/phrase/import **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | ---- | ---- | -------- | ----------- | | 无 | | | | #### 请求body字段说明 | key | type | required | description | | ---------------- | ------- | -------- | -------------------- | | updatePhraseName | string | no | 修改时输入的词组名称 | | phraseName | string | yes | 词组名称 | | pos | string | yes | 词性 | | labels | string | yes | 标签,用于搜索 | | content | string | yes | 词组内容 | | comment | string | yes | 注释 | | highPerformance | boolean | yes | 高性能模式 | | groupId | number | yes | 作品id | | ownerId | number | no | 作者ID | | gmtCreate | string | yes | 创建时间 | | gmtModified | string | yes | 更新时间 | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/user/group/phrase/import' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFME9UTTROekFzSW1WNGNDSTZNVGN3TVRVd01UQTNNQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLmFNMloxSHMyM3lyUEdtQW50SVJER0ZsWkc1dTNacmlTcGFZQzdkdV9MN0k6czAwcGVyczNjcmV0' \ -H 'Connection: keep-alive' \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Origin: http://localhost:8080' \ -H 'Referer: http://localhost:8080/' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ -H 'botAccount: 7690972386' \ -H 'groupId: 49' \ -H 'mul: true' \ -H 'projectId: 985' \ --data-raw '[{"updatePhraseName":null,"phraseName":"测试项目词组2","pos":"323","labels":"12","content":"12","comment":"12","highPerformance":false,"groupId":49,"ownerId":null,"gmtCreate":"2021-02-19T13:04:08.000+00:00","gmtModified":"2021-02-19T13:04:08.000+00:00"}]' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": null } ``` ### 导入作品词组 **METHOD**: POST **path**: api/platform/design/phrase/import **RequestHeaders:** 同创作平台请求header #### 请求param字段说明 | key | type | required | description | | --------- | ------ | -------- | ----------- | | projectId | number | yes | 作品id | #### 请求body字段说明 | key | type | required | description | | ---------------- | ------- | -------- | -------------------- | | updatePhraseName | string | no | 修改时输入的词组名称 | | phraseName | string | yes | 词组名称 | | pos | string | yes | 词性 | | labels | string | yes | 标签,用于搜索 | | content | string | yes | 词组内容 | | comment | string | yes | 注释 | | highPerformance | boolean | yes | 高性能模式 | | groupId | number | yes | 作品id | | ownerId | number | no | 作者ID | | gmtCreate | string | yes | 创建时间 | | gmtModified | string | yes | 更新时间 | #### 请求示例 ```js curl 'http://tx-gz14.heyqiwu.cn/api/platform/design/phrase/import?projectId=2159' \ -H 'Accept: application/json, text/plain, */*' \ -H 'Accept-Language: zh-CN,zh;q=0.9' \ -H 'Authorization: Basic ZXlKaGJHY2lPaUpJVXpJMU5pSjkuZXlKcFlYUWlPakUzTURFME9UTTROekFzSW1WNGNDSTZNVGN3TVRVd01UQTNNQ3dpWVhWMGFHOXlhWFI1SWpveExDSnBaQ0k2TWpJMGZRLmFNMloxSHMyM3lyUEdtQW50SVJER0ZsWkc1dTNacmlTcGFZQzdkdV9MN0k6czAwcGVyczNjcmV0' \ -H 'Connection: keep-alive' \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Origin: http://localhost:8080' \ -H 'Referer: http://localhost:8080/' \ -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36' \ -H 'botAccount: gz33botxindaorudaochu710656447' \ -H 'groupId: 76' \ -H 'mul: true' \ -H 'projectId: 2159' \ --data-raw '[{"updatePhraseName":null,"phraseName":"哈哈","pos":"动词","labels":"你好","content":"这是词组","comment":"呜呜呜","highPerformance":true,"projectId":2159,"ownerId":37,"gmtCreate":"2023-11-27T07:06:16.000+0000","gmtModified":"2023-11-27T07:06:16.000+0000"},{"updatePhraseName":null,"phraseName":"1","pos":"5","labels":"2","content":"4","comment":"3","highPerformance":true,"projectId":2159,"ownerId":37,"gmtCreate":"2023-11-27T07:12:37.000+0000","gmtModified":"2023-11-27T07:12:37.000+0000"}]' \ --compressed \ --insecure ``` #### 响应实例 ```json { "code": 1, "msg": "成功", "data": null } ``` ###