GetVocab

Updated at:

Retrieves vocabulary information by its ID.

Operation description

Before you use this API, review the billing methods and pricing for the Tongyi Xiaomi CCAI-Conversation Analysis AIO product.

Prerequisites

  • The Tongyi Xiaomi CCAI-Conversation Analysis AIO service is activated.
  • You have created an application: Create a Tongyi Xiaomi CCAI-Conversation Analysis AIO application in the Application Center and obtain the APP-ID and WORKSPACE-ID: Obtain the APP-ID and WORKSPACE-ID.

Try it now

You can run this API directly in OpenAPI Explorer without worrying about calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.

Try it now

RAM authorization

No authorization information is available for the current API.

Request syntax

POST /vocab/getVocab HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
bodyobjectNo

Request body

vocabularyIdstringYes

Vocabulary ID

dhbf***rbrdb
workspaceIdstringYes

Workspace ID

llm-9864***1

Sample request code


import com.alibaba.fastjson.JSONObject;
import com.aliyun.contactcenterai20240603.Client;
import com.aliyun.contactcenterai20240603.models.CreateVocabRequest;
import com.aliyun.contactcenterai20240603.models.CreateVocabResponse;
import com.aliyun.contactcenterai20240603.models.GetVocabRequest;
import com.aliyun.contactcenterai20240603.models.GetVocabResponse;
import com.aliyun.teaopenapi.models.Config;

import java.util.ArrayList;
import java.util.List;

public class Vocab {

    private static String accessKeyId = "YOUR_ACCESS_KEY_ID";
    private static String accessKeySecret = "YOUR_ACCESS_KEY_SECRET";

    private static String workspaceId = "YOUR_WORKSPACE_ID";

    private static Config config = new Config();

    static {
        config.setAccessKeyId(accessKeyId).setAccessKeySecret(accessKeySecret).setEndpoint("contactcenterai.cn-shanghai.aliyuncs.com")
                .setReadTimeout(30000).setConnectTimeout(300000).setRegionId("cn-shanghai").setProtocol("HTTPS");
    }

    public static void main(String[] args) throws Exception {
        Client client = new Client(config);

        GetVocabRequest request = new GetVocabRequest();
        request.setVocabularyId("1a3188**********7d2e");
        request.setWorkspaceId(workspaceId);

        GetVocabResponse response = client.getVocab(request);
        System.out.println(JSONObject.toJSONString(response));
    }
}

Response elements

ElementTypeDescriptionExample
object

Schema of Response

requestIdstring

Request ID

968A8634-FA2C-5381-9B3E-*******F
successstring

Indicates whether the request succeeded

true
dataobject

Response data

vocabularyIdstring

Vocabulary ID

rrbe***jrvrdd
namestring

Name

Hot word 1
descriptionstring

Description

Sales hot words
audioModelCodestring

The speech-to-text model

nls
wordWeightListarray<object>

Hot word group

wordWeightListobject

Hot word group

wordstring

Word

child
weightinteger

Weight

1

Examples

Success response

JSON format

{
  "requestId": "968A8634-FA2C-5381-9B3E-*******F",
  "success": true,
  "data": {
    "vocabularyId": "rrbe***jrvrdd",
    "name": "热词1",
    "description": "销售热词",
    "audioModelCode": "nls",
    "wordWeightList": [
      {
        "word": "儿童",
        "weight": 1
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400CCAI.InvalidParam.NotExistThe specified parameter %s is not valid.The request parameter does not exist.
400CCAI.ParamInvalid.IllegalParamValueThe parameter value of the request API is illegal %s.The parameter value of the request API is illegal.
400CCAI.Throttling.QpmTrigger QPM flow restriction. Please purchase higher QPM for paid API. If free API has special requirements, please contact us through DingTalk group (62730018475).QPM throttling is triggered. Purchase a higher QPM for paid APIs. If you have special requirements for free APIs, contact us through the DingTalk group (62730018475).
400CCAI.Throttling.QpsTrigger current QPS limit, pay API please buy higher QPS, the free API if you have special requirements, please contact us through the DingTalk group (62730018475).Throttling is triggered. Purchase a higher QPS for paid APIs. If you have special requirements for free APIs, contact us through the DingTalk group (62730018475).
403CCAI.IllegalPermission.NoAuthUser not authorized to operate on the specified resource.The user is not authorized to operate on the specified resource.
403CCAI.ParamNotfound.MissParamParameter verification failed, The specified parameter %s is missing.Parameter validation failed. The specified parameter is missing.
403CCAI.TenantPermission.NoAuthThe current account does not have the permission to specify the business space. Please authorize the business space permission.The current account does not have permission to access the specified workspace. Grant workspace permissions as needed.
500CCAI.InternalErrorThe request processing has failed due to some unknown error, exception or failure.Internal system error. Try again later.

Visit the Error Center to view more error codes.