Updating a Hot Word Table
Function
This API is used to update a hot word table. Upon successful update, an ID will be returned.
URI
PUT /v1/{project_id}/asr/vocabularies/{vocabulary_id}
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain a project ID, see Obtaining a Project ID. |
vocabulary_id |
Yes |
String |
ID of the hot word table to be updated. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
User token. It is used to obtain the permission to call APIs. For details about how to obtain a user token, see Authentication. The token is the value of X-Subject-Token in the response header. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Hot word table name, which must be unique. The name can contain a maximum of 32 characters. Only letters, digits, underscores (_), hyphens (-), and pounds (#) are allowed. |
description |
No |
String |
Description of the hot word table. The value can contain a maximum of 255 characters. |
language |
Yes |
String |
Language type of the hot word table. Value: chinese_mandarin, indicating Mandarin Chinese. |
contents |
Yes |
Array of strings |
Chinese-English hybrid hot words are supported. A hot word can contain only English letters and Chinese characters encoded in Unicode mode. Other symbols, including spaces, are not allowed. A single hot word table supports up to 10,000 hot words. A hot word can contain 32 bytes at most. |
Response Parameters
Status code: 200
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
vocabulary_id |
Yes |
String |
If the calling is successful, ID of the hot word table is returned. Otherwise, this parameter is invalid. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code when the API call fails. This parameter is not returned for a successful call. |
error_msg |
String |
Error message when the API call fails. This parameter is not returned for a successful call. |
Example Requests

The endpoint is the request URL for calling an API. Endpoints vary according to services and regions. For details, see Endpoints.
- Update a hot word table.
PUT https://{endpoint}/v1/{project_id}/asr/vocabularies/{vocabulary_id} Request header: Content-Type: application/json X-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG... Request body: { "name": "telepower", "description": "telepower "description, "language": "chinese_mandarin", "contents": ["example"] }
Example Responses
Status code: 200
Example response for a successful request
{ "vocabulary_id": "CFD08A32-6176-4ad7-92F9-11ED015C8109", }
Status code: 400
Example response for a failed request
{ "error_code":"SIS.0201", "error_msg":"***" }
Status Codes
See Status Codes.
Error Codes
See Error Codes.
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