POST /CCSQM/rest/ccisqm/v1/sentencemanage/createSentence
Scenario
This interface is invoked to create a sentence.
Method
POST
URI
https://Domain name/apiaccess/CCSQM/rest/ccisqm/v1/sentencemanage/createSentence (For example, the domain name is service.besclouds.com.)
Request Description
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1 |
Content-Type |
String |
No |
The value is fixed to application/json; charset=UTF-8. |
2 |
x-app-key |
String |
No |
App key |
3 |
Authorization |
String |
Yes |
Authentication field. The format is Bearer {Value of AccessToken returned by the tokenByAkSk interface}. (A space is required after Bearer.) |
4 |
x-UserId |
String |
No |
Operator ID You can sign in to the system and go to the employee management page to view the value of userId returned by an interface. |
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1.1 |
category_id |
String |
Yes |
Unique ID of a sentence category |
1.2 |
sentence_name |
String |
Yes |
Sentence name |
1.3 |
tagDataList |
Array [Object] |
Yes |
Semantics and keywords used in a sentence |
1.3.1 |
tag_type |
String |
Yes |
Tag type
|
1.3.2 |
pos_sentences |
Array [Object] |
No |
Positive corpuses, keywords, and regular expressions |
1.3.2.1 |
name |
String |
No |
Positive corpus content |
1.3.3 |
neg_sentences |
Array [Object] |
No |
Antonym corpuses |
1.3.3.1 |
name |
String |
No |
Antonym corpus content |
Response Description
- Status code: 200
No. |
Parameter |
Type |
Mandatory or Not |
Description |
---|---|---|---|---|
1.1 |
sentence_id |
String |
No |
Sentence ID |
1.2 |
id |
String |
No |
Sentence ID |
1.3 |
resultCode |
String |
No |
Return code
|
1.4 |
resultDesc |
String |
No |
Return description |
1.5 |
statusCode |
Number |
No |
Status code |
- Status code: 400
Incorrect request. Check the request path and parameters.
- Status code: 401
Unauthorized operation. 1. Check whether you have purchased related services. 2. Contact customer service to check the status of your account.
- Status code: 404
The requested content is not found. Check the request path.
- Status code: 500
Business failure. Check the values of parameters in the request.
Error Codes
None
Example
- Scenario: Create a sentence.
x-app-key:************************************ X-UserID:1611917095665261978 Authorization:Bearer ********************************
Request parameters:
{ "category_id": "1070149256381206528", "sentence_name": "Sentence name 87", "tagDataList": [ { "tag_type": "dialogue_act", "pos_sentences": [ { "name": "Synonym corpus 88" } ], "neg_sentences": [ { "name": "Antonym corpus 28" } ] }, { "tag_type": "keyword", "pos_sentences": [ { "name": "Keyword 11192" }, { "name": "Keyword 22222" } ] }, { "tag_type": "regular_exp", "pos_sentences":[{ "name": "Regular expression 2221" }] } ] }
Response parameters:
{ "sentence_id": "10849", "resultCode": "0403000", "id": "10849", "resultDesc": "Operation successful." }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot