หน้านี้ยังไม่พร้อมใช้งานในภาษาท้องถิ่นของคุณ เรากำลังพยายามอย่างหนักเพื่อเพิ่มเวอร์ชันภาษาอื่น ๆ เพิ่มเติม ขอบคุณสำหรับการสนับสนุนเสมอมา

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Q&A Satisfaction Evaluation

Updated on 2023-06-06 GMT+08:00

Function Description

After a user raises a question, the user evaluates whether the result returned by the intelligent Q&A is satisfactory. The API request parameter degree can be satisfied or dissatisfied. This API can be added to the answers returned by QABot to collect user feedback.

URI

POST https://{endpoint}/v1/{project_id}/qabots/{qabot_id}/requests/{request_id}/satisfaction

Table 1 Path parameters

Parameter

Mandatory

Type

Description

endpoint

Yes

String

Endpoint, which is the request address for calling an API.

The endvertex varies depending on the service and region. You can obtain it from Endpoints.

project_id

Yes

String

Project ID, which is used for resource isolation. For details, see Obtaining a Project ID.

qabot_id

Yes

String

Q&A bot ID, which is in the UUID format. For example, 303a0a00-c88a-43e3-aa2f-d5b8b9832b02.

This parameter is displayed in the Q&A Bot Name/ID column of the QABot console.

request_id

Yes

String

Request ID.

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. The value of X-Subject-Token in the Interface for Obtaining a Token response header is the token.

Content-Type

Yes

String

Message body type (format). The value is application/json.

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

degree

Yes

Integer

Satisfaction score. Currently, the value can be 1 (satisfied) or -1 (dissatisfied). Questions with dissatisfied answers will be added to the list of unresolved questions.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

request_id

String

Request ID returned when the API is successfully called.

This parameter is not included when the API fails to be called.

updated_time

String

Date and time when the satisfaction score is returned. The format is yyyy-MM-dd THH:mm:ssZ. T is the separator between the calendar and the hourly notation of time. Z indicates Coordinated Universal Time (UTC).

This parameter is not included when the API fails to be called.

Status code: 400

Table 5 Response body parameters

Parameter

Type

Description

error_code

String

Error code returned when the API fails to be called. This parameter is not included when the API is successfully called.

error_msg

String

Error message returned when the API fails to be called. This parameter is not included when the API is successfully called.

Example Requests

  • Example request
    POST https://{endpoint}/v1/1604d8170cd84440a81281e5a3a04f8b/qabots/303a0a00-c88a-43e3-aa2f-d5b8b9832b02/requests/303a0a00-c88a/satisfaction
    
    Request Header:
        Content-Type: application/json
        X-Auth-Token: MIINRwYJKoZIhvcNAQcCoIINODCCDTQCAQExDTALBglghkgBZQMEAgEwgguVBgkqhkiG...
    
    Request Body:
    {
        "degree":1
    }
  • Python request code example
    import requests
    url = "https://{endpoint}/v1/{project_id}/qabots/{qabot_id}/requests/{request_id}/satisfaction"
    body = {"degree":1}
    token = "Actual token value obtained by the user"
    headers = {'Content-Type': 'application/json', 'X-Auth-Token': token}
    
    response = requests.post(url, headers=headers, json=body, verify=False)
    print(response.text)
  • Java request code example
    import java.io.BufferedReader;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.net.HttpURLConnection;
    import java.net.URL;
    
    public class CBSDemo {
    
        public void cbsDemo() {
            try {
                //Replace endpoint, projectId, and qabot_id with the actual ones.
                URL url = new URL("https://{endpoint}/v1/{project_id}/qabots/{qabot_id}/requests/{request_id}/satisfaction");
                String token = "Actual token value obtained by the user";
                HttpURLConnection connection = (HttpURLConnection) url.openConnection();
                connection.setRequestMethod("POST");
                connection.setDoInput(true);
                connection.setDoOutput(true);
                connection.addRequestProperty("Content-Type", "application/json");
                connection.addRequestProperty("X-Auth-Token", token);
    
                //Input parameters
                String body = "{\"degree\":1}";
    
                OutputStreamWriter osw = new OutputStreamWriter(connection.getOutputStream(), "UTF-8");
                osw.append(body);
                osw.flush();
                InputStream is = connection.getInputStream();
                BufferedReader br = new BufferedReader(new InputStreamReader(is, "UTF-8"));
                while (br.ready()) {
                    System.out.println(br.readLine());
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    
        public static void main(String[] args) {
            CBSDemo CBSDemo = new CBSDemo();
            CBSDemo.cbsDemo();
        }
    }

Example Responses

Status code: 200

Example of a successful response

{
    "request_id":"303a0a00-c88a",
    "updated_time":"2017-02-07T17:34:02Z"
}

Status code: 400

Example of a failed response

{
  "error_code": "CBS.0099",
  "error_msg": "request body invalid."
}

Status Code

For details about status codes, see Status Code.

Error Code

For details about error codes, see Error Code.

เราใช้คุกกี้เพื่อปรับปรุงไซต์และประสบการณ์การใช้ของคุณ การเรียกดูเว็บไซต์ของเราต่อแสดงว่าคุณยอมรับนโยบายคุกกี้ของเรา เรียนรู้เพิ่มเติม

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback