Help Center/ ModelArts/ API Reference/ Plugin Management/ Querying the Plugin List
Updated on 2025-11-19 GMT+08:00

Querying the Plugin List

Function

This API is used to list plugin instances.

Debugging

You can debug this API through automatic authentication in API Explorer or use the SDK sample code generated by API Explorer.

URI

GET /v2/{project_id}/pools/{pool_name}/plugins

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition: User project ID. For details, see Obtaining a Project ID and Name.

Constraints: N/A

Range: N/A

Default Value: N/A

pool_name

Yes

String

Resource pool name.

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

Definition: API version.

Range:

  • v2

kind

String

Resource type. Options:

  • PluginList: plugin list

items

Array of Plugin objects

Plugin list of the resource pool.

Table 3 Plugin

Parameter

Type

Description

apiVersion

String

Definition: API version.

Range:

  • v2

kind

String

Type of the plugin instance. Options:

  • Plugin: plugin

metadata

PluginMetadata object

Metadata of the plugin instance.

spec

PluginSpec object

Plugin instance details.

status

PluginStatus object

Plugin instance status.

Table 4 PluginMetadata

Parameter

Type

Description

name

String

Name of the plugin instance.

creationtimestamp

String

Creation time.

Table 5 PluginSpec

Parameter

Type

Description

template

Template object

Definition: Template information.

Constraints: N/A

Table 6 Template

Parameter

Type

Description

name

String

Name of the plugin template to be installed, for example, log-agent.

version

String

Version of the plugin to be installed or upgraded.

inputs

Map<String,Object>

Plugin template installation parameters (varying depending on the plugin). During the plugin upgrade, you need to specify all the installation parameters. If the parameters are not specified, the default values in the plugin template are used. The current plugin installation parameters can be obtained through the API for querying plugin instances.

Table 7 PluginStatus

Parameter

Type

Description

phase

String

Plugin instance status. Options:

  • Pending: The plugin is being installed.

  • Running: All of the plugin instances are running. This specifies that the plugin runs properly.

  • Updating: The plugin is being updated.

  • Abnormal: The plugin instances are abnormal and the plugin cannot be used. You can click the status to view the failure cause.

  • Deleting: The plugin is being deleted.

version

String

Version of the plugin instances.

reason

String

Details about the plugin instance installation failure.

values

String

Installation parameters of the plugin instances. The parameters vary depending on the plugin.

resources

Array of PluginResources objects

Resources used by the plugin instances.

Table 8 PluginResources

Parameter

Type

Description

involvedobject

ObjectReference object

Resource objects referenced by the plugin.

replicas

Integer

Number of replicas of the resource object.

limits

Map<String,String>

Limit on requested resources.

requests

Map<String,String>

Requested resources.

Table 9 ObjectReference

Parameter

Type

Description

kind

String

API type of the resource object, for example, DaemonSet and Deployment.

apiVersion

String

Definition: API version of the resource object.

Range: N/A

namespace

String

Namespace of the resource object.

name

String

Name of the resource object.

uid

String

Unique ID of the resource object.

resourceversion

String

Current version of the resource object.

Example Requests

Query plugin instances.

GET https://{endpoint}/v2/{project_id}/pools/{pool_name}/plugins

{
  "kind" : "PluginList",
  "apiVersion" : "v2",
  "items" : [ {
    "kind" : "Plugin",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "lite-cluster-ac7339d4-4858-11ec-9d-0200b0b-gpu-beta",
      "creationTimestamp" : "2025-01-22T03:01:53Z"
    },
    "spec" : {
      "template" : {
        "name" : "gpu-beta"
      }
    },
    "status" : {
      "phase" : "Running",
      "version" : "1.2.15",
      "reason" : "Upgrade complete"
    }
  }, {
    "kind" : "Plugin",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "lite-cluster-ac7339d4-4858-11ec-a79d-0255ac100b0b-os-node-agent",
      "creationTimestamp" : "2025-01-22T03:01:53Z"
    },
    "spec" : {
      "template" : {
        "name" : "os-node-agent",
        "version" : "6.8.0-20250219120620",
        "inputs" : {
          "configs" : {
            "metric_config" : {
              "backNodeUp" : true,
              "enable" : true,
              "exporter" : {
                "enable" : false,
                "port" : "10120"
              },
              "namespaces" : [ "monitoring" ],
              "prometheus" : {
                "accessCode" : "",
                "prometheusId" : ""
              },
              "uplink" : "both"
            }
          }
        }
      }
    },
    "status" : {
      "phase" : "Running",
      "version" : "6.8.0-20250219120620",
      "reason" : "Upgrade complete"
    }
  } ]
}

Example Responses

Status code: 200

Request succeeded.

{
  "kind" : "PluginList",
  "apiVersion" : "v2",
  "items" : [ {
    "kind" : "Plugin",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "lite-cluster-ac7339d4-4858-11ec-9d-0200b0b-gpu-beta",
      "creationtimestamp" : "2025-01-22T03:01:53Z"
    },
    "spec" : {
      "template" : {
        "name" : "gpu-beta"
      }
    },
    "status" : {
      "phase" : "Running",
      "version" : "1.2.15",
      "reason" : "Upgrade complete"
    }
  }, {
    "kind" : "Plugin",
    "apiVersion" : "v2",
    "metadata" : {
      "name" : "lite-cluster-ac7339d4-4858-11ec-a79d-0255ac100b0b-os-node-agent",
      "creationtimestamp" : "2025-01-22T03:01:53Z"
    },
    "spec" : {
      "template" : {
        "name" : "os-node-agent",
        "version" : "6.8.0-20250219120620",
        "inputs" : {
          "configs" : {
            "metric_config" : {
              "backNodeUp" : true,
              "enable" : true,
              "exporter" : {
                "enable" : false,
                "port" : "10120"
              },
              "namespaces" : [ "monitoring" ],
              "prometheus" : {
                "accessCode" : "",
                "prometheusId" : ""
              },
              "uplink" : "both"
            }
          }
        }
      }
    },
    "status" : {
      "phase" : "Running",
      "version" : "6.8.0-20250219120620",
      "reason" : "Upgrade complete"
    }
  } ]
}

Status Codes

Status Code

Description

200

Request succeeded.

Error Codes

See Error Codes.