Obtaining the Job Related to a Specific Policy Instance
Function
This API is used to obtain the job related to a specific policy instance.
URI
GET /v1/policy/jobs/{jobid}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
jobid |
Yes |
String |
Job ID |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
No |
String |
Identity authentication information. Requests for calling an API can be authenticated using either a token or AK/SK. If token-based authentication is used, this parameter is mandatory and must be set to a user token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
kind |
String |
API type |
|
apiVersion |
String |
API version |
|
metadata |
ObjectMeta object |
Resource metadata |
|
spec |
UCSJobSpec object |
Job specification |
|
status |
UCSJobStatus object |
Current job status |
|
Parameter |
Type |
Description |
|---|---|---|
|
taskList |
Array of UCSTask objects |
Task list |
|
domainID |
String |
Domain ID of a user |
|
operation |
String |
Operation. The value can be create or retry. |
|
waitTimeOut |
Integer |
Job waiting time, in seconds |
|
type |
String |
Job type |
|
relatedObjects |
Map<String,String> |
Related objects |
|
extendParam |
Map<String,Object> |
Extended parameters |
|
Parameter |
Type |
Description |
|---|---|---|
|
kind |
String |
API type |
|
apiVersion |
String |
API version |
|
metadata |
ObjectMeta object |
Task object metadata |
|
spec |
UCSTaskSpec object |
Task configuration details |
|
status |
UCSTaskStatus object |
Actual task status |
|
Parameter |
Type |
Description |
|---|---|---|
|
uid |
String |
Resource ID |
|
name |
String |
Resource name |
|
generateName |
String |
If no name is provided, the server uses the prefix to generate a unique name. |
|
namespace |
String |
Namespace |
|
labels |
Map<String,String> |
Label |
|
annotations |
Map<String,String> |
Annotation |
|
creationTimestamp |
String |
Creation time |
|
updateTimestamp |
String |
Update time |
|
resourceVersion |
String |
Internal version of a resource |
|
generation |
String |
Generation of the desired resource state |
|
managedFields |
Array of ManagedFieldsEntry objects |
Fields managed by workflows |
|
ownerReferences |
Array of OwnerReference objects |
Ownership, dependencies, and garbage collection mechanism of objects. It supports resource management by the controller. |
|
Parameter |
Type |
Description |
|---|---|---|
|
manager |
String |
Manager name |
|
operation |
String |
Operation type that causes this entry being created. The value can only be Apply or Update. |
|
apiVersion |
String |
Resource API version used by a manager for defining fields |
|
time |
String |
Timestamp when this entry was created or last updated |
|
fieldsType |
String |
Field structure format. The value is fixed at "FieldsV1". |
|
fieldsV1 |
Object |
Information about the managed fields |
|
Parameter |
Type |
Description |
|---|---|---|
|
apiVersion |
String |
API version of the referent |
|
kind |
String |
Type of the referent |
|
name |
String |
Name of the referent |
|
uid |
String |
UID of the referent |
|
controller |
Boolean |
If the value is true, this reference points to the controller that manages the resource. |
|
blockOwnerDeletion |
Boolean |
If the value is true and the owner has a finalizer named foregroundDeletion, the owner cannot be deleted until this reference is removed. |
|
Parameter |
Type |
Description |
|---|---|---|
|
jobID |
String |
ID of the job that a task belongs to |
|
target |
String |
Task target |
|
targetType |
String |
Type of the target to be executed |
|
waitTimeOut |
Integer |
How long a task waits before being executed, in seconds |
|
type |
String |
Task type |
|
runway |
String |
Task execution mode. The value can be parallel or serial. |
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
String |
Status |
|
reason |
String |
Reason for the current status |
|
startTime |
String |
Start time |
|
finishTime |
String |
End time |
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
String |
Job status. Options: |
|
reason |
String |
Reason |
|
startTime |
String |
Start time |
|
finishTime |
String |
End time |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Status code: 500
|
Parameter |
Type |
Description |
|---|---|---|
|
- |
String |
- |
Example Requests
None
Example Responses
Status code: 200
Information about the job related to a specific policy instance obtained
{
"kind" : "job",
"apiVersion" : "job.workflow.io/v1alpha1",
"metadata" : {
"name" : "UpdateConstraint_2ea2e874",
"uid" : "c7678551-1f7e-4699-9ea1-3baa2d32f552",
"creationTimestamp" : "2025-11-10 07:24:03.529155 +0000 UTC",
"updateTimestamp" : "2025-11-10 07:24:08.526889 +0000 UTC"
},
"spec" : {
"taskList" : [ {
"kind" : "task",
"apiVersion" : "task.workflow.io/v1alpha1",
"metadata" : {
"name" : "be72df63-7dfa-426d-acc9-6c426c4e979c",
"uid" : "b387d7e9-b99f-4914-acf6-cd666b7473aa",
"creationTimestamp" : "2025-11-10 07:24:03.536701 +0000 UTC",
"updateTimestamp" : "2025-11-10 07:24:08.513561 +0000 UTC"
},
"spec" : {
"jobID" : "c7678551-1f7e-4699-9ea1-3baa2d32f552",
"target" : "be72df63-7dfa-426d-acc9-6c426c4e979c",
"targetType" : "cluster",
"type" : "UpdateConstraint",
"runway" : "parallel",
"waitTimeOut" : 3600
},
"status" : {
"status" : "Succeeded",
"startTime" : "2025-11-10T15:24:03.553733+08:00",
"finishTime" : "2025-11-10T15:24:04.689462+08:00"
}
} ],
"domainID" : "05495693d180d3c90f9ec0171879f760",
"operation" : "create",
"waitTimeOut" : 3600,
"type" : "UpdateConstraint",
"extendParam" : {
"constraintID" : "eb6e4196-1508-49d3-98a5-ee656d146c4f"
}
},
"status" : {
"status" : "Succeeded",
"startTime" : "2025-11-10T15:24:03.540316+08:00",
"finishTime" : "2025-11-10T15:24:08.524767+08:00"
}
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Information about the job related to a specific policy instance obtained |
|
400 |
Client request error. The server could not execute the request. |
|
500 |
Internal server error |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot