Help Center/ ModelArts/ API Reference/ Resource Management/ Querying a Plug-in Template
Updated on 2024-05-30 GMT+08:00

Querying a Plug-in Template

Function

This interface is used to obtain details about a specified plug-in template.

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

Project ID. For details, see Obtaining a Project ID and Name.

plugintemplate_name

Yes

String

Name of a plug-in template. The options are as follows:

  • gpu-driver: GPU driver plug-in template information

  • npu-driver: NPU driver plug-in template information

Request Parameters

None

Response Parameters

Status code: 200

Table 2 Response body parameters

Parameter

Type

Description

apiVersion

String

API version. The options are as follows:

  • v1

kind

String

Resource type. The options are as follows:

  • PluginTemplate: plug-in template

metadata

PluginTemplateMetadata object

Specifies the metadata information of the plug-in template.

spec

PluginTemplateSpec object

Specifications of the plug-in template.

Table 3 PluginTemplateMetadata

Parameter

Type

Description

name

String

Name of a plug-in template.

Table 4 PluginTemplateSpec

Parameter

Type

Description

type

String

Plug-in template type. The options are as follows:

  • npuDriver: NPU driver

  • gpuDriver: GPU driver

  • ccePlugin: CCE plug-in

  • helm: Helm template

  • icAgent: ICAgent tool

description

String

Plug-in template description.

versions

Map<String,PluginTemplateVersion>

Description of the plug-in template version.

Table 5 PluginTemplateVersion

Parameter

Type

Description

detail

String

Description of a version.

Status code: 404

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error codes of ModelArts.

error_msg

String

Error message.

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.