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 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 code.

error_msg

String

Error description.

Example Requests

None

Example Responses

Status code: 200

OK.

{
  "apiVersion" : "v1",
  "kind" : "PluginTemplate",
  "metadata" : {
    "name" : "npu-driver"
  },
  "spec" : {
    "type" : "npuDriver",
    "description" : "npu driver"
  },
  "versions" : {
    "78-21.0.2" : {
      "detail" : "c78driver&firmware"
    },
    "77-21.0.cr1" : {
      "detail" : "c77driver&firmware"
    }
  }
}

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.