هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.

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

Querying Service Capabilities of a Device

Updated on 2022-02-24 GMT+08:00

Typical Scenario

If an NA needs to know which service attributes can be reported by a device and which commands can be delivered to the device, the NA can call this API to query the device service capabilities defined in the profile file of the device on the IoT platform.

API Function

This API is used by an NA to query device service capabilities, such as service attributes and device commands.

API Description

1
def queryDeviceCapabilities(self, qdcInDTO, accessToken)

Parameter Description

Parameter

Mandatory or Optional

Type

Location

Description

qdcInDTO

Mandatory

QueryDeviceCapabilitiesInDTO

query

For details, see QueryDeviceCapabilitiesInDTO structure.

accessToken

Mandatory

String

header

This parameter is set to the value of the access token obtained by calling the Authentication API.

QueryDeviceCapabilitiesInDTO structure

Parameter

Mandatory or Optional

Type

Location

Description

gatewayId

Optional

String

query

Identifies a gateway.

appId

Mandatory

String

query

If the device belongs to the current application, set this parameter to None. Otherwise, set this parameter to the ID of the authorized application.

deviceId

Optional

String

query

Uniquely identifies a device.

Response Parameters

QueryDeviceCapabilitiesOutDTO

Parameter

Type

Description

deviceCapabilities

List<DeviceCapabilityDTO>

Indicates the query result list. For details, see DeviceCapabilityDTO structure.

DeviceCapabilityDTO structure

Parameter

Type

Description

deviceId

String(256)

Uniquely identifies a device.

serviceCapabilities

List<ServiceCapabilityDTO>

Indicates the service capability list. For details, see ServiceCapabilityDTO structure.

ServiceCapabilityDTO structure

Parameter

Type

Description

serviceId

String(256)

Identifies a service.

serviceType

String(256)

Indicates the service type.

option

String(256)

Indicates a service option.

description

String(10240)

Indicates the service description.

commands

List<ServiceCommand>

Indicates the supported commands. For details, see ServiceCommand structure.

properties

List<ServiceProperty>

Indicates the attribute list. For details, see ServiceProperty structure.

ServiceCommand structure

Parameter

Type

Description

commandName

String(256)

Indicates the command name.

paras

List<ServiceCommandPara>

Indicates the attribute list. For details, see ServiceCommandPara structure.

responses

List<ServiceCommandResponse>

Indicates the response list. For details, see ServiceCommandResponse structure.

ServiceCommandPara structure

Parameter

Type

Description

paraName

String(256)

Indicates the parameter name.

dataType

String(256)

Indicates the data type.

required

Boolean

Indicates whether the parameter is mandatory.

min

String

Indicates the minimum value of the attribute.

max

String

Indicates the maximum value of the attribute.

step

Double

Indicates the step.

maxLength

Integer

Indicates the maximum length.

unit

String

Indicates the unit (symbol).

enumList

List<String>

Indicates the enumeration type list.

ServiceCommandResponse structure

Parameter

Type

Description

responseName

String(256)

Indicates the response name.

paras

List<ServiceCommandPara>

Indicates the attribute list. For details, see ServiceCommandPara structure.

ServiceProperty structure

Parameter

Type

Description

propertyName

String(256)

Indicates the attribute name.

dataType

String(256)

Indicates the data type.

required

Boolean

Indicates whether the parameter is mandatory.

min

String

Indicates the minimum value of the attribute.

max

String

Indicates the maximum value of the attribute.

step

Double

Indicates the step.

maxLength

Integer

Indicates the maximum length.

method

String(256)

Indicates the access method. The values are as follows:

  • R: Readable
  • W: Writable
  • E: Observable

unit

String

Indicates the unit (symbol).

enumList

List<String>

Indicates the enumeration type list.

Error Codes

HTTP Status Code

Error Code

Error Description

Remarks

400

100022

The input is invalid.

An input parameter is invalid.

Recommended handling: Check whether parameters carried in the API call request are valid.

403

100203

The application is not existed.

The application does not exist.

Recommended handling:

  • Check whether appId carried in the HTTP request header is correct.
  • Check whether appId in the request path (URL) is correct.

403

100217

The application hasn't been authorized.

The application has not been authorized.

Recommended handling: In scenarios where applications are not authorized, ensure that request parameter appId is null.

403

1010009

app throttle exceed.

The NA calls the API at a frequency that exceeds the flow control threshold (100 calls per minute by default).

Recommended handling: Contact IoT platform maintenance personnel to adjust the flow control threshold or control the API call frequency.

403

1010005

App_key or access_token is invalid.

The access token is invalid.

Recommended handling: Check whether accessToken carried in the API request is correct.

500

100203

The application is not existed.

The application does not exist.

Recommended handling:

  • Check whether appId carried in the HTTP request header is correct.
  • Check whether appId in the request path (URL) is correct.

500

50252

Internal server error.

An internal server error occurs.

Recommended handling: An internal error occurs on the IoT platform. Contact IoT platform maintenance personnel.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback