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

Viewing a Job Instance List

Updated on 2024-11-06 GMT+08:00

Function

This API is used to view a job instance list.

A job instance is generated each time you run a batch job for which periodic scheduling or event-based scheduling is configured. If a real-time job contains a node for which periodic scheduling or event-based scheduling is configured, you can call this API to view the instance list of the subjobs associated with the node. The format of the jobName parameter is real-time job name_node name.

URI

  • URI format

    GET /v1/{project_id}/jobs/instances/detail?jobName={jobName}&minPlanTime={minPlanTime}&maxPlanTime={maxPlanTime}&limit={limit}&offset={offset}&status={status}&instanceType={instanceType}&preciseQuery={preciseQuery}

  • Parameter description
    Table 1 URI parameters

    Parameter

    Mandatory

    Type

    Description

    project_id

    Yes

    String

    Project ID. For details about how to obtain a project ID, see Project ID and Account ID.

    jobName

    No

    String

    Job name.

    • If you want to query the instance list of a specific batch job, jobName is the batch job name.
    • If you want to query sub-jobs associated with a node in a real-time job, the jobName format is real-time job name _ node name.

    minPlanTime

    No

    Long

    Minimum planned job execution time in milliseconds. Job instances whose start time is later than this time are returned. The default value is 00:00:00 of the current day.

    maxPlanTime

    No

    Long

    Maximum planned job execution time in milliseconds. Job instances whose start time is earlier than this time are returned.

    limit

    No

    int

    The maximum number of records on each page.

    The parameter value ranges from 1 to 1000.

    Default value: 10

    offset

    No

    int

    Start page of the paging list. The default value is 0. The value must be greater than or equal to 0.

    status

    No

    String

    Job instance status.

    • waiting
    • running
    • success
    • fail
    • running-exception
    • pause
    • manual-stop

    instanceType

    No

    int

    Job scheduling modes.

    • 0: General scheduling
    • 2: Manual scheduling
    • 5: PatchData
    • 6: Subjob scheduling
    • 7: Schedule once

    preciseQuery

    No

    boolean

    Whether exact search of jobs by name is supported

Request Parameters

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

workspace

No

String

Workspace ID.

  • If this parameter is not set, data in the default workspace is queried by default.
  • To query data in other workspaces, this header must be carried.

Response Parameters

Table 3 Response parameters

Parameter

Mandatory

Type

Description

total

Yes

int

Total number of records.

instances

Yes

List<Instance>

Job instance status. For details, see Table 4.

Table 4 instances parameters

Parameter

Mandatory

Type

Description

jobName

Yes

String

Job name. When you view the instance list of a specified batch job, jobName is the name of the batch job. When you view the subjobs associated with a node in a real-time job, jobName is in format of real-time job name_node name.

jobId

No

Long

Job ID

jobInstanceName

Yes

String

Name of a job instance recorded by the log, rather than the name defined during job creation

status

Yes

String

Job instance status.

  • waiting
  • running
  • success
  • fail
  • running-exception
  • pause
  • manual-stop

planTime

Yes

Long

Planned execution time of the job instance

startTime

Yes

Long

Actual execution start time of the job instance

endTime

No

Long

Actual execution end time of the job instance

executeTime

No

Long

Execution duration in milliseconds

instanceId

Yes

Long

Job instance ID, which is used to query job instance details.

submitTime

Yes

Long

Time when a job is submitted.

instanceType

Yes

int

Job scheduling modes.

  • 0: General scheduling
  • 2: Manual scheduling
  • 5: PatchData
  • 6: Subjob scheduling
  • 7: Schedule once

forceSuccess

No

boolean

Whether the job instance status is forcibly successful

Default value: false

ignoreSuccess

No

boolean

Whether the job instance status is failure ignored

Default value: false

version

No

int

Job instance version

Example Request

View the instance list of batch job job_batch.
GET /v1/b384b9e9ab9b4ee8994c8633aabc9505/jobs/instances/detail?jobName=job_batch

Example Response

Success response
{
	"total": 2,
	"instances": [{
		"endTime": 1551671598000,
		"executeTime": 0.3,
		"forceSuccess": false,
		"ignoreSuccess": false,
		"instanceId": 34765,
		"instanceType": 2,
		"jobId": 608627,
		"jobName": "job_batch",
		"jobInstanceName": "job_batch",
		"planTime": 1551671580000,
		"startTime": 1551671580000,
		"status": "success",
		"submitTime": 1550910278706,
		"version": 1
	},
	{
		"endTime": 1551671538000,
		"executeTime": 0.3,
		"forceSuccess": false,
		"ignoreSuccess": false,
		"instanceId": 34764,
		"instanceType": 5,
		"jobId": 608627,
		"jobName": "job_batch",
		"jobInstanceName": "job_batch",
		"planTime": 1551671520000,
		"startTime": 1551671521000,
		"status": "success",
		"submitTime": 1550910278706,
		"version": 1
	}]
}

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