El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

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
Help Center/ IoT/ API Reference/ Northbound Python SDK API Reference/ Service API List/ Batch Processing/ Querying Information About a Specified Batch Task

Querying Information About a Specified Batch Task

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

Typical Scenario

After creating a batch task for devices, an NA can call this API to query information about the batch task, including the task status and the subtask completion status.

API Function

This API is used by an NA to query the information about a single batch task by task ID.

API Description

1
def queryOneTask(self, taskId, select, appId, accessToken)

Class

BatchProcess

Parameter Description

Parameter

Mandatory or Optional

Type

Location

Description

taskId

Mandatory

String

path

Identifies a batch task. The value of this parameter is obtained after the batch task is created.

select

Mandatory

String

query

Indicates an optional return value. The value can be tag. If this parameter is not specified, the value can be None.

appId

Optional

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.

accessToken

Mandatory

String

header

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

Return Value

QueryOneTaskOutDTO structure

Parameter

Type

Description

appId

String

Indicates the appId to which the batch task belongs.

taskId

String

Identifies a batch task.

taskName

String

Indicates the name of the batch task.

operator

String

Indicates the operator who delivers the batch task.

taskFrom

String

Indicates the source of the batch task.

  • Portal: The task is created on the SP portal.
  • Northbound: The task is created by calling a northbound API.

taskType

String

Indicates the type of the batch task. The values include DeviceReg, DeviceCmd, DeviceLocation, DeviceMod, DeviceDel, and DeviceLicense.

status

String

Indicates the status of the batch task. The value options are Pending, Running, Complete, and Timeout.

startTime

String

Indicates the time when the batch task is created.

timeout

Integer

Indicates the time when the batch task times out, in seconds.

progress

Integer

Indicates the progress of the batch task. The value is a permillage ranging from 0 to 1000 and is rounded down.

totalCnt

Integer

Indicates the total number of tasks.

successCnt

Integer

Indicates the number of tasks that are successfully executed.

failCnt

Integer

Indicates the number of tasks that fail to be executed.

timeoutCnt

Integer

Indicates the number of tasks with execution timeout.

expiredCnt

Integer

Indicates the number of expired tasks that are not executed.

completeCnt

Integer

Indicates the number of completed tasks, including successful, failed, and timed out tasks.

successRate

Integer

Indicates the task success rate. The value is a permillage ranging from 0 to 1000 and is rounded down.

param

ObjectNode

Indicates the task parameter, which varies depending on the value of taskType.

tags

List<TagDTO2>

Indicates the tag list of the batch task.

ObjectNode structure

Parameter

Type

Description

type

String

Indicates the batch command type. The options include DeviceList, DeviceType, DeviceArea, GroupList, Broadcast, and GroupIdList.

deviceList

List<String>

Indicates the device ID list. The value is that returned when type is set to DeviceList.

deviceType

String

Indicates the type of the device. The value is that returned when type is set to DeviceType. The value must be the same as that defined in the profile file.

manufacturerId

String

Identifies a manufacturer. The value is that returned when type is set to DeviceType. The value must be the same as that defined in the profile file.

model

String

Indicates the model of the device. The value is that returned when type is set to DeviceType. The value must be the same as that defined in the profile file.

deviceLocation

String

Indicates the location of the device. The value is that returned when type is set to DeviceArea.

groupList

List<String>

Indicates the group name list. The value is that returned when type is set to GroupList.

command

CommandDTO

Indicates the command information. .

callbackUrl

String

Indicates the push address of the command execution result..

maxRetransmit

Integer(0~3)

Indicates the maximum number of retransmissions of a command. The value ranges from 0 to 3.

groupTag

String

Indicates the group tag.

CommandDTO structure

Parameter

Type

Indicates the location description information.

serviceId

String(1-64)

Identifies the service corresponding to the command. The value of this parameter must be the same as the value of serviceId defined in the profile file.

method

String(1-128)

Indicates the name of a specific command under the service. The value of this parameter must be the same as the command name defined in the profile file.

paras

ObjectNode

Indicates a command parameter in the jsonString format. The value consists of key-value pairs. Each key is the paraName parameter in commands in the profile file. The specific format depends on the application and device.

TagDTO2 structure

Parameter

Type

Description

tagName

String(1-128)

Indicates the tag name.

tagValue

String(1-1024)

Indicates the tag value.

Error Codes

HTTP Status Code

Error Code

Error Description

Remarks

400

100019

Illegal request.

Invalid request.

Recommended handling: Check whether the mandatory parameters in the request are set.

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.

404

105005

The batchTask is not existed.

The batch task does not exist.

Recommended handling: Check whether taskId 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.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback