Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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

Queries a Task List

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

Typical Scenario

An NA can call this API to query the created upgrade tasks to view the detailed information and execution status of each upgrade task.

API Function

This API is used by an NA to query details about upgrade tasks that meet specified conditions.

API Prototype

Method

GET

URL

https://server:port/iodm/northbound/v1.5.0/operations?operationType={operationType}&operationStatus={operationStatus}&deviceType={deviceType}&manufacturerName={manufacturerName}&model={model}&deviceId={deviceId}&pageNo={pageNo}&pageSize={pageSize}

Transport Protocol

HTTPS

Request Parameters

Parameter

Mandatory or Optional

Type

Location

Description

app_key

Mandatory

String

header

Identifies an application that can be accessed on the IoT platform. The value of this parameter is allocated by the IoT platform when the application is created on the platform.

Authorization

Mandatory

String

header

Indicates the authentication information for accessing the IoT platform. The value is Bearer {accessToken}, in which {accessToken} indicates the access token returned by the Authentication API.

operationType

Optional

String(256)

query

Indicates the operation type.

  • firmware_upgrade
  • software_upgrade

operationStatus

Optional

String(256)

query

Indicates the status of the operation task.

  • wait: The operation task is waiting to be executed.
  • processing: The operation task is being executed.
  • failed: The operation task fails to be executed.
  • success: The operation task is successfully executed.
  • stop: The operation task stops being executed.

deviceType

Optional

String(256)

query

Indicates the device type for which the operation task is intended.

model

Optional

String(256)

query

Indicates the device model for which the operation task is intended.

manufacturerName

Optional

String(256)

query

Indicates the manufacturer of the device for which the operation task is intended.

deviceId

Optional

String(256)

query

Uniquely identifies a device for which the operation task is intended. The value of this parameter is allocated by the IoT platform during device registration.

pageNo

Optional

Integer(>=0)

query

Indicates the page number to be queried. The value is an integer greater than or equal to 0. The default value is 0, indicating that the first page is queried.

pageSize

Optional

Integer[1,100]

query

Indicates the number of records on each page. The value ranges from 1 to 100. The default value is 10.

Response Parameters

Status Code: 200 OK

Parameter

Type

Description

data

List<OperationInfo>

Indicates information about a task list.

pageNo

Integer(>=0)

Indicates the page number.

pageSize

Integer[1,100]

Indicates the number of records to be displayed on each page.

totalCount

Integer(>=0)

Indicates the total number of query results.

OperationInfo structure

Parameter

Type

Description

operationId

String

Identifies an operation task.

createTime

String

Indicates the time when the operation task is created. The time format is yyyyMMdd'T'HHmmss'Z'. An example value is 20151212T121212Z.

startTime

String

Indicates the time when the operation task is started. The time format is yyyyMMdd'T'HHmmss'Z'. An example value is 20151212T121212Z.

stopTime

String

Indicates the time when the operation task is stopped. The time format is yyyyMMdd'T'HHmmss'Z'. An example value is 20151212T121212Z.

operateType

String

Indicates the operation type.

  • firmware_upgrade
  • software_upgrade

targets

OperateDevices

Indicates the target device on which the operation is performed.

policy

OperatePolicy

Indicates the operation execution policy.

status

String

Indicates the status of the operation task.

  • wait: The operation task is waiting to be executed.
  • processing: The operation task is being executed.
  • failed: The operation task fails to be executed.
  • success: The operation task is successfully executed.
  • stop: The operation task stops being executed.

staResult

OperationStaResult

Indicates the statistics on operation results.

extendPara

Map<String, String>

Indicates extended information of the operation task. The value of this parameter varies depending on the operation type.

OperateDevices structure

Parameter

Type

Description

deviceGroups

List<String>

Indicates the device group name list. A maximum of 256 device groups are supported.

Either this parameter or devices must be specified.

deviceType

String

Indicates the device type.

This parameter must be specified when a device group is specified.

model

String

Indicates the device model.

This parameter must be specified when a device group is specified.

manufacturerName

String

Indicates the manufacturer name.

This parameter must be specified when a device group is specified.

devices

List<String>

Indicates the device ID list. A maximum of 256 devices are supported.

Either this parameter or deviceGroups must be specified.

OperatePolicy structure

Parameter

Type

Description

executeType

String

Indicates the execution type. The default value is now.

  • now: The operation task is executed now.
  • device_online: The operation task is executed when a device goes online.
  • custom: The execution type is customized.

startTime

String

Indicates the start time of the operation task. This parameter must be specified when executeType is set to custom. The value is in the format of yyyyMMdd'T'HHmmss'Z'. An example value is 20151212T121212Z.

endTime

String

Indicates the end time of the operation task. This parameter must be specified when executeType is set to custom. The value is in the format of yyyyMMdd'T'HHmmss'Z'. An example value is 20151212T121212Z.

retryType

Boolean

Indicates whether the platform retries the task upon an execution failure. The default value is false.

  • true: Retry is performed.
  • false: The platform does not retry the task.

retryTimes

Integer

Indicates the number of retries. The value ranges from 1 to 5. This parameter must be specified when retryType is set to true.

OperationStaResult structure

Parameter

Type

Description

total

Integer(64)

Indicates the number of operated devices.

wait

Integer(64)

Indicates the number of devices waiting to be operated.

processing

Integer(64)

Indicates the number of devices that are being operated.

success

Integer(64)

Indicates the number of devices that are operated successfully.

fail

Integer(64)

Indicates the number of devices that fail to be operated.

stop

Integer(64)

Indicates the number of devices that stop being operated.

timeout

Integer(64)

Indicates the number of devices that fail to be operated due to a timeout.

Request Example

Method: GET
Request:
https://server:port/iodm/northbound/v1.5.0/operations?operationType={operationType}&operationStatus={operationStatus}&deviceType={deviceType}&manufacturerName={manufacturerName}&model={model}&deviceId={deviceId}&pageNo={pageNo}&pageSize={pageSize}
Header:
app_key: ******
Authorization: Bearer ******
Content-Type: application/json

Response Example

Response:
Status Code: 200 OK
Content-Type: application/json
Body:
{
  "totalCount": 1,
  "pageNo": 0,
  "pageSize": 1,
  "data": [
    {
      "operationId": "**********",
      "createTime": "20151212T121212Z",
      "startTime": "20151212T121212Z",
      "stopTime": null,
      "operateType": "software_upgrade",
      "targets": {
        "deviceGroups": null,
        "deviceType": "******",
        "model": "******",
        "manufacturerName": "***",
        "devices": [
          "**********"
        ]
      },
      "policy": null,
      "status": "FAIL",
      "staResult": {
        "wait": 0,
        "processing": 0,
        "success": 0,
        "fail": 1,
        "stop": 0,
        "timeout": 0
      },
      "extendPara": {
        "fileVersion": "V1.1.10"
      }
    }
  ]
}

Error Code

HTTP Status Code

Error Code

Error Description

Remarks

400

120015

Bad request error.

A request error occurs.

Recommended handling: Check whether the format of fileId carried in the API request is correct.

400

123029

pageNo or pageSize beyond the limit.

The value of pageNo or pageSize exceeds the upper limit.

Recommended handling: Change the value of pageNo or pageSize to a valid value.

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

123009

The requested task does not exist.

The queried task does not exist.

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

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback