Help Center/ ModelArts/ API Reference/ Resource Management/ Querying a Plug-in Template
Updated on 2025-11-19 GMT+08:00

Querying a Plug-in Template

Function

This API is used to obtain details about a specified plug-in template. This API is used when you need to query the configuration, functions, or usage of a specific plug-in template. Before using this API, ensure that the plug-in template exists and you have the required permission. After the query, the details of the specified plug-in template are returned, including the configuration parameters and function description of the template, helping you develop and manage plug-ins. If the plug-in template does not exist or you do not have the access permission, the API will return an error message.

Debugging

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

URI

GET /v1/{project_id}/plugintemplates/{plugintemplate_name}

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: The value can contain 1 to 64 characters. Letters, digits, and hyphens (-) are allowed.

Range: N/A

Default Value: N/A

plugintemplate_name

Yes

String

Definition: Plug-in template name.

Constraints: N/A

Range

  • gpu-driver: GPU driver plug-in template

  • npu-driver: NPU driver plug-in template

Default Value: N/A

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

Definition: API version.

Range:

  • v1

kind

String

Definition: Resource type.

Range:

  • PluginTemplate: plugin template

metadata

PluginTemplateMetadata object

Definition: Metadata of the plugin template.

spec

PluginTemplateSpec object

Definition: Specifications of the plugin template.

Table 3 PluginTemplateMetadata

Parameter

Type

Description

name

String

Definition: Name of the plugin template.

Range: N/A

annotations

Map<String,String>

Plugin template annotations in the format of key-value pairs.

Table 4 PluginTemplateSpec

Parameter

Type

Description

type

String

Plugin template type. Options:

  • npu-river: NPU driver

  • gpu-driver: GPU driver

description

String

Definition: Description of the plugin template.

Range: N/A

versions

Map<String,PluginTemplateVersionV2>

Definition: Description of the plugin template version.

Table 5 PluginTemplateVersionV2

Parameter

Type

Description

version

String

Version number of the plugin template.

creationtimestamp

String

Creation time.

inputs

Object

Plugin installation parameters.

translate

Object

Translation information used by the GUI.

description

String

Version description.

detail

String

Version description.

Status code: 404

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

  • Definition: ModelArts error code.

Range: N/A

error_msg

String

Definition: Error message.

Range: N/A

Example Requests

GET https://{endpoint}/v1/{project_id}/plugintemplates/{plugintemplate_name}

Example Responses

Status code: 200

OK.

{
  "apiVersion" : "v1",
  "kind" : "PluginTemplate",
  "metadata" : {
    "name" : "npu-driver"
  },
  "spec" : {
    "type" : "npuDriver",
    "description" : "npu driver",
    "versions" : { }
  }
}

Status code: 404

Not Found.

{
  "error_code" : "ModelArts.50005101",
  "error_msg" : "Plugintemplate {name} not found."
}

Status Codes

Status Code

Description

200

OK.

404

Not Found.

Error Codes

See Error Codes.