Updated on 2025-08-26 GMT+08:00

Querying Hot Word Table Information

Function

This API is used to query the information and content of a hot word table based on its ID.

URI

GET /v1/{project_id}/asr/vocabularies/{vocabulary_id}

Table 1 Path parameters

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 queried.

Request Parameters

Table 2 Request header 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.

Response Parameters

Status code: 200

Table 3 Response body parameters

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.

name

Yes

String

If the calling is successful, name of the hot word table is returned. Otherwise, this parameter is invalid.

language

Yes

String

If the calling is successful, language type of the hot word table is returned. Otherwise, this parameter is invalid.

description

Yes

String

If the calling is successful, description of the hot word table is returned. Otherwise, this parameter is invalid.

contents

Yes

Array of strings

If the calling is successful, the hot word table is returned. Otherwise, this parameter is invalid.

Status code: 400

Table 4 Response body parameters

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.

  • Query hot word table information.
    GET https://{endpoint}/v1/{project_id}/asr/vocabularies/{vocabulary_id}
    
    Request header:
    Content-Type: application/json
    X-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...   

Example Responses

Status code: 200

Example response for a successful request

{ 
  "vocabulary_id": "CFD08A32-6176-4ad7-92F9-11ED015C8109",
  "name": "telepower",
  "description": "telepower description",
  "language": "chinese_mandarin", 
  "contents": ["example"]
} 

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.