Help Center/ Ubiquitous Cloud Native Service/ API Reference/ API/ Policy Management/ Obtaining the Policy Instance Job List
Updated on 2025-12-01 GMT+08:00

Obtaining the Policy Instance Job List

Function

This API is used to obtain the policy instance job list.

URI

GET /v1/policy/jobs

Table 1 Query Parameters

Parameter

Mandatory

Type

Description

kind

No

String

Job type. If no type is specified, the default value EnablePolicy will be used.

Request Parameters

Table 2 Request header 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

Table 3 Response body parameters

Parameter

Type

Description

items

Array of UCSJob objects

Job list

kind

String

API type

apiVersion

String

API version

Table 4 UCSJob

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

Table 5 UCSJobSpec

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

Table 6 UCSTask

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

Table 7 ObjectMeta

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.

Table 8 ManagedFieldsEntry

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

Table 9 OwnerReference

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.

Table 10 UCSTaskSpec

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.

Table 11 UCSTaskStatus

Parameter

Type

Description

status

String

Status

reason

String

Reason for the current status

startTime

String

Start time

finishTime

String

End time

Table 12 UCSJobStatus

Parameter

Type

Description

status

String

Job status. Options:

  • Running: The job is running.

  • TimedOut: The job execution timed out.

  • Succeeded: The job has been executed.

  • Failed: The job failed to be executed.

reason

String

Reason

startTime

String

Start time

finishTime

String

End time

Status code: 500

Table 13 Response body parameters

Parameter

Type

Description

-

String

-

Example Requests

None

Example Responses

Status code: 200

Job list obtained

{
  "items" : [ {
    "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"
    }
  }, {
    "kind" : "job",
    "apiVersion" : "job.workflow.io/v1alpha1",
    "metadata" : {
      "name" : "CreateConstraint_a6b24118",
      "uid" : "5b0367b3-6651-4cef-8a4b-f93f377db5a4",
      "creationTimestamp" : "2025-11-10 07:23:12.442745 +0000 UTC",
      "updateTimestamp" : "2025-11-10 07:23:13.415506 +0000 UTC"
    },
    "spec" : {
      "taskList" : [ {
        "kind" : "task",
        "apiVersion" : "task.workflow.io/v1alpha1",
        "metadata" : {
          "name" : "be72df63-7dfa-426d-acc9-6c426c4e979c",
          "uid" : "866f323a-dbfa-4925-9324-f68c936c9992",
          "creationTimestamp" : "2025-11-10 07:23:12.451539 +0000 UTC",
          "updateTimestamp" : "2025-11-10 07:23:13.406122 +0000 UTC"
        },
        "spec" : {
          "jobID" : "5b0367b3-6651-4cef-8a4b-f93f377db5a4",
          "target" : "be72df63-7dfa-426d-acc9-6c426c4e979c",
          "targetType" : "cluster",
          "type" : "CreateConstraint",
          "runway" : "parallel",
          "waitTimeOut" : 3600
        },
        "status" : {
          "status" : "Succeeded",
          "startTime" : "2025-11-10T15:23:12.60286+08:00",
          "finishTime" : "2025-11-10T15:23:12.808264+08:00"
        }
      } ],
      "domainID" : "05495693d180d3c90f9ec0171879f760",
      "operation" : "create",
      "waitTimeOut" : 3600,
      "type" : "CreateConstraint",
      "relatedObjects" : {
        "fleet" : "1bb7effb-2afc-4eb1-9818-8de8a2bd9c80"
      },
      "extendParam" : {
        "constraintID" : "5044f128-0162-489a-b00f-3880c3f47832"
      }
    },
    "status" : {
      "status" : "Succeeded",
      "startTime" : "2025-11-10T15:23:12.455389+08:00",
      "finishTime" : "2025-11-10T15:23:13.414079+08:00"
    }
  } ]
}

Status Codes

Status Code

Description

200

Job list obtained

500

Internal server error

Error Codes

See Error Codes.